Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d47ccd4c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "wlan: Validate correct bss add before Add tx pattern cmd"

parents e202ef05 f2df190b
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -7444,7 +7444,13 @@ wlan_hdd_add_tx_ptrn(hdd_adapter_t *adapter, hdd_context_t *hdd_ctx,
    uint8_t pattern_id = 0;
    v_MACADDR_t dst_addr;
    uint16_t eth_type = htons(ETH_P_IP);
    hdd_station_ctx_t *hdd_sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
    if (!hdd_sta_ctx)
    {
        hddLog(LOGE, FL("Invalid station context"));
        return -EINVAL;
    }
    if (!hdd_connIsConnected(WLAN_HDD_GET_STATION_CTX_PTR(adapter)))
    {
        hddLog(LOGE, FL("Not in Connected state!"));
@@ -7504,6 +7510,9 @@ wlan_hdd_add_tx_ptrn(hdd_adapter_t *adapter, hdd_context_t *hdd_ctx,
        goto fail;
    }
    vos_mem_copy(add_req->bss_address, hdd_sta_ctx->conn_info.bssId,
                 VOS_MAC_ADDR_SIZE);
    if (!tb[PARAM_DST_MAC_ADDR])
    {
        hddLog(LOGE, FL("attr dst mac address failed"));
+3 −0
Original line number Diff line number Diff line
@@ -4858,6 +4858,9 @@ typedef struct sSirAddPeriodicTxPtrn
    /* MAC Address for the adapter */
    tSirMacAddr macAddress;

     /* BSSID of the connection */
     tSirMacAddr bss_address;

    tANI_U8  ucPtrnId;           // Pattern ID
    tANI_U16 ucPtrnSize;         // Pattern size
    tANI_U32 usPtrnIntervalMs;   // In msec
+3 −0
Original line number Diff line number Diff line
@@ -6013,6 +6013,9 @@ typedef struct
  /* MAC Address for the adapter  */
  wpt_macAddr macAddr;

  /* BSSID */
  wpt_macAddr bss_address;

  wpt_uint8  ucPtrnId;           // Pattern ID
  wpt_uint16 ucPtrnSize;         // Pattern size
  wpt_uint32 usPtrnIntervalMs;   // In msec
+5 −5
Original line number Diff line number Diff line
@@ -12811,7 +12811,7 @@ WDI_ProcessAddPeriodicTxPtrnInd
  wpt_uint8                      selfStaIdx          = 0;
  wpt_uint8                    ucCurrentBSSSesIdx;
  WDI_BSSSessionType*          pBSSSes             = NULL;
  wpt_macAddr                  dst_addr;
  wpt_macAddr                  bss_address;
  /*-------------------------------------------------------------------------
     Sanity check
@@ -12855,12 +12855,12 @@ WDI_ProcessAddPeriodicTxPtrnInd
    return WDI_STATUS_E_FAILURE;
  }
  vos_mem_copy(dst_addr,
               &pAddPeriodicTxPtrnParams->wdiAddPeriodicTxPtrnParams.ucPattern[0],
  vos_mem_copy(bss_address,
               &pAddPeriodicTxPtrnParams->wdiAddPeriodicTxPtrnParams.bss_address,
               VOS_MAC_ADDR_SIZE);
  ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx,
                                dst_addr,
                                bss_address,
                                &pBSSSes);
  if ( NULL == pBSSSes )
  {
@@ -12868,7 +12868,7 @@ WDI_ProcessAddPeriodicTxPtrnInd
              "%s: Association sequence for this BSS does not exist. macBSSID "
              MAC_ADDRESS_STR,
              __func__,
             MAC_ADDR_ARRAY(dst_addr));
             MAC_ADDR_ARRAY(bss_address));
    wpalMemoryFree(pSendBuffer);
    return WDI_STATUS_E_NOT_ALLOWED;
  }