Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion drivers/staging/qcacld-2.0/CORE/HDD/inc/wlan_hdd_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
#define ACS_IN_PROGRESS (0)

/** Maximum time(ms)to wait for disconnect to complete **/
#define WLAN_WAIT_TIME_DISCONNECT 2000
#define WLAN_WAIT_TIME_DISCONNECT 5000
#define WLAN_WAIT_TIME_STATS 800
#define WLAN_WAIT_TIME_POWER 800
#define WLAN_WAIT_TIME_COUNTRY 1000
Expand Down
28 changes: 14 additions & 14 deletions drivers/staging/qcacld-2.0/CORE/HDD/src/wlan_hdd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4127,7 +4127,8 @@ static VOS_STATUS hdd_parse_ese_beacon_req(tANI_U8 *pValue,
tCsrEseBeaconReq *pEseBcnReq)
{
tANI_U8 *inPtr = pValue;
int tempInt = 0;
uint8_t input = 0;
uint32_t tempInt = 0;
int j = 0, i = 0, v = 0;
char buf[32];

Expand All @@ -4150,11 +4151,11 @@ static VOS_STATUS hdd_parse_ese_beacon_req(tANI_U8 *pValue,
v = sscanf(inPtr, "%31s ", buf);
if (1 != v) return -EINVAL;

v = kstrtos32(buf, 10, &tempInt);
v = kstrtou8(buf, 10, &input);
if (v < 0) return -EINVAL;

tempInt = VOS_MIN(tempInt, SIR_ESE_MAX_MEAS_IE_REQS);
pEseBcnReq->numBcnReqIe = tempInt;
input = VOS_MIN(input, SIR_ESE_MAX_MEAS_IE_REQS);
pEseBcnReq->numBcnReqIe = input;

hddLog(LOG1, "Number of Bcn Req Ie fields: %d", pEseBcnReq->numBcnReqIe);

Expand All @@ -4175,24 +4176,24 @@ static VOS_STATUS hdd_parse_ese_beacon_req(tANI_U8 *pValue,
v = sscanf(inPtr, "%31s ", buf);
if (1 != v) return -EINVAL;

v = kstrtos32(buf, 10, &tempInt);
v = kstrtou32(buf, 10, &tempInt);
if (v < 0) return -EINVAL;

switch (i) {
case 0: /* Measurement token */
if (tempInt <= 0) {
if (!tempInt) {
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
"Invalid Measurement Token(%d)", tempInt);
"Invalid Measurement Token: %d", tempInt);
return -EINVAL;
}
pEseBcnReq->bcnReq[j].measurementToken = tempInt;
break;

case 1: /* Channel number */
if ((tempInt <= 0) ||
if ((!tempInt) ||
(tempInt > WNI_CFG_CURRENT_CHANNEL_STAMAX)) {
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
"Invalid Channel Number(%d)", tempInt);
"Invalid Channel Number: %d", tempInt);
return -EINVAL;
}
pEseBcnReq->bcnReq[j].channel = tempInt;
Expand All @@ -4202,19 +4203,18 @@ static VOS_STATUS hdd_parse_ese_beacon_req(tANI_U8 *pValue,
if ((tempInt < eSIR_PASSIVE_SCAN) ||
(tempInt > eSIR_BEACON_TABLE)) {
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
"Invalid Scan Mode(%d) Expected{0|1|2}", tempInt);
"Invalid Scan Mode: %d Expected{0|1|2}", tempInt);
return -EINVAL;
}
pEseBcnReq->bcnReq[j].scanMode= tempInt;
break;

case 3: /* Measurement duration */
if (((tempInt <= 0) &&
if (((!tempInt) &&
(pEseBcnReq->bcnReq[j].scanMode != eSIR_BEACON_TABLE)) ||
((tempInt < 0) &&
(pEseBcnReq->bcnReq[j].scanMode == eSIR_BEACON_TABLE))) {
((pEseBcnReq->bcnReq[j].scanMode == eSIR_BEACON_TABLE))) {
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
"Invalid Measurement Duration(%d)", tempInt);
"Invalid Measurement Duration: %d", tempInt);
return -EINVAL;
}
pEseBcnReq->bcnReq[j].measurementDuration = tempInt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ typedef struct sSirProbeRespBeacon
tDot11fIEVHTCaps VHTCaps;
tDot11fIEVHTOperation VHTOperation;
tDot11fIEVHTExtBssLoad VHTExtBssLoad;
tDot11fIEExtCap ExtCap;
tDot11fIEOperatingMode OperatingMode;
tANI_U8 WiderBWChanSwitchAnnPresent;
tDot11fIEWiderBWChanSwitchAnn WiderBWChanSwitchAnn;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ typedef struct sPESession // Added to Support BT-AMP
/* Supported NSS is intersection of self and peer NSS */
bool supported_nss_1x1;
bool add_bss_failed;
bool is_ext_caps_present;
} tPESession, *tpPESession;

/*-------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011-2015 The Linux Foundation. All rights reserved.
* Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
Expand Down Expand Up @@ -225,6 +225,9 @@ limExtractApCapability(tpAniSirGlobal pMac, tANI_U8 *pIE, tANI_U16 ieLen,
if (pBeaconStruct->countryInfoPresent)
psessionEntry->countryInfoPresent = TRUE;
}
/* Check if Extended caps are present in probe resp or not */
if (pBeaconStruct->ExtCap.present)
psessionEntry->is_ext_caps_present = true;
vos_mem_free(pBeaconStruct);
return;
} /****** end limExtractApCapability() ******/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2054,11 +2054,11 @@ limSendAssocReqMgmtFrame(tpAniSirGlobal pMac,

vos_mem_set( ( tANI_U8* )pFrm, sizeof( tDot11fAssocRequest ), 0 );

if (nAddIELen) {
if (nAddIELen && psessionEntry->is_ext_caps_present) {
vos_mem_set(( tANI_U8* )&extractedExtCap, sizeof( tDot11fIEExtCap ), 0);
nSirStatus = lim_strip_extcap_update_struct(pMac, pAddIE,
&nAddIELen,
&extractedExtCap );
&nAddIELen,
&extractedExtCap );
if(eSIR_SUCCESS != nSirStatus )
{
extractedExtCapFlag = eANI_BOOLEAN_FALSE;
Expand All @@ -2074,7 +2074,8 @@ limSendAssocReqMgmtFrame(tpAniSirGlobal pMac,
extractedExtCapFlag = lim_is_ext_cap_ie_present(p_ext_cap);
}
} else {
limLog(pMac, LOG1, FL("No additional IE for Assoc Request"));
limLog(pMac, LOG1,
FL("No addn IE or peer dosen't support addnIE for Assoc Req"));
extractedExtCapFlag = eANI_BOOLEAN_FALSE;
}

Expand Down Expand Up @@ -2215,8 +2216,8 @@ limSendAssocReqMgmtFrame(tpAniSirGlobal pMac,
isVHTEnabled = eANI_BOOLEAN_TRUE;
}
#endif

PopulateDot11fExtCap( pMac, isVHTEnabled, &pFrm->ExtCap, psessionEntry);
if (psessionEntry->is_ext_caps_present)
PopulateDot11fExtCap( pMac, isVHTEnabled, &pFrm->ExtCap, psessionEntry);

#if defined WLAN_FEATURE_VOWIFI_11R
if (psessionEntry->pLimJoinReq->is11Rconnection)
Expand Down Expand Up @@ -2685,8 +2686,9 @@ limSendReassocReqWithFTIEsMgmtFrame(tpAniSirGlobal pMac,
limLog( pMac, LOG1, FL("Populate VHT IEs in Re-Assoc Request"));
PopulateDot11fVHTCaps( pMac, psessionEntry, &frm.VHTCaps );
isVHTEnabled = eANI_BOOLEAN_TRUE;
PopulateDot11fExtCap(pMac, isVHTEnabled, &frm.ExtCap, psessionEntry);
}
if (psessionEntry->is_ext_caps_present)
PopulateDot11fExtCap(pMac, isVHTEnabled, &frm.ExtCap, psessionEntry);
#endif

nStatus = dot11fGetPackedReAssocRequestSize( pMac, &frm, &nPayload );
Expand Down Expand Up @@ -3117,7 +3119,8 @@ limSendReassocReqMgmtFrame(tpAniSirGlobal pMac,
}
#endif

PopulateDot11fExtCap(pMac, isVHTEnabled, &frm.ExtCap, psessionEntry);
if (psessionEntry->is_ext_caps_present)
PopulateDot11fExtCap(pMac, isVHTEnabled, &frm.ExtCap, psessionEntry);

nStatus = dot11fGetPackedReAssocRequestSize( pMac, &frm, &nPayload );
if ( DOT11F_FAILED( nStatus ) )
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/qcacld-2.0/CORE/SERVICES/WMA/wma.c
Original file line number Diff line number Diff line change
Expand Up @@ -8848,7 +8848,7 @@ VOS_STATUS wma_start_scan(tp_wma_handle wma_handle,
cmd->min_rest_time = WMA_ROAM_PREAUTH_REST_TIME;
cmd->max_rest_time = WMA_ROAM_PREAUTH_REST_TIME;
cmd->max_scan_time = WMA_ROAM_PREAUTH_MAX_SCAN_TIME;
cmd->scan_priority = WMI_SCAN_PRIORITY_HIGH;
cmd->scan_priority = WMI_SCAN_PRIORITY_VERY_HIGH;
adf_os_spin_lock_bh(&wma_handle->roam_preauth_lock);
cmd->scan_id = ( (cmd->scan_id & WMA_MAX_SCAN_ID) |
WMA_HOST_ROAM_SCAN_REQID_PREFIX);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3681,6 +3681,11 @@ sirParseBeaconIE(tpAniSirGlobal pMac,
pBeaconStruct->Vendor1IEPresent = pBies->Vendor1IE.present;
pBeaconStruct->Vendor2IEPresent = pBies->Vendor2IE.present;
pBeaconStruct->Vendor3IEPresent = pBies->Vendor3IE.present;
if (pBies->ExtCap.present) {
pBeaconStruct->ExtCap.present = 1;
vos_mem_copy( &pBeaconStruct->ExtCap, &pBies->ExtCap,
sizeof(tDot11fIEExtCap));
}

vos_mem_free(pBies);
return eSIR_SUCCESS;
Expand Down
21 changes: 12 additions & 9 deletions drivers/staging/qcacld-2.0/CORE/UTILS/PKTLOG/pktlog_ac.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
* Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
Expand Down Expand Up @@ -312,7 +312,7 @@ pktlog_enable(struct ol_softc *scn, int32_t log_state)
if (!scn) {
printk("%s: Invalid scn context\n", __func__);
ASSERT(0);
return -1;
return A_ERROR;
}

txrx_pdev = scn->pdev_txrx_handle;
Expand All @@ -326,7 +326,7 @@ pktlog_enable(struct ol_softc *scn, int32_t log_state)
if (!pl_dev) {
printk("%s: Invalid pktlog context\n", __func__);
ASSERT(0);
return -1;
return A_ERROR;
}

pl_info = pl_dev->pl_info;
Expand All @@ -345,7 +345,7 @@ pktlog_enable(struct ol_softc *scn, int32_t log_state)
if (!pl_info->buf) {
printk("%s: pktlog buf alloc failed\n", __func__);
ASSERT(0);
return -1;
return A_ERROR;
}
}

Expand All @@ -365,26 +365,29 @@ pktlog_enable(struct ol_softc *scn, int32_t log_state)
if (wdi_pktlog_subscribe(txrx_pdev, log_state)) {
printk("Unable to subscribe to the WDI %s\n",
__func__);
return -1;
return A_ERROR;
}
/* WMI command to enable pktlog on the firmware */
if (pktlog_enable_tgt(scn, log_state)) {
printk("Device cannot be enabled, %s\n", __func__);
return -1;
adf_os_print("Device cannot be enabled, %s\n", __func__);
wdi_pktlog_unsubscribe(txrx_pdev, pl_info->log_state);
return A_ERROR;
} else {
pl_dev->tgt_pktlog_enabled = true;
}
} else if (!log_state && pl_dev->tgt_pktlog_enabled) {
pl_dev->pl_funcs->pktlog_disable(scn);
pl_dev->tgt_pktlog_enabled = false;
if (wdi_pktlog_unsubscribe(txrx_pdev, pl_info->log_state)) {
printk("Cannot unsubscribe pktlog from the WDI\n");
return -1;
adf_os_print("%s: Cannot unsubscribe pktlog from the WDI\n",
__func__);
return A_ERROR;
}
}

pl_info->log_state = log_state;
return 0;

}

int
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,11 @@ process_tx_info(struct ol_txrx_pdev_t *txrx_pdev,
>> TX_DESC_ID_HIGH_SHIFT);
msdu_id += 1;
}
if (tx_desc_id >= ol_cfg_target_tx_credit(txrx_pdev->ctrl_pdev)) {
adf_os_print("%s: drop due to invalid msdu id = %x\n",
__func__, tx_desc_id);
return A_ERROR;
}
tx_desc = ol_tx_desc_find(txrx_pdev, tx_desc_id);
adf_os_assert(tx_desc);
netbuf = tx_desc->netbuf;
Expand All @@ -385,7 +390,7 @@ process_tx_info(struct ol_txrx_pdev_t *txrx_pdev,

if (len < (2 * IEEE80211_ADDR_LEN)) {
adf_os_print("TX frame does not have a valid address\n");
return -1;
return A_ERROR;
}
/* Adding header information for the TX data frames */
vdev_id = (u_int8_t)(*(htt_tx_desc +
Expand Down