Skip to content

Commit 665bd4e

Browse files
mikeNGniclimcy
authored andcommitted
staging: prima: Update to LA.BR.1.2.9_rb1.11
Change-Id: I8a28aba823ee1bff6db9e3a5a4ef2a345f5b0c0f
1 parent fe9ceda commit 665bd4e

28 files changed

+870
-305
lines changed

drivers/staging/prima/CORE/HDD/inc/wlan_hdd_cfg.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,14 @@ typedef enum
994994
#define CFG_PER_ROAM_FULL_SCAN_RSSI_THRESHOLD_MIN (5)
995995
#define CFG_PER_ROAM_FULL_SCAN_RSSI_THRESHOLD_MAX (50)
996996
#define CFG_PER_ROAM_FULL_SCAN_RSSI_THRESHOLD_DEFAULT (10)
997+
998+
/*
999+
* Minimum RSSI value below which candidate will not be eligible for roam
1000+
*/
1001+
#define CFG_PER_ROAM_BAD_RSSI "gPERMinRssiThresholdForRoam"
1002+
#define CFG_PER_ROAM_BAD_RSSI_MIN (-100)
1003+
#define CFG_PER_ROAM_BAD_RSSI_MAX (-40)
1004+
#define CFG_PER_ROAM_BAD_RSSI_DEFAULT (-80)
9971005
#endif
9981006

9991007
#define CFG_QOS_WMM_PKT_CLASSIFY_BASIS_NAME "PktClassificationBasis" // DSCP or 802.1Q
@@ -2863,6 +2871,10 @@ This feature requires the dependent cfg.ini "gRoamPrefer5GHz" set to 1 */
28632871
#define CFG_SAP_PROBE_RESP_OFFLOAD_MAX (1)
28642872
#define CFG_SAP_PROBE_RESP_OFFLOAD_DEFAULT (1)
28652873

2874+
#define CFG_CH_AVOID_SAP_RESTART_NAME "sap_ch_avoid_restart"
2875+
#define CFG_CH_AVOID_SAP_RESTART_MIN (0)
2876+
#define CFG_CH_AVOID_SAP_RESTART_MAX (1)
2877+
#define CFG_CH_AVOID_SAP_RESTART_DEFAULT (1)
28662878

28672879
/*---------------------------------------------------------------------------
28682880
Type declarations
@@ -3086,6 +3098,7 @@ typedef struct
30863098
v_BOOL_t isPERRoamRxPathEnabled;
30873099
v_BOOL_t isPERRoamCCAEnabled;
30883100
v_S15_t PERRoamFullScanThreshold;
3101+
v_S15_t PERMinRssiThresholdForRoam;
30893102
v_U16_t rateUpThreshold;
30903103
v_U16_t rateDownThreshold;
30913104
v_U16_t PERroamTriggerPercent;
@@ -3423,6 +3436,7 @@ typedef struct
34233436
uint32_t edca_be_aifs;
34243437
v_BOOL_t sendMgmtPktViaWQ5;
34253438
v_BOOL_t sap_probe_resp_offload;
3439+
v_BOOL_t sap_restrt_ch_avoid;
34263440
} hdd_config_t;
34273441

34283442
/*---------------------------------------------------------------------------

drivers/staging/prima/CORE/HDD/inc/wlan_hdd_cfg80211.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,4 +1436,19 @@ struct cfg80211_bss* wlan_hdd_cfg80211_update_bss_list(
14361436

14371437
struct cfg80211_bss *wlan_hdd_cfg80211_inform_bss_frame(hdd_adapter_t *pAdapter,
14381438
tSirBssDescription *bss_desc);
1439+
#ifdef CFG80211_DEL_STA_V2
1440+
int wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
1441+
struct net_device *dev,
1442+
struct station_del_parameters *param);
1443+
#else
1444+
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)) || defined(WITH_BACKPORTS)
1445+
int wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
1446+
struct net_device *dev, const u8 *mac);
1447+
#else
1448+
int wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
1449+
struct net_device *dev, u8 *mac);
1450+
#endif
1451+
#endif
1452+
1453+
int wlan_hdd_cfg80211_update_apies(hdd_adapter_t *pHostapdAdapter);
14391454
#endif

drivers/staging/prima/CORE/HDD/inc/wlan_hdd_hostapd.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,26 @@ int hdd_softap_unpackIE( tHalHandle halHandle,
8787
u_int16_t gen_ie_len,
8888
u_int8_t *gen_ie );
8989

90+
/**
91+
* hdd_change_ch_avoidance_status() - update is_ch_avoid_in_progress flag
92+
*
93+
* @hdd_ctx: pointer to hdd context
94+
* @value: value to set
95+
*
96+
* This function will change the value of is_ch_avoid_in_progress
97+
*
98+
* Return: none
99+
*/
100+
static inline void
101+
hdd_change_ch_avoidance_status(hdd_context_t *hdd_ctx,
102+
bool value)
103+
{
104+
vos_spin_lock_acquire(&hdd_ctx->sap_update_info_lock);
105+
hdd_ctx->is_ch_avoid_in_progress = value;
106+
vos_spin_lock_release(&hdd_ctx->sap_update_info_lock);
107+
}
108+
109+
90110
VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCallback);
91111
VOS_STATUS hdd_init_ap_mode( hdd_adapter_t *pAdapter );
92112
void hdd_set_ap_ops( struct net_device *pWlanHostapdDev );

drivers/staging/prima/CORE/HDD/inc/wlan_hdd_main.h

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,8 +540,14 @@ typedef struct hdd_wapi_info_s hdd_wapi_info_t;
540540
#endif /* FEATURE_WLAN_WAPI */
541541

542542
typedef struct beacon_data_s {
543-
u8 *head, *tail;
544-
int head_len, tail_len;
543+
u8 *head;
544+
u8 *tail;
545+
u8 *proberesp_ies;
546+
u8 *assocresp_ies;
547+
int head_len;
548+
int tail_len;
549+
int proberesp_ies_len;
550+
int assocresp_ies_len;
545551
int dtim_period;
546552
} beacon_data_t;
547553

@@ -1451,6 +1457,11 @@ struct hdd_context_s
14511457
/* Lock to avoid race condtion during start/stop bss*/
14521458
struct mutex sap_lock;
14531459

1460+
struct work_struct sap_start_work;
1461+
bool is_sap_restart_required;
1462+
bool is_ch_avoid_in_progress;
1463+
vos_spin_lock_t sap_update_info_lock;
1464+
14541465
/* Lock to avoid race condtion between ROC timeout and
14551466
cancel callbacks*/
14561467
struct mutex roc_lock;
@@ -1721,6 +1732,14 @@ VOS_STATUS hdd_stop_all_adapters( hdd_context_t *pHddCtx );
17211732
VOS_STATUS hdd_reset_all_adapters( hdd_context_t *pHddCtx );
17221733
VOS_STATUS hdd_start_all_adapters( hdd_context_t *pHddCtx );
17231734
VOS_STATUS hdd_reconnect_all_adapters( hdd_context_t *pHddCtx );
1735+
struct cfg80211_bss* hdd_get_bss_entry(struct wiphy *wiphy,
1736+
struct ieee80211_channel *channel,
1737+
const u8 *bssid,
1738+
const u8 *ssid, size_t ssid_len);
1739+
void hdd_connect_result(struct net_device *dev, const u8 *bssid,
1740+
tCsrRoamInfo *roam_info, const u8 *req_ie,
1741+
size_t req_ie_len, const u8 * resp_ie,
1742+
size_t resp_ie_len, u16 status, gfp_t gfp);
17241743
void hdd_dump_concurrency_info(hdd_context_t *pHddCtx);
17251744
hdd_adapter_t * hdd_get_adapter_by_name( hdd_context_t *pHddCtx, tANI_U8 *name );
17261745
hdd_adapter_t * hdd_get_adapter_by_macaddr( hdd_context_t *pHddCtx, tSirMacAddr macAddr );

drivers/staging/prima/CORE/HDD/inc/wlan_hdd_wmm.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
2+
* Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
33
*
44
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
55
*
@@ -407,4 +407,12 @@ hdd_wlan_wmm_status_e hdd_wmm_checkts( hdd_adapter_t* pAdapter,
407407
===========================================================================*/
408408
VOS_STATUS hdd_wmm_adapter_clear( hdd_adapter_t *pAdapter );
409409

410+
/**============================================================================
411+
@brief hdd_log_ip_addr() - Function to log IP header src and dst address
412+
@param pAdapter : [in] pointer to os packet
413+
414+
@return : None
415+
===========================================================================*/
416+
void hdd_log_ip_addr(struct sk_buff *skb);
417+
410418
#endif /* #ifndef _WLAN_HDD_WMM_H */

drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.c

Lines changed: 41 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1500,7 +1500,10 @@ static void hdd_SendReAssocEvent(struct net_device *dev, hdd_adapter_t *pAdapter
15001500
u8 *pFTAssocRsp = NULL;
15011501
v_U8_t *rspRsnIe = kmalloc(IW_GENERIC_IE_MAX, GFP_KERNEL);
15021502
tANI_U32 rspRsnLength = 0;
1503+
struct cfg80211_bss* bss;
1504+
tCsrRoamConnectedProfile roam_profile;
15031505
struct ieee80211_channel *chan;
1506+
tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(pAdapter);
15041507

15051508
if (!rspRsnIe) {
15061509
hddLog(LOGE, "%s: Unable to allocate RSN IE", __func__);
@@ -1534,8 +1537,15 @@ static void hdd_SendReAssocEvent(struct net_device *dev, hdd_adapter_t *pAdapter
15341537
memcpy(rspRsnIe, pFTAssocRsp, len);
15351538
memset(rspRsnIe + len, 0, IW_GENERIC_IE_MAX - len);
15361539

1537-
chan = ieee80211_get_channel(pAdapter->wdev.wiphy, (int) pCsrRoamInfo->pBssDesc->channelId);
1538-
cfg80211_roamed(dev,chan,pCsrRoamInfo->bssid,
1540+
chan = ieee80211_get_channel(pAdapter->wdev.wiphy,
1541+
(int) pCsrRoamInfo->pBssDesc->channelId);
1542+
vos_mem_zero(&roam_profile, sizeof(tCsrRoamConnectedProfile));
1543+
sme_RoamGetConnectProfile(hHal, pAdapter->sessionId, &roam_profile);
1544+
bss = hdd_get_bss_entry(pAdapter->wdev.wiphy,
1545+
chan, pCsrRoamInfo->bssid,
1546+
&roam_profile.SSID.ssId[0],
1547+
roam_profile.SSID.length);
1548+
cfg80211_roamed_bss(dev, bss,
15391549
reqRsnIe, reqRsnLength,
15401550
rspRsnIe, rspRsnLength,GFP_KERNEL);
15411551

@@ -1780,6 +1790,8 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs
17801790
{
17811791
if ( !hddDisconInProgress )
17821792
{
1793+
struct cfg80211_bss *roam_bss;
1794+
17831795
hddLog(LOG1, "%s ft_carrier_on is %d, sending roamed "
17841796
"indication", __FUNCTION__, ft_carrier_on);
17851797
chan = ieee80211_get_channel(pAdapter->wdev.wiphy,
@@ -1791,9 +1803,14 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs
17911803
{
17921804
vos_record_roam_event(e_HDD_SEND_REASSOC_RSP, NULL, 0);
17931805
}
1794-
cfg80211_roamed(dev,chan, pRoamInfo->bssid,
1795-
pFTAssocReq, assocReqlen, pFTAssocRsp, assocRsplen,
1796-
GFP_KERNEL);
1806+
roam_bss = hdd_get_bss_entry(pAdapter->wdev.wiphy,
1807+
chan, pRoamInfo->bssid,
1808+
pRoamInfo->u.pConnectedProfile->SSID.ssId,
1809+
pRoamInfo->u.pConnectedProfile->SSID.length);
1810+
cfg80211_roamed_bss(dev, roam_bss,
1811+
pFTAssocReq, assocReqlen,
1812+
pFTAssocRsp, assocRsplen,
1813+
GFP_KERNEL);
17971814
}
17981815
if (sme_GetFTPTKState(WLAN_HDD_GET_HAL_CTX(pAdapter)))
17991816
{
@@ -1815,11 +1832,11 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs
18151832
{
18161833
hddLog(LOG1, "%s ft_carrier_on is %d, sending connect "
18171834
"indication", __FUNCTION__, ft_carrier_on);
1818-
cfg80211_connect_result(dev, pRoamInfo->bssid,
1819-
pFTAssocReq, assocReqlen,
1820-
pFTAssocRsp, assocRsplen,
1821-
WLAN_STATUS_SUCCESS,
1822-
GFP_KERNEL);
1835+
hdd_connect_result(dev, pRoamInfo->bssid, pRoamInfo,
1836+
pFTAssocReq, assocReqlen,
1837+
pFTAssocRsp, assocRsplen,
1838+
WLAN_STATUS_SUCCESS,
1839+
GFP_KERNEL);
18231840
}
18241841
}
18251842
else
@@ -1857,13 +1874,13 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs
18571874
" result:%d and Status:%d",
18581875
__func__, MAC_ADDR_ARRAY(pRoamInfo->bssid),
18591876
roamResult, roamStatus);
1860-
18611877
/* inform connect result to nl80211 */
1862-
cfg80211_connect_result(dev, pRoamInfo->bssid,
1863-
reqRsnIe, reqRsnLength,
1864-
rspRsnIe, rspRsnLength,
1865-
WLAN_STATUS_SUCCESS,
1866-
GFP_KERNEL);
1878+
hdd_connect_result(dev, pRoamInfo->bssid,
1879+
pRoamInfo,
1880+
reqRsnIe, reqRsnLength,
1881+
rspRsnIe, rspRsnLength,
1882+
WLAN_STATUS_SUCCESS,
1883+
GFP_KERNEL);
18671884
}
18681885
}
18691886
}
@@ -2056,30 +2073,30 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs
20562073
if ( eCSR_ROAM_RESULT_ASSOC_FAIL_CON_CHANNEL == roamResult )
20572074
{
20582075
if (pRoamInfo)
2059-
cfg80211_connect_result ( dev, pRoamInfo->bssid,
2076+
hdd_connect_result(dev, pRoamInfo->bssid, NULL,
20602077
NULL, 0, NULL, 0,
20612078
WLAN_STATUS_ASSOC_DENIED_UNSPEC,
2062-
GFP_KERNEL );
2079+
GFP_KERNEL);
20632080
else
2064-
cfg80211_connect_result ( dev, pWextState->req_bssId,
2081+
hdd_connect_result(dev, pWextState->req_bssId, NULL,
20652082
NULL, 0, NULL, 0,
20662083
WLAN_STATUS_ASSOC_DENIED_UNSPEC,
2067-
GFP_KERNEL );
2084+
GFP_KERNEL);
20682085
}
20692086
else
20702087
{
20712088
if (pRoamInfo)
2072-
cfg80211_connect_result ( dev, pRoamInfo->bssid,
2089+
hdd_connect_result(dev, pRoamInfo->bssid, NULL,
20732090
NULL, 0, NULL, 0,
20742091
pRoamInfo->reasonCode ?
20752092
pRoamInfo->reasonCode :
20762093
WLAN_STATUS_UNSPECIFIED_FAILURE,
2077-
GFP_KERNEL );
2094+
GFP_KERNEL);
20782095
else
2079-
cfg80211_connect_result ( dev, pWextState->req_bssId,
2096+
hdd_connect_result(dev, pWextState->req_bssId, NULL,
20802097
NULL, 0, NULL, 0,
20812098
WLAN_STATUS_UNSPECIFIED_FAILURE,
2082-
GFP_KERNEL );
2099+
GFP_KERNEL);
20832100
}
20842101
/*Clear the roam profile*/
20852102
hdd_clearRoamProfileIe( pAdapter );

drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2875,6 +2875,13 @@ REG_VARIABLE( CFG_EXTSCAN_ENABLE, WLAN_PARAM_Integer,
28752875
CFG_PER_ROAM_FULL_SCAN_RSSI_THRESHOLD_DEFAULT,
28762876
CFG_PER_ROAM_FULL_SCAN_RSSI_THRESHOLD_MIN,
28772877
CFG_PER_ROAM_FULL_SCAN_RSSI_THRESHOLD_MAX),
2878+
2879+
REG_VARIABLE(CFG_PER_ROAM_BAD_RSSI, WLAN_PARAM_SignedInteger,
2880+
hdd_config_t, PERMinRssiThresholdForRoam,
2881+
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
2882+
CFG_PER_ROAM_BAD_RSSI_DEFAULT,
2883+
CFG_PER_ROAM_BAD_RSSI_MIN,
2884+
CFG_PER_ROAM_BAD_RSSI_MAX),
28782885
#endif
28792886

28802887
REG_VARIABLE( CFG_ENABLE_ADAPT_RX_DRAIN_NAME, WLAN_PARAM_Integer,
@@ -3734,6 +3741,13 @@ REG_VARIABLE( CFG_EXTSCAN_ENABLE, WLAN_PARAM_Integer,
37343741
CFG_SAP_PROBE_RESP_OFFLOAD_DEFAULT,
37353742
CFG_SAP_PROBE_RESP_OFFLOAD_MIN,
37363743
CFG_SAP_PROBE_RESP_OFFLOAD_MAX),
3744+
3745+
REG_VARIABLE(CFG_CH_AVOID_SAP_RESTART_NAME, WLAN_PARAM_Integer,
3746+
hdd_config_t, sap_restrt_ch_avoid,
3747+
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
3748+
CFG_CH_AVOID_SAP_RESTART_DEFAULT,
3749+
CFG_CH_AVOID_SAP_RESTART_MIN,
3750+
CFG_CH_AVOID_SAP_RESTART_MAX),
37373751
};
37383752

37393753
/*
@@ -4275,6 +4289,10 @@ static void print_hdd_cfg(hdd_context_t *pHddCtx)
42754289
"Name = [gPERRoamFullScanThreshold] Value = [%u] ",
42764290
pHddCtx->cfg_ini->PERRoamFullScanThreshold);
42774291

4292+
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH,
4293+
"Name = [gPERMinRssiThresholdForRoam] Value = [%d] ",
4294+
pHddCtx->cfg_ini->PERMinRssiThresholdForRoam);
4295+
42784296
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH,
42794297
"Name = [gPERRoamScanInterval] Value = [%lu] ",
42804298
(long unsigned int)pHddCtx->cfg_ini->waitPeriodForNextPERScan);
@@ -4291,6 +4309,9 @@ static void print_hdd_cfg(hdd_context_t *pHddCtx)
42914309
"Name = [gPERRoamUpThresholdRate] Value = [%u] ",
42924310
pHddCtx->cfg_ini->rateUpThreshold);
42934311
#endif
4312+
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH,
4313+
"Name = [sap_ch_avoid_restart] Value = [%u] ",
4314+
pHddCtx->cfg_ini->sap_restrt_ch_avoid);
42944315
}
42954316

42964317

0 commit comments

Comments
 (0)