From 399f07d2b57a8c6c3733cdbedc908c3b5a9644d1 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Sat, 29 Mar 2014 12:34:45 -0700 Subject: wlan: qcacld: hdd: Fix unused-function warnings When GCC 4.7 was first introduced to Android, the initial version of the compiler was warning about things it should not have, and hence some warnings were suppressed, including unused-function warnings. The compiler now seems to be correctly warning only about bad behavior, so clean up the unused functions in HDD in preparation for re-enabling unused-function warnings in the compiler. Change-Id: I6599dca99e37ab56a48e8b76408c4e928b254b69 CRs-fixed: 640842 --- CORE/HDD/src/wlan_hdd_early_suspend.c | 4 ++++ CORE/HDD/src/wlan_hdd_main.c | 4 ++++ CORE/HDD/src/wlan_hdd_tdls.c | 11 +++++++++-- CORE/HDD/src/wlan_hdd_wmm.c | 2 ++ 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/CORE/HDD/src/wlan_hdd_early_suspend.c b/CORE/HDD/src/wlan_hdd_early_suspend.c index f555dc13d4d4..74587e762a4f 100644 --- a/CORE/HDD/src/wlan_hdd_early_suspend.c +++ b/CORE/HDD/src/wlan_hdd_early_suspend.c @@ -111,8 +111,10 @@ extern void hdd_wlan_initial_scan(hdd_context_t *pHddCtx); extern struct notifier_block hdd_netdev_notifier; extern tVOS_CON_MODE hdd_get_conparam ( void ); +#ifdef QCA_WIFI_ISOC static struct timer_list ssr_timer; static bool ssr_timer_started; +#endif /* QCA_WIFI_ISOC */ //Callback invoked by PMC to report status of standby request void hdd_suspend_standby_cbk (void *callbackContext, eHalStatus status) @@ -1439,6 +1441,7 @@ void hdd_set_wlan_suspend_mode(bool suspend) hdd_resume_wlan(); } +#ifdef QCA_WIFI_ISOC static void hdd_ssr_timer_init(void) { init_timer(&ssr_timer); @@ -1476,6 +1479,7 @@ static void hdd_ssr_timer_start(int msec) add_timer(&ssr_timer); ssr_timer_started = true; } +#endif /* QCA_WIFI_ISOC */ /* the HDD interface to WLAN driver shutdown, * the primary shutdown function in SSR diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index 4a5a2169662c..c62dc3a0914d 100644 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -10625,11 +10625,13 @@ static int fwpath_changed_handler(const char *kmessage, return param_set_copystring(kmessage, kp); } +#if !(defined(QCA_WIFI_2_0) && defined(QCA_WIFI_FTM) && !defined(QCA_WIFI_ISOC)) static int con_mode_handler(const char *kmessage, struct kernel_param *kp) { return param_set_int(kmessage, kp); } +#endif #else /* #ifdef MODULE */ /**--------------------------------------------------------------------------- @@ -10683,6 +10685,7 @@ static int fwpath_changed_handler(const char *kmessage, return ret; } +#if !(defined(QCA_WIFI_2_0) && defined(QCA_WIFI_FTM) && !defined(QCA_WIFI_ISOC)) /**--------------------------------------------------------------------------- \brief con_mode_handler() - @@ -10705,6 +10708,7 @@ static int con_mode_handler(const char *kmessage, struct kernel_param *kp) ret = kickstart_driver(); return ret; } +#endif #endif /* #ifdef MODULE */ /**--------------------------------------------------------------------------- diff --git a/CORE/HDD/src/wlan_hdd_tdls.c b/CORE/HDD/src/wlan_hdd_tdls.c index 9cf1b0006336..c719258bb2a7 100644 --- a/CORE/HDD/src/wlan_hdd_tdls.c +++ b/CORE/HDD/src/wlan_hdd_tdls.c @@ -45,7 +45,10 @@ #include "wlan_hdd_cfg80211.h" +#ifdef TDLS_USE_SEPARATE_DISCOVERY_TIMER static tANI_S32 wlan_hdd_get_tdls_discovery_peer_cnt(tdlsCtx_t *pHddTdlsCtx); +#endif /* TDLS_USE_SEPARATE_DISCOVERY_TIMER */ + static tANI_S32 wlan_hdd_tdls_peer_reset_discovery_processed(tdlsCtx_t *pHddTdlsCtx); static void wlan_hdd_tdls_timers_destroy(tdlsCtx_t *pHddTdlsCtx); static void wlan_hdd_tdls_peer_timers_destroy(tdlsCtx_t *pHddTdlsCtx); @@ -84,6 +87,7 @@ void wlan_hdd_tdls_pre_setup_init_work(tdlsCtx_t * pHddTdlsCtx, } #endif +#ifdef TDLS_USE_SEPARATE_DISCOVERY_TIMER static v_VOID_t wlan_hdd_tdls_start_peer_discover_timer(tdlsCtx_t *pHddTdlsCtx, tANI_BOOLEAN mutexLock, v_U32_t discoveryExpiry) @@ -122,7 +126,6 @@ static v_VOID_t wlan_hdd_tdls_start_peer_discover_timer(tdlsCtx_t *pHddTdlsCtx, return; } -#ifdef TDLS_USE_SEPARATE_DISCOVERY_TIMER static v_VOID_t wlan_hdd_tdls_discover_peer_cb( v_PVOID_t userData ) { int i; @@ -241,7 +244,7 @@ done: mutex_unlock(&pHddCtx->tdls_lock); return; } -#endif +#endif /* TDLS_USE_SEPARATE_DISCOVERY_TIMER */ #ifndef QCA_WIFI_2_0 static v_VOID_t wlan_hdd_tdls_update_peer_cb( v_PVOID_t userData ) @@ -395,6 +398,7 @@ next_peer: } #endif +#ifndef QCA_WIFI_2_0 static v_VOID_t wlan_hdd_tdls_idle_cb( v_PVOID_t userData ) { #ifdef CONFIG_TDLS_IMPLICIT @@ -452,6 +456,7 @@ static v_VOID_t wlan_hdd_tdls_idle_cb( v_PVOID_t userData ) mutex_unlock(&pHddCtx->tdls_lock); #endif } +#endif /* QCA_WIFI_2_0 */ static v_VOID_t wlan_hdd_tdls_discovery_timeout_peer_cb(v_PVOID_t userData) { @@ -1548,6 +1553,7 @@ static tANI_S32 wlan_hdd_tdls_peer_reset_discovery_processed(tdlsCtx_t *pHddTdls return 0; } +#ifdef TDLS_USE_SEPARATE_DISCOVERY_TIMER static tANI_S32 wlan_hdd_get_tdls_discovery_peer_cnt(tdlsCtx_t *pHddTdlsCtx) { int i; @@ -1572,6 +1578,7 @@ static tANI_S32 wlan_hdd_get_tdls_discovery_peer_cnt(tdlsCtx_t *pHddTdlsCtx) } return discovery_peer_cnt; } +#endif /* TDLS_USE_SEPARATE_DISCOVERY_TIMER */ tANI_U16 wlan_hdd_tdlsConnectedPeers(hdd_adapter_t *pAdapter) { diff --git a/CORE/HDD/src/wlan_hdd_wmm.c b/CORE/HDD/src/wlan_hdd_wmm.c index 493ab1beb868..38564e274d97 100644 --- a/CORE/HDD/src/wlan_hdd_wmm.c +++ b/CORE/HDD/src/wlan_hdd_wmm.c @@ -387,6 +387,7 @@ static void hdd_wmm_notify_app (hdd_wmm_qos_context_t* pQosContext) } +#ifndef QCA_WIFI_2_0 /** @brief hdd_wmm_is_access_allowed() - function which determines if access is allowed for the given AC. this is designed to be called during SME @@ -439,6 +440,7 @@ static v_BOOL_t hdd_wmm_is_access_allowed(hdd_adapter_t* pAdapter, // we meet all of the criteria for access return VOS_TRUE; } +#endif /* QCA_WIFI_2_0 */ #ifdef FEATURE_WLAN_ESE /** -- cgit v1.2.3 From 1add386d506e47c9235dfda0c97f024f0657ba80 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Sat, 29 Mar 2014 12:43:10 -0700 Subject: wlan: qcacld: lim: Fix unused-function warnings When GCC 4.7 was first introduced to Android, the initial version of the compiler was warning about things it should not have, and hence some warnings were suppressed, including unused-function warnings. The compiler now seems to be correctly warning only about bad behavior, so clean up the unused functions in LIM in preparation for re-enabling unused-function warnings in the compiler. Change-Id: Idc1058262f9bfd197a2b51116844c85371e9c3fc CRs-fixed: 640842 --- CORE/MAC/src/pe/lim/limLogDump.c | 4 +++- CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CORE/MAC/src/pe/lim/limLogDump.c b/CORE/MAC/src/pe/lim/limLogDump.c index 75b43e0c7b8b..69b89ec90323 100644 --- a/CORE/MAC/src/pe/lim/limLogDump.c +++ b/CORE/MAC/src/pe/lim/limLogDump.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -2436,6 +2436,7 @@ dump_send_plm_start(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, } #endif +#ifndef QCA_WIFI_2_0 /* API to fill Rate Info based on mac efficiency * arg 1: mac efficiency to be used to calculate mac thorughput for a given rate index * arg 2: starting rateIndex to apply the macEfficiency to @@ -2448,6 +2449,7 @@ dump_limRateInfoBasedOnMacEff(tpAniSirGlobal pMac, tANI_U32 arg1, tANI_U32 arg2, WDTS_FillRateInfo((tANI_U8)(arg1), (tANI_U16)(arg2), (tANI_U16)(arg3)); return p; } +#endif /* QCA_WIFI_2_0 */ static tDumpFuncEntry limMenuDumpTable[] = { {0, "PE (300-499)", NULL}, diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c index 31bd56c11ea4..43f1e604bb7a 100644 --- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c +++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c @@ -107,7 +107,6 @@ static void limProcessSmeChannelChangeRequest(tpAniSirGlobal pMac, tANI_U32 *pMsg); static void limProcessSmeStartBeaconReq(tpAniSirGlobal pMac, tANI_U32 *pMsg); -static void limProcessSmeDfsCacIndication(tpAniSirGlobal pMac, tANI_U32 *pMsg); static void limProcessSmeDfsCsaIeRequest(tpAniSirGlobal pMac, tANI_U32 *pMsg); void __limProcessSmeAssocCnfNew(tpAniSirGlobal, tANI_U32, tANI_U32 *); -- cgit v1.2.3 From fa7d759eba0207775461914df4e5c1f1c82f81ae Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Sat, 29 Mar 2014 12:45:03 -0700 Subject: wlan: qcacld: dfs: Fix unused-function warnings When GCC 4.7 was first introduced to Android, the initial version of the compiler was warning about things it should not have, and hence some warnings were suppressed, including unused-function warnings. The compiler now seems to be correctly warning only about bad behavior, so clean up the unused functions in DFS in preparation for re-enabling unused-function warnings in the compiler. Change-Id: I86313274c22181db71d7d74313c427bf0a233bec CRs-fixed: 640842 --- CORE/SERVICES/DFS/src/dfs.c | 5 +++-- CORE/SERVICES/DFS/src/dfs_process_phyerr.c | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CORE/SERVICES/DFS/src/dfs.c b/CORE/SERVICES/DFS/src/dfs.c index c8d40d5b0049..e4f4bfc34bfa 100644 --- a/CORE/SERVICES/DFS/src/dfs.c +++ b/CORE/SERVICES/DFS/src/dfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2013 The Linux Foundation. All rights reserved. + * Copyright (c) 2002-2014 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -78,6 +78,7 @@ int domainoverride=DFS_UNINIT_DOMAIN; int usenol=1; u_int32_t dfs_debug_level=ATH_DEBUG_DFS; +#if 0 /* the code to call this is curently commented-out below */ /* * Mark a channel as having interference detected upon it. * @@ -126,7 +127,7 @@ dfs_channel_mark_radar(struct ath_dfs *dfs, struct ieee80211_channel *chan) dfs_nol_update(dfs); } } - +#endif /* #if 0 */ static OS_TIMER_FUNC(dfs_task) { diff --git a/CORE/SERVICES/DFS/src/dfs_process_phyerr.c b/CORE/SERVICES/DFS/src/dfs_process_phyerr.c index 489241c88b0c..49a13a3be086 100644 --- a/CORE/SERVICES/DFS/src/dfs_process_phyerr.c +++ b/CORE/SERVICES/DFS/src/dfs_process_phyerr.c @@ -461,6 +461,7 @@ dfs_process_phyerr_merlin(struct ath_dfs *dfs, void *buf, static void dump_phyerr_contents(const char *d, int len) { +#ifdef CONFIG_ENABLE_DUMP_PHYERR_CONTENTS int i, n, bufsize = 64; /* @@ -495,6 +496,7 @@ dump_phyerr_contents(const char *d, int len) */ if (n != 0) VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO, "%s: %s\n", __func__, buf); +#endif /* def CONFIG_ENABLE_DUMP_PHYERR_CONTENTS */ } void @@ -515,7 +517,7 @@ dfs_process_phyerr(struct ieee80211com *ic, void *buf, u_int16_t datalen, } dfs->dfs_phyerr_count++; - //dump_phyerr_contents(buf, datalen); + dump_phyerr_contents(buf, datalen); /* * XXX The combined_rssi_ok support has been removed. * This was only clear for Owl. @@ -535,7 +537,7 @@ dfs_process_phyerr(struct ieee80211com *ic, void *buf, u_int16_t datalen, * start queueing data for new channel. (EV74162) */ if (dfs->dfs_debug_mask & ATH_DEBUG_DFS_PHYERR_PKT) - //dump_phyerr_contents(buf, datalen); + dump_phyerr_contents(buf, datalen); if (IEEE80211_IS_CHAN_RADAR(chan)) { DFS_DPRINTK(dfs, ATH_DEBUG_DFS1, -- cgit v1.2.3 From 504a6b45f5cc905a7d5908ef96ed28c3c98d35f9 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Sat, 29 Mar 2014 12:46:13 -0700 Subject: wlan: qcacld: wma: Fix unused-function warnings When GCC 4.7 was first introduced to Android, the initial version of the compiler was warning about things it should not have, and hence some warnings were suppressed, including unused-function warnings. The compiler now seems to be correctly warning only about bad behavior, so clean up the unused functions in WMA in preparation for re-enabling unused-function warnings in the compiler. Change-Id: I72fa8e2e51366164845ec8ee5cb41e0985f5be90 CRs-fixed: 640842 --- CORE/SERVICES/WMA/wma.c | 64 ------------------------------------------------- 1 file changed, 64 deletions(-) diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index 3ac5c64d21c9..58c2f6ae8005 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -160,8 +160,6 @@ static void wma_send_msg(tp_wma_handle wma_handle, u_int16_t msg_type, void *body_ptr, u_int32_t body_val); #ifdef QCA_IBSS_SUPPORT -static void wma_send_beacon_tmpl(WMA_HANDLE handle, - u_int8_t vdev_id); static void wma_data_tx_ack_comp_hdlr(void *wma_context, adf_nbuf_t netbuf, int32_t status); @@ -201,7 +199,6 @@ wma_process_ftm_command(tp_wma_handle wma_handle, /*DFS Attach*/ struct ieee80211com* wma_dfs_attach(struct ieee80211com *ic); -static void wma_set_regdomain(a_uint32_t regdmn); static void wma_set_bss_rate_flags(struct wma_txrx_node *iface, tpAddBssParams add_bss); /*Configure DFS with radar tables and regulatory domain*/ @@ -10510,15 +10507,6 @@ static void wma_send_beacon(tp_wma_handle wma, tpSendbeaconParams bcn_info) wma_set_sap_keepalive(wma, vdev_id); } -#ifdef QCA_IBSS_SUPPORT -static void wma_send_beacon_tmpl(WMA_HANDLE handle, - u_int8_t vdev_id) -{ - /*TODO: implement after beacon template is created by PE and send - to target upon received WMI_SEND_BEACON command */ -} -#endif - #if !defined(REMOVE_PKT_LOG) && !defined(QCA_WIFI_ISOC) static VOS_STATUS wma_pktlog_wmi_send_cmd(WMA_HANDLE handle, struct ath_pktlog_wmi_params *params) @@ -16002,20 +15990,6 @@ static void wma_roam_better_ap_handler(tp_wma_handle wma, u_int32_t vdev_id) ret = tlshim_mgmt_roam_event_ind(wma->vos_context, vdev_id); } -/* function : wma_roam_better_ap_handler - * Descriptin : Handler for WMI_ROAM_REASON_BETTER_AP event from roam firmware in Rome. - * : This event means roam algorithm in Rome has found a better matching - * : candidate AP. The indication is sent through tl_shim as by repeating - * : the last beacon. Hence this routine calls a tlshim routine. - * Args : - * Returns : - */ -static void wma_roam_bmiss_scan_ap_handler(tp_wma_handle wma, u_int32_t vdev_id) -{ - VOS_STATUS ret; - ret = tlshim_mgmt_roam_event_ind(wma->vos_context, vdev_id); -} - /* function : wma_roam_event_callback * Descriptin : Handler for all events from roam engine in firmware * Args : @@ -17680,44 +17654,6 @@ v_VOID_t wma_rx_service_ready_event(WMA_HANDLE handle, void *cmd_param_info) } } -static void wma_set_regdomain(a_uint32_t regdmn) -{ - void *vos_context = vos_get_global_context(VOS_MODULE_ID_WDA, NULL); - tp_wma_handle wma = vos_get_context(VOS_MODULE_ID_WDA, vos_context); - u_int32_t modeSelect = 0xFFFFFFFF; - - if (NULL == wma) { - WMA_LOGE("Failed to set regulatory domain"); - return; - } - - /* Set DFS regulatory domain */ - wma_set_dfs_regdomain(wma); - - switch (wma->phy_capability) { - case WMI_11G_CAPABILITY: - case WMI_11NG_CAPABILITY: - modeSelect &= ~(REGDMN_MODE_11A | REGDMN_MODE_TURBO | - REGDMN_MODE_108A | REGDMN_MODE_11A_HALF_RATE | - REGDMN_MODE_11A_QUARTER_RATE | REGDMN_MODE_11NA_HT20 | - REGDMN_MODE_11NA_HT40PLUS | REGDMN_MODE_11NA_HT40MINUS | - REGDMN_MODE_11AC_VHT20 | REGDMN_MODE_11AC_VHT40PLUS | - REGDMN_MODE_11AC_VHT40MINUS | REGDMN_MODE_11AC_VHT80); - break; - case WMI_11A_CAPABILITY: - case WMI_11NA_CAPABILITY: - case WMI_11AC_CAPABILITY: - modeSelect &= ~(REGDMN_MODE_11B | REGDMN_MODE_11G | - REGDMN_MODE_108G | REGDMN_MODE_11NG_HT20 | - REGDMN_MODE_11NG_HT40PLUS | REGDMN_MODE_11NG_HT40MINUS | - REGDMN_MODE_11AC_VHT20_2G | REGDMN_MODE_11AC_VHT40_2G | - REGDMN_MODE_11AC_VHT80_2G); - break; - } - - return; -} - /* function : wma_rx_ready_event * Descriptin : * Args : -- cgit v1.2.3 From 9e96f18c169db353dc6cfe51148b66f7b7d77018 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Sat, 29 Mar 2014 12:47:21 -0700 Subject: wlan: qcacld: wmi: Fix unused-function warnings When GCC 4.7 was first introduced to Android, the initial version of the compiler was warning about things it should not have, and hence some warnings were suppressed, including unused-function warnings. The compiler now seems to be correctly warning only about bad behavior, so clean up the unused functions in WMI in preparation for re-enabling unused-function warnings in the compiler. Change-Id: I4076cf038ab22649743cfece95ec0efa4c4babab CRs-fixed: 640842 --- CORE/SERVICES/WMI/wmi_unified.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CORE/SERVICES/WMI/wmi_unified.c b/CORE/SERVICES/WMI/wmi_unified.c index 6ec4fd345b65..1df884cd8c81 100644 --- a/CORE/SERVICES/WMI/wmi_unified.c +++ b/CORE/SERVICES/WMI/wmi_unified.c @@ -665,6 +665,7 @@ int wmi_unified_unregister_event_handler(wmi_unified_t wmi_handle, return 0; } +#if 0 /* currently not used */ static int wmi_unified_event_rx(struct wmi_unified *wmi_handle, wmi_buf_t evt_buf) { @@ -699,6 +700,7 @@ end: adf_nbuf_free(evt_buf); return status; } +#endif /* 0 */ /* * Temporarily added to support older WMI events. We should move all events to unified -- cgit v1.2.3 From 38ab5540a4345193087dec0cdbfb745c4eb21492 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Sat, 29 Mar 2014 12:48:10 -0700 Subject: wlan: qcacld: voss: Fix unused-function warnings When GCC 4.7 was first introduced to Android, the initial version of the compiler was warning about things it should not have, and hence some warnings were suppressed, including unused-function warnings. The compiler now seems to be correctly warning only about bad behavior, so clean up the unused functions in VOSS in preparation for re-enabling unused-function warnings in the compiler. Change-Id: Ic0b68d7b205189beaf211c97b46c74774bb632a6 CRs-fixed: 640842 --- CORE/VOSS/src/vos_nvitem.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CORE/VOSS/src/vos_nvitem.c b/CORE/VOSS/src/vos_nvitem.c index 9dd2ad73425c..a675ad0eaddf 100644 --- a/CORE/VOSS/src/vos_nvitem.c +++ b/CORE/VOSS/src/vos_nvitem.c @@ -72,10 +72,12 @@ static struct completion change_country_code; #endif +#ifndef CONFIG_ENABLE_LINUX_REG static char crda_alpha2[2] = {0, 0}; /* country code from initial crda req */ static char run_time_alpha2[2] = {0, 0}; /* country code from none-default country req */ static v_BOOL_t crda_regulatory_entry_valid = VOS_FALSE; static v_BOOL_t crda_regulatory_run_time_entry_valid = VOS_FALSE; +#endif /* ndef CONFIG_ENABLE_LINUX_REG */ /*---------------------------------------------------------------------------- @@ -2473,6 +2475,7 @@ static int bw20_ch_index_to_bw40_ch_index(int k) return m; } +#ifndef CONFIG_ENABLE_LINUX_REG void crda_regulatory_entry_default(v_U8_t *countryCode, int domain_id) { int k; @@ -2904,6 +2907,7 @@ static int create_crda_regulatory_entry_from_regd(struct wiphy *wiphy, crda_regulatory_entry_post_processing(wiphy, request, nBandCapability, domain_id); return 0; } +#endif /* ndef CONFIG_ENABLE_LINUX_REG */ #ifdef CONFIG_ENABLE_LINUX_REG static int create_linux_regulatory_entry(struct wiphy *wiphy, -- cgit v1.2.3 From 852eb800b9d96316457fde0c995ad84299ae7385 Mon Sep 17 00:00:00 2001 From: Yue Ma Date: Wed, 26 Mar 2014 18:09:57 -0700 Subject: qcacld: Add the support to load a seprate board data file for FTM mode Currently FTM mode uses the same board data file as normal mode, but for some cases it may require a different board data file, hence add the changes to support it. Change-Id: I2710af9ffc92bc2482ec167960762abca06ab575 CRs-Fixed: 637918 --- CORE/SERVICES/BMI/ol_fw.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/CORE/SERVICES/BMI/ol_fw.c b/CORE/SERVICES/BMI/ol_fw.c index acb651c64ca4..b5f22ba757a8 100644 --- a/CORE/SERVICES/BMI/ol_fw.c +++ b/CORE/SERVICES/BMI/ol_fw.c @@ -381,6 +381,21 @@ static int ol_transfer_bin_file(struct ol_softc *scn, ATH_BIN_FILE file, printk("%s: no Patch file defined\n", __func__); return EOK; case ATH_BOARD_DATA_FILE: +#ifdef QCA_WIFI_FTM + if (vos_get_conparam() == VOS_FTM_MODE) { +#ifdef CONFIG_CNSS + filename = fw_files.utf_board_data; +#else + filename = QCA_BOARD_DATA_FILE; +#endif +#ifdef QCA_SIGNED_SPLIT_BINARY_SUPPORT + bin_sign = TRUE; +#endif + printk(KERN_INFO "%s: Loading board data file %s\n", + __func__, filename); + break; + } +#endif /* QCA_WIFI_FTM */ #ifdef CONFIG_CNSS filename = fw_files.board_data; #else @@ -398,7 +413,26 @@ static int ol_transfer_bin_file(struct ol_softc *scn, ATH_BIN_FILE file, if (file == ATH_OTP_FILE) return -ENOENT; + +#if defined(QCA_WIFI_FTM) && defined(CONFIG_CNSS) + /* Try default board data file if FTM specific + * board data file is not present. */ + if (filename == fw_files.utf_board_data) { + filename = fw_files.board_data; + printk("%s: Trying to load default %s\n", + __func__, filename); + if (request_firmware(&fw_entry, filename, + scn->sc_osdev->device) != 0) { + printk("%s: Failed to get %s\n", + __func__, filename); + return -1; + } + } else { + return -1; + } +#else return -1; +#endif } if (!fw_entry || !fw_entry->data) { -- cgit v1.2.3 From 1a63f3a867d03e16338a00031fbc027a4ce59bda Mon Sep 17 00:00:00 2001 From: Mushtaq A Mujale Date: Thu, 27 Mar 2014 23:02:22 -0700 Subject: qcacld: CL 891478 - update fw common interface files enable/disable 5g ebt feature in wmi header file Change-Id: Iea27e06759de5354e4beddaec0d5e6feecaa0de8 CRs-Fixed: 640197 --- CORE/SERVICES/COMMON/wmi_unified.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CORE/SERVICES/COMMON/wmi_unified.h b/CORE/SERVICES/COMMON/wmi_unified.h index 8983fd0a4e3f..7eec4e4f9272 100644 --- a/CORE/SERVICES/COMMON/wmi_unified.h +++ b/CORE/SERVICES/COMMON/wmi_unified.h @@ -4832,7 +4832,8 @@ typedef enum { PKT_PWR_SAVE_DELIM_CRC_FAIL = 0x0040, PKT_PWR_SAVE_GID_NSTS_ZERO = 0x0080, PKT_PWR_SAVE_RSSI_CHECK = 0x0100, - WMI_PKT_PWR_SAVE_MAX = 0x0200, + PKT_PWR_SAVE_5G_EBT = 0x0200, + WMI_PKT_PWR_SAVE_MAX = 0x0400, } WMI_PKT_PWR_SAVE_TYPE; typedef struct { -- cgit v1.2.3 From 3be0f3afe4c0a15e0b43b857e7700872e9881133 Mon Sep 17 00:00:00 2001 From: Mushtaq A Mujale Date: Thu, 27 Mar 2014 20:31:32 -0700 Subject: Qcacld:Add knobs for 5G EBT enable/disable 5G EBT(early beacon termination) feature from ini/iwpriv Change-Id: I405d29aa0bf64697397af4c77ddfd6577968e8a5 CRs-Fixed: 640257 --- CORE/HDD/inc/wlan_hdd_cfg.h | 6 ++++++ CORE/HDD/src/wlan_hdd_cfg.c | 10 ++++++++++ CORE/HDD/src/wlan_hdd_wext.c | 18 ++++++++++++++++++ CORE/MAC/inc/aniGlobal.h | 1 + CORE/SERVICES/WMA/wma.c | 24 ++++++++++++++++++++++-- CORE/SERVICES/WMA/wma.h | 4 +++- CORE/SME/inc/sme_Api.h | 1 + CORE/SME/src/sme_common/sme_Api.c | 2 ++ 8 files changed, 63 insertions(+), 3 deletions(-) diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h index 8a6e95e861d0..8dfbfd3976c7 100644 --- a/CORE/HDD/inc/wlan_hdd_cfg.h +++ b/CORE/HDD/inc/wlan_hdd_cfg.h @@ -1520,6 +1520,11 @@ typedef enum #define CFG_ENABLE_OVERLAP_CH_MAX ( 1 ) #define CFG_ENABLE_OVERLAP_CH_DEFAULT ( 0 ) +#define CFG_PPS_ENABLE_5G_EBT "gEnable5gEBT" +#define CFG_PPS_ENABLE_5G_EBT_FEATURE_MIN ( 0 ) +#define CFG_PPS_ENABLE_5G_EBT_FEATURE_MAX ( 1 ) +#define CFG_PPS_ENABLE_5G_EBT_FEATURE_DEFAULT ( 0 ) + /* * VOS Trace Enable Control * Notes: @@ -2671,6 +2676,7 @@ typedef struct v_BOOL_t enableRxSTBC; v_BOOL_t enableTxSTBC; v_BOOL_t enableRxLDPC; + v_BOOL_t enable5gEBT; #ifdef FEATURE_WLAN_TDLS v_BOOL_t fEnableTDLSSupport; v_BOOL_t fEnableTDLSImplicitTrigger; diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c index 999ab9539b0d..f4414e6f9a35 100644 --- a/CORE/HDD/src/wlan_hdd_cfg.c +++ b/CORE/HDD/src/wlan_hdd_cfg.c @@ -2597,6 +2597,13 @@ REG_VARIABLE( CFG_ENABLE_RX_LDPC, WLAN_PARAM_Integer, CFG_ENABLE_RX_LDPC_MIN, CFG_ENABLE_RX_LDPC_MAX ), +REG_VARIABLE( CFG_PPS_ENABLE_5G_EBT, WLAN_PARAM_Integer, + hdd_config_t, enable5gEBT, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_PPS_ENABLE_5G_EBT_FEATURE_DEFAULT, + CFG_PPS_ENABLE_5G_EBT_FEATURE_MIN, + CFG_PPS_ENABLE_5G_EBT_FEATURE_MAX ), + #ifdef FEATURE_WLAN_TDLS REG_VARIABLE( CFG_TDLS_SUPPORT_ENABLE, WLAN_PARAM_Integer, hdd_config_t, fEnableTDLSSupport, @@ -5355,6 +5362,9 @@ VOS_STATUS hdd_set_sme_config( hdd_context_t *pHddCtx ) smeConfig.max_intf_count = pHddCtx->max_intf_count; smeConfig.fEnableDebugLog = pHddCtx->cfg_ini->gEnableDebugLog; + + smeConfig.enable5gEBT = pHddCtx->cfg_ini->enable5gEBT; + halStatus = sme_UpdateConfig( pHddCtx->hHal, &smeConfig); if ( !HAL_STATUS_SUCCESS( halStatus ) ) { diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c index d7e5b652e13d..b4f43132ae36 100644 --- a/CORE/HDD/src/wlan_hdd_wext.c +++ b/CORE/HDD/src/wlan_hdd_wext.c @@ -241,6 +241,8 @@ static const hdd_freq_chan_map_t freq_chan_map[] = { {2412, 1}, {2417, 2}, #define WE_SET_EARLY_RX_ADJUST_PAUSE 80 #define WE_SET_MC_RATE 81 #define WE_SET_EARLY_RX_DRIFT_SAMPLE 82 +/* Private ioctl for packet power save */ +#define WE_PPS_5G_EBT 83 /* Private ioctls and their sub-ioctls */ #define WLAN_PRIV_SET_NONE_GET_INT (SIOCIWFIRSTPRIV + 1) @@ -5544,6 +5546,18 @@ static int iw_setint_getnone(struct net_device *dev, struct iw_request_info *inf break; } + case WE_PPS_5G_EBT: + { + if (pAdapter->device_mode != WLAN_HDD_INFRA_STATION) + return -EINVAL; + + hddLog(LOG1, "WMI_VDEV_PPS_5G_EBT val %d", set_value); + ret = process_wma_set_command((int)pAdapter->sessionId, + (int)WMI_VDEV_PPS_5G_EBT, + set_value, PPS_CMD); + break; + } + case WE_SET_HTSMPS: { hddLog(LOG1, "WE_SET_HTSMPS val %d", set_value); @@ -10070,6 +10084,10 @@ static const struct iw_priv_args we_private_args[] = { IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "rssi_chk" }, + { WE_PPS_5G_EBT, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, + 0, "5g_ebt" }, + { WE_SET_HTSMPS, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "htsmps" }, diff --git a/CORE/MAC/inc/aniGlobal.h b/CORE/MAC/inc/aniGlobal.h index 5052601e821f..f25b4494149f 100644 --- a/CORE/MAC/inc/aniGlobal.h +++ b/CORE/MAC/inc/aniGlobal.h @@ -1105,6 +1105,7 @@ typedef struct sAniSirGlobal #ifdef QCA_WIFI_2_0 tANI_U16 mgmtSeqNum; #endif /* QCA_WIFI_2_0 */ + v_BOOL_t enable5gEBT; } tAniSirGlobal; typedef enum diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index 58c2f6ae8005..2e74ce256dce 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -7352,6 +7352,11 @@ static void wma_process_cli_set_cmd(tp_wma_handle wma, (PKT_PWR_SAVE_RSSI_CHECK & 0xffff); intr[vid].config.pps_params.rssi_chk = privcmd->param_value; break; + case WMI_VDEV_PPS_5G_EBT: + pps_val = ((privcmd->param_value << 31) & 0xffff0000) | + (PKT_PWR_SAVE_5G_EBT & 0xffff); + intr[vid].config.pps_params.ebt_5g = privcmd->param_value; + break; default: WMA_LOGE("Invalid param id 0x%x", privcmd->param_id); break; @@ -8320,9 +8325,15 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss) ol_txrx_peer_handle peer; VOS_STATUS status; struct wma_txrx_node *iface; -#ifdef WLAN_FEATURE_11W int ret = 0; -#endif /* WLAN_FEATURE_11W */ + int pps_val = 0; + tpAniSirGlobal pMac = (tpAniSirGlobal)vos_get_context(VOS_MODULE_ID_PE, + wma->vos_context); + + if (NULL == pMac) { + WMA_LOGE("%s: Unable to get PE context", __func__); + goto send_fail_resp; + } pdev = vos_get_context(VOS_MODULE_ID_TXRX, wma->vos_context); @@ -8437,6 +8448,15 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss) wmi_unified_send_txbf(wma, &add_bss->staContext); + pps_val = ((pMac->enable5gEBT << 31) & 0xffff0000) | (PKT_PWR_SAVE_5G_EBT & 0xffff); + ret = wmi_unified_vdev_set_param_send(wma->wmi_handle, vdev_id, + WMI_VDEV_PARAM_PACKET_POWERSAVE, + pps_val); + if (ret) + WMA_LOGE("Failed to send wmi packet power save cmd"); + else + WMA_LOGD("Sent PKT_PWR_SAVE_5G_EBT cmd to target, val = %x, ret = %d", + pps_val, ret); wmi_unified_send_peer_assoc(wma, add_bss->nwType, &add_bss->staContext); diff --git a/CORE/SERVICES/WMA/wma.h b/CORE/SERVICES/WMA/wma.h index 69ad4608d4ee..580ccbceaa73 100644 --- a/CORE/SERVICES/WMA/wma.h +++ b/CORE/SERVICES/WMA/wma.h @@ -298,6 +298,7 @@ struct pps { v_BOOL_t delim_fail; v_BOOL_t nsts_zero; v_BOOL_t rssi_chk; + v_BOOL_t ebt_5g; }; struct qpower_params { @@ -1395,7 +1396,8 @@ typedef enum { WMI_VDEV_PPS_DELIM_CRC_FAIL = 6, WMI_VDEV_PPS_GID_NSTS_ZERO = 7, WMI_VDEV_PPS_RSSI_CHECK = 8, - WMI_VDEV_VHT_SET_GID_MGMT = 9 + WMI_VDEV_VHT_SET_GID_MGMT = 9, + WMI_VDEV_PPS_5G_EBT = 10 } packet_power_save; typedef enum { diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h index c3b8583f6a8a..8ff911b7ce79 100644 --- a/CORE/SME/inc/sme_Api.h +++ b/CORE/SME/inc/sme_Api.h @@ -131,6 +131,7 @@ typedef struct _smeConfigParams tANI_BOOLEAN pnoOffload; tANI_U8 fEnableDebugLog; tANI_U8 max_intf_count; + tANI_BOOLEAN enable5gEBT; } tSmeConfigParams, *tpSmeConfigParams; typedef enum diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c index 5e26d5804463..8b53b84f3508 100644 --- a/CORE/SME/src/sme_common/sme_Api.c +++ b/CORE/SME/src/sme_common/sme_Api.c @@ -1637,6 +1637,8 @@ eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams) /* update interface configuration */ pMac->sme.max_intf_count = pSmeConfigParams->max_intf_count; + pMac->enable5gEBT = pSmeConfigParams->enable5gEBT; + return status; } -- cgit v1.2.3 From bbdc33ca1e557452ae18c41f873b48600da470f2 Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Date: Fri, 28 Mar 2014 17:23:52 -0700 Subject: qcacld: Fix of memory leak in WDA_ROAM_SCAN_OFFLOAD_REQ Free memory allocated for WDA_ROAM_SCAN_OFFLOAD_REQ in WMA in error cases Change-Id: Ic616cfbee4338b2f5d789aff4ed60ee309e60160 CRs-Fixed: 640726 --- CORE/SERVICES/WMA/wma.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index 2e74ce256dce..c080a0bde457 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -5131,10 +5131,11 @@ VOS_STATUS wma_process_roam_scan_req(tp_wma_handle wma_handle, WMA_LOGI("%s: command 0x%x", __func__, roam_req->Command); if (!wma_handle->roam_offload_enabled) { - /* roam scan offload is not enabled in firmware. - * Cannot initialize it in the middle of connection. - */ - return VOS_STATUS_E_PERM; + /* roam scan offload is not enabled in firmware. + * Cannot initialize it in the middle of connection. + */ + vos_mem_free(roam_req); + return VOS_STATUS_E_PERM; } switch (roam_req->Command) { case ROAM_SCAN_OFFLOAD_START: -- cgit v1.2.3 From 9d4d6ac9be1b43d21f60849e772738d969bd1276 Mon Sep 17 00:00:00 2001 From: "Kanchanapally, Vidyullatha" Date: Fri, 28 Mar 2014 16:48:02 +0530 Subject: qcacld: modified FASTREASSOC ioctl command changes are made in host to make FASTREASSOC ioctl command similar to REASSOC but with channel dwell times for scan modified to be of lower values so that less jitter is observed during roaming. Change-Id: I23dbde9a73d8c24f19163b7720742e84af863e72 CRs-Fixed: 637069 --- CORE/HDD/src/wlan_hdd_main.c | 59 ++++++++++++++++++++++++++++++++++++++ CORE/MAC/inc/sirApi.h | 3 ++ CORE/SME/inc/csrApi.h | 12 +++++++- CORE/SME/src/csr/csrApiRoam.c | 3 ++ CORE/SME/src/csr/csrApiScan.c | 21 ++++++++++++-- CORE/SME/src/csr/csrNeighborRoam.c | 3 ++ 6 files changed, 98 insertions(+), 3 deletions(-) diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index c62dc3a0914d..88102e73cd44 100644 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -3459,6 +3459,9 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter, /* Proceed with reassoc */ #ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD handoffInfo.channel = channel; +#ifndef QCA_WIFI_ISOC + handoffInfo.src = REASSOC; +#endif vos_mem_copy(handoffInfo.bssid, targetApBssid, sizeof(tSirMacAddr)); sme_HandoffRequest(pHddCtx->hHal, &handoffInfo); #endif @@ -3684,6 +3687,61 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter, else if (strncmp(command, "FASTREASSOC", 11) == 0) { +#ifndef QCA_WIFI_ISOC + tANI_U8 *value = command; + tANI_U8 channel = 0; + tSirMacAddr targetApBssid; + eHalStatus status = eHAL_STATUS_SUCCESS; +#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD + tCsrHandoffRequest handoffInfo; +#endif + hdd_station_ctx_t *pHddStaCtx = NULL; + pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter); + + /* if not associated, no need to proceed with reassoc */ + if (eConnectionState_Associated != pHddStaCtx->conn_info.connState) + { + VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO, "%s:Not associated!",__func__); + ret = -EINVAL; + goto exit; + } + + status = hdd_parse_reassoc_command_data(value, targetApBssid, &channel); + if (eHAL_STATUS_SUCCESS != status) + { + VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, + "%s: Failed to parse reassoc command data", __func__); + ret = -EINVAL; + goto exit; + } + + /* if the target bssid is same as currently associated AP, + then no need to proceed with reassoc */ + if (VOS_TRUE == vos_mem_compare(targetApBssid, + pHddStaCtx->conn_info.bssId, sizeof(tSirMacAddr))) + { + VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO, "%s:Reassoc BSSID is same as currently associated AP bssid",__func__); + ret = -EINVAL; + goto exit; + } + + /* Check channel number is a valid channel number */ + if(VOS_STATUS_SUCCESS != + wlan_hdd_validate_operation_channel(pAdapter, channel)) + { + hddLog(VOS_TRACE_LEVEL_ERROR, + "%s: Invalid Channel [%d] \n", __func__, channel); + return -EINVAL; + } + + /* Proceed with reassoc */ +#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD + handoffInfo.channel = channel; + handoffInfo.src = FASTREASSOC; + vos_mem_copy(handoffInfo.bssid, targetApBssid, sizeof(tSirMacAddr)); + sme_HandoffRequest(pHddCtx->hHal, &handoffInfo); +#endif +#else tANI_U8 *value = command; tSirMacAddr targetApBssid; tANI_U8 trigger = 0; @@ -3724,6 +3782,7 @@ static int hdd_driver_command(hdd_adapter_t *pAdapter, smeIssueFastRoamNeighborAPEvent(WLAN_HDD_GET_HAL_CTX(pAdapter), &targetApBssid[0], (tSmeFastRoamTrigger)(trigger)); +#endif } #endif #if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD) diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h index 4841972ecc29..f0d1f79825a8 100644 --- a/CORE/MAC/inc/sirApi.h +++ b/CORE/MAC/inc/sirApi.h @@ -4450,6 +4450,9 @@ typedef struct sAniHandoffReq tANI_U8 sessionId; tANI_U8 bssid[WNI_CFG_BSSID_LEN]; tANI_U8 channel; +#ifndef QCA_WIFI_ISOC + tANI_U8 handoff_src; +#endif } tAniHandoffReq, *tpAniHandoffReq; typedef struct sSirScanOffloadReq { diff --git a/CORE/SME/inc/csrApi.h b/CORE/SME/inc/csrApi.h index 1bee832bed03..6ed035c5bace 100644 --- a/CORE/SME/inc/csrApi.h +++ b/CORE/SME/inc/csrApi.h @@ -905,7 +905,6 @@ typedef struct tagCsrRoamProfile tVOS_CON_MODE csrPersona; tANI_U8 disableDFSChSwitch; - }tCsrRoamProfile; @@ -1428,10 +1427,21 @@ typedef void * tScanResultHandle; #define CSR_INVALID_SCANRESULT_HANDLE (NULL) #ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD +#ifndef QCA_WIFI_ISOC +typedef enum +{ + REASSOC = 0, + FASTREASSOC = 1 +}handoff_src; +#endif + typedef struct tagCsrHandoffRequest { tCsrBssid bssid; tANI_U8 channel; +#ifndef QCA_WIFI_ISOC + tANI_U8 src; /* To check if its a REASSOC or a FASTREASSOC IOCTL */ +#endif }tCsrHandoffRequest; #endif diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c index 9a471e6486c8..1370dee6e70e 100644 --- a/CORE/SME/src/csr/csrApiRoam.c +++ b/CORE/SME/src/csr/csrApiRoam.c @@ -17301,6 +17301,9 @@ eHalStatus csrHandoffRequest(tpAniSirGlobal pMac, pMsg->msgLen = (tANI_U16)sizeof(tAniHandoffReq); pMsg->sessionId = pMac->roam.neighborRoamInfo.csrSessionId; pMsg->channel = pHandoffInfo->channel; +#ifndef QCA_WIFI_ISOC + pMsg->handoff_src = pHandoffInfo->src; +#endif vos_mem_copy(pMsg->bssid, pHandoffInfo->bssid, 6); diff --git a/CORE/SME/src/csr/csrApiScan.c b/CORE/SME/src/csr/csrApiScan.c index cfccc6a3f047..9dbe0855cf66 100644 --- a/CORE/SME/src/csr/csrApiScan.c +++ b/CORE/SME/src/csr/csrApiScan.c @@ -88,6 +88,12 @@ RSSI *cannot* be more than 0xFF or less than 0 for meaningful WLAN operation #define CSR_SCAN_HANDOFF_DELTA 10 #define MAX_ACTIVE_SCAN_FOR_ONE_CHANNEL 140 #define MIN_ACTIVE_SCAN_FOR_ONE_CHANNEL 120 + +#ifndef QCA_WIFI_ISOC +#define MAX_ACTIVE_SCAN_FOR_ONE_CHANNEL_FASTREASSOC 30 +#define MIN_ACTIVE_SCAN_FOR_ONE_CHANNEL_FASTREASSOC 20 +#endif + #define CSR_SCAN_OVERALL_SCORE( rssi ) \ (( rssi < CSR_SCAN_MAX_SCORE_VAL ) \ ? (CSR_SCAN_MAX_SCORE_VAL-rssi) : CSR_SCAN_MIN_SCORE_VAL) @@ -7278,8 +7284,19 @@ eHalStatus csrScanForSSID(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfi /* For one channel be good enpugh time to receive beacon atleast */ if( 1 == pProfile->ChannelInfo.numOfChannels ) { - pScanCmd->u.scanCmd.u.scanRequest.maxChnTime = MAX_ACTIVE_SCAN_FOR_ONE_CHANNEL; - pScanCmd->u.scanCmd.u.scanRequest.minChnTime = MIN_ACTIVE_SCAN_FOR_ONE_CHANNEL; +#ifndef QCA_WIFI_ISOC + if(pMac->roam.neighborRoamInfo.handoffReqInfo.src == FASTREASSOC) + { + pScanCmd->u.scanCmd.u.scanRequest.maxChnTime = MAX_ACTIVE_SCAN_FOR_ONE_CHANNEL_FASTREASSOC; + pScanCmd->u.scanCmd.u.scanRequest.minChnTime = MIN_ACTIVE_SCAN_FOR_ONE_CHANNEL_FASTREASSOC; + pMac->roam.neighborRoamInfo.handoffReqInfo.src = 0; //reset this value + } + else +#endif + { + pScanCmd->u.scanCmd.u.scanRequest.maxChnTime = MAX_ACTIVE_SCAN_FOR_ONE_CHANNEL; + pScanCmd->u.scanCmd.u.scanRequest.minChnTime = MIN_ACTIVE_SCAN_FOR_ONE_CHANNEL; + } } else { diff --git a/CORE/SME/src/csr/csrNeighborRoam.c b/CORE/SME/src/csr/csrNeighborRoam.c index d8a5daa6207d..41c3f32d83dc 100644 --- a/CORE/SME/src/csr/csrNeighborRoam.c +++ b/CORE/SME/src/csr/csrNeighborRoam.c @@ -5303,6 +5303,9 @@ eHalStatus csrNeighborRoamHandoffReqHdlr(tpAniSirGlobal pMac, void* pMsg) { pNeighborRoamInfo->handoffReqInfo.channel = pHandoffReqInfo->channel; +#ifndef QCA_WIFI_ISOC + pNeighborRoamInfo->handoffReqInfo.src = pHandoffReqInfo->handoff_src; +#endif vos_mem_copy(pNeighborRoamInfo->handoffReqInfo.bssid, pHandoffReqInfo->bssid, 6); -- cgit v1.2.3 From 71ed7846d47b733bb59e380d0da26d2d354ff603 Mon Sep 17 00:00:00 2001 From: Rajeev Kumar Date: Fri, 28 Mar 2014 16:53:32 -0700 Subject: qcacld: Reset SoC after wma_stop before vos_close Following is theory behind this change: 1) Host driver has provided HTT RX ring buffers to target. 2) Target is doing DMA to these RX ring buffers over PCIe. 3) Driver unload is triggered from user space. 4) During unload wma_stop sends PDEV_SUSPEND command to target but SoC is not immediately reset after it. SoC reset is done at the end of driver unload after vos_close. 5) vos_close is called after step 4) and it calls htt_detach. 6) htt_detach is freeing the RX ring buffers which FW is still holding. 7) Now DMA happens from target to a page in HLOS memory which is already freed and this leads to HLOS memory corruption. Change-Id: I7c2dded7bb171891e0ae60608e346d16be0a2b12 CRs-fixed: 640687 --- CORE/SERVICES/HIF/PCIe/if_pci.c | 36 +++++++++++++++++++++--------------- CORE/SERVICES/HIF/PCIe/if_pci.h | 3 +++ CORE/VOSS/src/vos_api.c | 9 +++++---- 3 files changed, 29 insertions(+), 19 deletions(-) diff --git a/CORE/SERVICES/HIF/PCIe/if_pci.c b/CORE/SERVICES/HIF/PCIe/if_pci.c index 35a15a43af38..53239381e722 100644 --- a/CORE/SERVICES/HIF/PCIe/if_pci.c +++ b/CORE/SERVICES/HIF/PCIe/if_pci.c @@ -1442,21 +1442,6 @@ hif_pci_remove(struct pci_dev *pdev) mem = (void __iomem *)sc->mem; -#if defined(CPU_WARM_RESET_WAR) - /* Currently CPU warm reset sequence is tested only for AR9888_REV2 - * Need to enable for AR9888_REV1 once CPU warm reset sequence is - * verified for AR9888_REV1 - */ - if (scn->target_version == AR9888_REV2_VERSION) { - hif_pci_device_warm_reset(sc); - } - else { - hif_pci_device_reset(sc); - } -#else - hif_pci_device_reset(sc); -#endif - pci_disable_msi(pdev); A_FREE(scn); A_FREE(sc->hif_device); @@ -1755,3 +1740,24 @@ void hif_disable_isr(void *ol_sc) /* Cancel the pending tasklet */ tasklet_kill(&hif_sc->intr_tq); } + +void hif_reset_soc(void *ol_sc) +{ + struct ol_softc *scn = (struct ol_softc *)ol_sc; + struct hif_pci_softc *sc = scn->hif_sc; + +#if defined(CPU_WARM_RESET_WAR) + /* Currently CPU warm reset sequence is tested only for AR9888_REV2 + * Need to enable for AR9888_REV1 once CPU warm reset sequence is + * verified for AR9888_REV1 + */ + if (scn->target_version == AR9888_REV2_VERSION) { + hif_pci_device_warm_reset(sc); + } + else { + hif_pci_device_reset(sc); + } +#else + hif_pci_device_reset(sc); +#endif +} diff --git a/CORE/SERVICES/HIF/PCIe/if_pci.h b/CORE/SERVICES/HIF/PCIe/if_pci.h index f66142a35f66..b79bcdeadaf8 100644 --- a/CORE/SERVICES/HIF/PCIe/if_pci.h +++ b/CORE/SERVICES/HIF/PCIe/if_pci.h @@ -114,6 +114,9 @@ adf_os_size_t initBufferCount(adf_os_size_t maxSize); void hif_init_pdev_txrx_handle(void *ol_sc, void *txrx_handle); void hif_disable_isr(void *ol_sc); +/* Function to reset SoC*/ +void hif_reset_soc(void *ol_sc); + void hif_init_adf_ctx(adf_os_device_t adf_dev, void *ol_sc); #ifndef REMOVE_PKT_LOG diff --git a/CORE/VOSS/src/vos_api.c b/CORE/VOSS/src/vos_api.c index 97cddeffc503..38903f05150f 100644 --- a/CORE/VOSS/src/vos_api.c +++ b/CORE/VOSS/src/vos_api.c @@ -1024,6 +1024,11 @@ VOS_STATUS vos_stop( v_CONTEXT_t vosContext ) } #endif +#ifndef QCA_WIFI_ISOC + hif_disable_isr(((VosContextType*)vosContext)->pHIFContext); + hif_reset_soc(((VosContextType*)vosContext)->pHIFContext); +#endif + /* SYS STOP will stop SME and MAC */ vosStatus = sysStop( vosContext); if (!VOS_IS_STATUS_SUCCESS(vosStatus)) @@ -1041,10 +1046,6 @@ VOS_STATUS vos_stop( v_CONTEXT_t vosContext ) VOS_ASSERT( VOS_IS_STATUS_SUCCESS( vosStatus ) ); } -#ifndef QCA_WIFI_ISOC - hif_disable_isr(((VosContextType*)vosContext)->pHIFContext); -#endif - return VOS_STATUS_SUCCESS; } -- cgit v1.2.3 From c392ad53d1e94246abca8e46f5074213bbe26edf Mon Sep 17 00:00:00 2001 From: Yue Ma Date: Fri, 28 Mar 2014 15:55:03 -0700 Subject: qcacld: Enable collecting target RAM dump after kernel panic Re-enable this feature for debugging purpose. Change-Id: I9b1b56b6aad300959a302e163c8c46a3b869c395 CRs-fixed: 640570 --- CORE/SERVICES/BMI/ol_fw.c | 4 ++-- CORE/SERVICES/HIF/PCIe/if_pci.c | 2 +- Kbuild | 8 ++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CORE/SERVICES/BMI/ol_fw.c b/CORE/SERVICES/BMI/ol_fw.c index b5f22ba757a8..423b68426eee 100644 --- a/CORE/SERVICES/BMI/ol_fw.c +++ b/CORE/SERVICES/BMI/ol_fw.c @@ -708,7 +708,7 @@ static void ramdump_work_handler(struct work_struct *ramdump) goto out_fail; } -#ifdef CONFIG_TARGET_RAMDUMP_AFTER_KERNEL_PANIC +#ifdef TARGET_RAMDUMP_AFTER_KERNEL_PANIC if (ramdump_scn->crash_shutdown) { if (!hif_pci_check_soc_status(ramdump_scn->hif_sc) && !ol_copy_ramdump(ramdump_scn)) @@ -797,7 +797,7 @@ void ol_target_failure(void *instance, A_STATUS status) return; } -#ifdef CONFIG_TARGET_RAMDUMP_AFTER_KERNEL_PANIC +#ifdef TARGET_RAMDUMP_AFTER_KERNEL_PANIC if (scn->crash_shutdown) printk("XXX TARGET ASSERTED because of Kernel Panic XXX\n"); else diff --git a/CORE/SERVICES/HIF/PCIe/if_pci.c b/CORE/SERVICES/HIF/PCIe/if_pci.c index 53239381e722..da8bd48121f1 100644 --- a/CORE/SERVICES/HIF/PCIe/if_pci.c +++ b/CORE/SERVICES/HIF/PCIe/if_pci.c @@ -1512,7 +1512,7 @@ void hif_pci_shutdown(struct pci_dev *pdev) void hif_pci_crash_shutdown(struct pci_dev *pdev) { -#ifdef CONFIG_TARGET_RAMDUMP_AFTER_KERNEL_PANIC +#ifdef TARGET_RAMDUMP_AFTER_KERNEL_PANIC struct hif_pci_softc *sc; struct ol_softc *scn; int status; diff --git a/Kbuild b/Kbuild index 98c0da8e8fcb..57ff90877935 100644 --- a/Kbuild +++ b/Kbuild @@ -142,6 +142,9 @@ CONFIG_QCA_SIGNED_SPLIT_BINARY_SUPPORT := 0 #Enable single firmware binary format CONFIG_QCA_SINGLE_BINARY_SUPPORT := 0 +#Enable collecting target RAM dump after kernel panic +CONFIG_TARGET_RAMDUMP_AFTER_KERNEL_PANIC := 1 + ifeq ($(CONFIG_CFG80211),y) HAVE_CFG80211 := 1 else @@ -1139,6 +1142,11 @@ ifeq ($(CONFIG_QCA_SINGLE_BINARY_SUPPORT), 1) CDEFINES += -DQCA_SINGLE_BINARY_SUPPORT endif +#Enable collecting target RAM dump after kernel panic +ifeq ($(CONFIG_TARGET_RAMDUMP_AFTER_KERNEL_PANIC), 1) +CDEFINES += -DTARGET_RAMDUMP_AFTER_KERNEL_PANIC +endif + # Fix build for GCC 4.7 EXTRA_CFLAGS += -Wno-maybe-uninitialized -Wno-unused-function -- cgit v1.2.3 From e92a8e36430b1759b14e2f60a47371f304886094 Mon Sep 17 00:00:00 2001 From: Dhanashri Atre Date: Thu, 27 Mar 2014 16:24:10 -0700 Subject: wlan: qcacld: Remove "msdu_chained" debug log Removing the log to print the msdu_chained value. This is impacting the SAP performance Change-Id: I65b38ac1a76598fa4bb34b0d5762632adb1e36fa CRs-Fixed: 639858 --- CORE/CLD_TXRX/HTT/htt_rx.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CORE/CLD_TXRX/HTT/htt_rx.c b/CORE/CLD_TXRX/HTT/htt_rx.c index c3154228ca48..d62932ee4f59 100644 --- a/CORE/CLD_TXRX/HTT/htt_rx.c +++ b/CORE/CLD_TXRX/HTT/htt_rx.c @@ -995,10 +995,6 @@ htt_rx_amsdu_pop_ll( msdu = next; msdu_chaining = 1; -#ifdef DEBUG_DMA_DONE - adf_os_print("msdu_chained %d!\n", msdu_chained); -#endif - if (msdu_chained == 0) { /* Trim the last one to the correct size - accounting for * inconsistent HW lengths cuasing length overflows and -- cgit v1.2.3 From dbfc4a38c68120e6073470d5c3d2524446debf7c Mon Sep 17 00:00:00 2001 From: Sunil Dutt Date: Wed, 26 Mar 2014 14:08:50 +0530 Subject: TDLS: Introduce TDLS_MGMT_VERSION2 to interop with updated tdls_mgmt. tdls_mgmt callback function in cfg80211 is enhanced to also include the peer capability information which shall be passed by the supplicant. To ensure the host driver interops with the both versions of tdls_mgmt implementation,a flag TDLS_MGMT_VERSION2 is defined in the kernel. Enhance the driver to rely on this flag and thus use the respective tdls_mgmt callback functionality. Change-Id: Ie91a3d41c64904f9fa251d2c364de477bbbef80c CRs-Fixed: 605665 --- CORE/HDD/inc/wlan_hdd_cfg80211.h | 3 +++ CORE/HDD/src/wlan_hdd_cfg80211.c | 18 ++++++++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/CORE/HDD/inc/wlan_hdd_cfg80211.h b/CORE/HDD/inc/wlan_hdd_cfg80211.h index 174896e552dd..17f9941dab27 100644 --- a/CORE/HDD/inc/wlan_hdd_cfg80211.h +++ b/CORE/HDD/inc/wlan_hdd_cfg80211.h @@ -92,6 +92,9 @@ #ifdef FEATURE_WLAN_TDLS #define WLAN_IS_TDLS_SETUP_ACTION(action) \ ((SIR_MAC_TDLS_SETUP_REQ <= action) && (SIR_MAC_TDLS_SETUP_CNF >= action)) +#if !defined (TDLS_MGMT_VERSION2) +#define TDLS_MGMT_VERSION2 0 +#endif #endif typedef struct { diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index 7eb2db32d027..495fd8855ec5 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -8871,9 +8871,15 @@ static int wlan_hdd_cfg80211_sched_scan_stop(struct wiphy *wiphy, #ifdef FEATURE_WLAN_TDLS +#if TDLS_MGMT_VERSION2 static int wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev, u8 *peer, u8 action_code, u8 dialog_token, - u16 status_code, const u8 *buf, size_t len) + u16 status_code, u32 peer_capability, const u8 *buf, size_t len) +#else +static int wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *dev, + u8 *peer, u8 action_code, u8 dialog_token, + u16 status_code, const u8 *buf, size_t len) +#endif { hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev); @@ -8884,6 +8890,10 @@ static int wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *d int responder; long rc; tANI_U16 numCurrTdlsPeers; +#if !(TDLS_MGMT_VERSION2) + u32 peer_capability; + peer_capability = 0; +#endif if (NULL == pHddCtx || NULL == pHddCtx->cfg_ini) { @@ -9334,9 +9344,13 @@ int wlan_hdd_cfg80211_send_tdls_discover_req(struct wiphy *wiphy, hddLog(VOS_TRACE_LEVEL_INFO, "tdls send discover req: "MAC_ADDRESS_STR, MAC_ADDR_ARRAY(peer)); - +#if TDLS_MGMT_VERSION2 + return wlan_hdd_cfg80211_tdls_mgmt(wiphy, dev, peer, + WLAN_TDLS_DISCOVERY_REQUEST, 1, 0, 0, NULL, 0); +#else return wlan_hdd_cfg80211_tdls_mgmt(wiphy, dev, peer, WLAN_TDLS_DISCOVERY_REQUEST, 1, 0, NULL, 0); +#endif } #endif -- cgit v1.2.3 From 6b6bb3c826913ecfd902d31977844f9875696484 Mon Sep 17 00:00:00 2001 From: Sachin Ahuja Date: Wed, 26 Mar 2014 19:21:29 +0530 Subject: qcacld: Remove the valid peer entries before StopBss currently in SAP mode, if the peer entry is created for STA and StopBss is received before sendinng the Assoc Indication to upper layer, the peer entry is not deleted. This was leading to a crash.Fix that. Change-Id: I6ac27ba466e1eb7a7774114f2bc557f0bb71cabd CRs-Fixed: 638173 --- CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c index 43f1e604bb7a..e96b75a372cf 100644 --- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c +++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c @@ -3541,7 +3541,8 @@ __limHandleSmeStopBssRequest(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) tpPESession psessionEntry; tANI_U8 smesessionId; tANI_U16 smetransactionId; - + tANI_U8 i = 0; + tpDphHashNode pStaDs = NULL; limGetSessionInfo(pMac,(tANI_U8 *)pMsgBuf,&smesessionId,&smetransactionId); @@ -3614,6 +3615,23 @@ __limHandleSmeStopBssRequest(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) //limDelBss is also called as part of coalescing, when we send DEL BSS followed by Add Bss msg. pMac->lim.gLimIbssCoalescingHappened = false; + for(i = 1 ; i < pMac->lim.gLimAssocStaLimit ; i++) + { + pStaDs = dphGetHashEntry(pMac, i, &psessionEntry->dph.dphHashTable); + if (NULL == pStaDs) + continue; + status = limDelSta(pMac, pStaDs, false, psessionEntry) ; + if(eSIR_SUCCESS == status) + { + limDeleteDphHashEntry(pMac, pStaDs->staAddr, pStaDs->assocId, psessionEntry) ; + limReleasePeerIdx(pMac, pStaDs->assocId, psessionEntry) ; + } + else + { + limLog(pMac, LOGE, FL("limDelSta failed with Status : %d"), status); + VOS_ASSERT(0) ; + } + } /* send a delBss to HAL and wait for a response */ status = limDelBss(pMac, NULL,psessionEntry->bssIdx,psessionEntry); -- cgit v1.2.3 From 1daba41fb6c5e695c175fd937a6428921f21f583 Mon Sep 17 00:00:00 2001 From: Xiaochang Duan Date: Fri, 28 Mar 2014 14:58:35 -0700 Subject: qcacld-new:Duplicate notifcation of IBSS join to cfg80211 Currently cfg80211 is updated with the BSS information during the IBSS start and as well during the IBSS Join. Removed the duplication of JOIN IBSS event to cfg80211. Change-Id: I061183134e6935d8bdf95d5fc077fa70607e3fc7 CRs-Fixed: 640013 --- CORE/HDD/src/wlan_hdd_assoc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/CORE/HDD/src/wlan_hdd_assoc.c b/CORE/HDD/src/wlan_hdd_assoc.c index 1fba85c41a9b..e520d6cbb9cd 100644 --- a/CORE/HDD/src/wlan_hdd_assoc.c +++ b/CORE/HDD/src/wlan_hdd_assoc.c @@ -1900,8 +1900,6 @@ static eHalStatus roamIbssConnectHandler( hdd_adapter_t *pAdapter, tCsrRoamInfo __func__, pAdapter->dev->name); return eHAL_STATUS_FAILURE; } - /* send ibss join indication to nl80211 */ - cfg80211_ibss_joined(pAdapter->dev, &pRoamInfo->bssid[0], GFP_KERNEL); cfg80211_put_bss( #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) WLAN_HDD_GET_CTX(pAdapter)->wiphy, -- cgit v1.2.3 From 56d9921b9513db771e42df2960d96aeb0807324a Mon Sep 17 00:00:00 2001 From: Rajesh Chauhan Date: Sun, 30 Mar 2014 09:03:26 -0700 Subject: qcacld: Pass correct phymode to FW for a TDLS peer as per its capability When AP is in 11b-only mode then for a TDLS peer, in the peer_assoc command to FW, pass phymode as per capability of the TDLS peer. Change-Id: I0a3be9325636dd21ce6426432567560ced04ebd5 CRs-Fixed: 640565 --- CORE/SERVICES/WMA/wma.c | 82 ++++++++++++++++++++++++++++++------------------- 1 file changed, 51 insertions(+), 31 deletions(-) diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index c080a0bde457..c06c2e8e6870 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -6445,43 +6445,62 @@ send_resp: wma_send_msg(wma, WDA_SWITCH_CHANNEL_RSP, (void *)params, 0); } -static WLAN_PHY_MODE wma_peer_phymode(tSirNwType nw_type, u_int8_t is_ht, - u_int8_t is_cw40, u_int8_t is_vht, u_int8_t is_cw_vht) +static WLAN_PHY_MODE wma_peer_phymode(tSirNwType nw_type, u_int8_t sta_type, + u_int8_t is_ht, u_int8_t is_cw40, u_int8_t is_vht, u_int8_t is_cw_vht) { WLAN_PHY_MODE phymode = MODE_UNKNOWN; switch (nw_type) { case eSIR_11B_NW_TYPE: - phymode = MODE_11B; +#ifdef FEATURE_WLAN_TDLS + if (STA_ENTRY_TDLS_PEER == sta_type) { + if (is_vht) { + if (is_cw_vht) + phymode = MODE_11AC_VHT80; + else + phymode = (is_cw40) ? + MODE_11AC_VHT40 : + MODE_11AC_VHT20; + } + else if (is_ht) { + phymode = (is_cw40) ? + MODE_11NG_HT40 : MODE_11NG_HT20; + } else + phymode = MODE_11B; + } else +#endif /* FEATURE_WLAN_TDLS */ + phymode = MODE_11B; break; case eSIR_11G_NW_TYPE: - if (is_vht) { - if (is_cw_vht) - phymode = MODE_11AC_VHT80; - else - phymode = (is_cw40) ? - MODE_11AC_VHT40 : - MODE_11AC_VHT20; - } - else if (is_ht) + if (is_vht) { + if (is_cw_vht) + phymode = MODE_11AC_VHT80; + else + phymode = (is_cw40) ? + MODE_11AC_VHT40 : + MODE_11AC_VHT20; + } + else if (is_ht) { phymode = (is_cw40) ? - MODE_11NG_HT40 : MODE_11NG_HT20; - else + MODE_11NG_HT40 : + MODE_11NG_HT20; + } else phymode = MODE_11G; break; case eSIR_11A_NW_TYPE: - if (is_vht) { - if (is_cw_vht) - phymode = MODE_11AC_VHT80; - else - phymode = (is_cw40) ? - MODE_11AC_VHT40 : - MODE_11AC_VHT20; - } - else if (is_ht) + if (is_vht) { + if (is_cw_vht) + phymode = MODE_11AC_VHT80; + else + phymode = (is_cw40) ? + MODE_11AC_VHT40 : + MODE_11AC_VHT20; + } + else if (is_ht) { phymode = (is_cw40) ? - MODE_11NA_HT40 : MODE_11NA_HT20; - else + MODE_11NA_HT40 : + MODE_11NA_HT20; + } else phymode = MODE_11A; break; default: @@ -6489,8 +6508,8 @@ static WLAN_PHY_MODE wma_peer_phymode(tSirNwType nw_type, u_int8_t is_ht, break; } WMA_LOGD("%s: nw_type %d is_ht %d is_cw40 %d is_vht %d is_cw_vht %d\ - phymode %d", __func__, nw_type, is_ht, is_cw40, - is_vht, is_cw_vht, phymode); + phymode %d", __func__, nw_type, is_ht, is_cw40, + is_vht, is_cw_vht, phymode); return phymode; } @@ -6550,10 +6569,11 @@ static int32_t wmi_unified_send_peer_assoc(tp_wma_handle wma, vos_mem_zero(&peer_legacy_rates, sizeof(wmi_rate_set)); vos_mem_zero(&peer_ht_rates, sizeof(wmi_rate_set)); - phymode = wma_peer_phymode(nw_type, params->htCapable, - params->txChannelWidthSet, - params->vhtCapable, - params->vhtTxChannelWidthSet); + phymode = wma_peer_phymode(nw_type, params->staType, + params->htCapable, + params->txChannelWidthSet, + params->vhtCapable, + params->vhtTxChannelWidthSet); /* Legacy Rateset */ rate_pos = (u_int8_t *) peer_legacy_rates.rates; -- cgit v1.2.3 From e3c04fd7ac4b1b60dfd1363901419c0352f815a7 Mon Sep 17 00:00:00 2001 From: Manikandaraja Venkatachalapathy Date: Sun, 30 Mar 2014 18:22:41 -0700 Subject: qcacld: CL 891944 - update fw common interface files Add tdls specific reason code in wmi header file. Change-Id: I61acb761063f71798324101a56ff9ec4e9271d56 CRs-Fixed: 640860 --- CORE/SERVICES/COMMON/wmi_unified.h | 1 + 1 file changed, 1 insertion(+) diff --git a/CORE/SERVICES/COMMON/wmi_unified.h b/CORE/SERVICES/COMMON/wmi_unified.h index 7eec4e4f9272..f95c0ad0e5ff 100644 --- a/CORE/SERVICES/COMMON/wmi_unified.h +++ b/CORE/SERVICES/COMMON/wmi_unified.h @@ -4591,6 +4591,7 @@ typedef enum wmi_peer_sta_kickout_reason { WMI_PEER_STA_KICKOUT_REASON_XRETRY = 1, WMI_PEER_STA_KICKOUT_REASON_INACTIVITY = 2, WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT = 3, + WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT = 4, /* TDLS peer has disappeared. All tx is failing */ } PEER_KICKOUT_REASON; typedef struct { -- cgit v1.2.3 From d415cc7d651d1925de2b87449797efa33807ac65 Mon Sep 17 00:00:00 2001 From: Rajesh Chauhan Date: Sun, 30 Mar 2014 10:28:21 -0700 Subject: qcacld: add handling of kickout event from FW for a TDLS peer Add handling of kickout event from FW for a TDLS peer so that TDLS peer is removed when FW detects TDLS link is lost. Change-Id: I6491e54befc09c7b24ce7c9ecf3fd149cef31d29 CRs-Fixed: 640555 --- CORE/SERVICES/WMA/wma.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index c06c2e8e6870..0dbc2da0fe65 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -829,9 +829,10 @@ static int wma_peer_sta_kickout_event_handler(void *handle, u8 *event, u32 len) return -EINVAL; } - WMA_LOGA("PEER:[%pM]\n BSSID:[%pM]\nINTERFACE:%d\npeer_ID:%d", - macaddr, wma->interfaces[vdev_id].addr, vdev_id, - peer_id); + WMA_LOGA("%s: PEER:[%pM], BSSID:[%pM], ADDR:[%pN], INTERFACE:%d, peer_id:%d, reason:%d", + __func__, macaddr, wma->interfaces[vdev_id].bssid, + wma->interfaces[vdev_id].addr, vdev_id, + peer_id, kickout_event->reason); if (kickout_event->reason == WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT) { p_inactivity = (tpSirIbssPeerInactivityInd) @@ -845,6 +846,26 @@ static int wma_peer_sta_kickout_event_handler(void *handle, u8 *event, u32 len) vos_mem_copy(p_inactivity->peerAddr, macaddr, IEEE80211_ADDR_LEN); wma_send_msg(wma, WDA_IBSS_PEER_INACTIVITY_IND, (void *)p_inactivity, 0); } +#ifdef FEATURE_WLAN_TDLS + else if (kickout_event->reason == + WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT) { + del_sta_ctx = + (tpDeleteStaContext)vos_mem_malloc(sizeof(tDeleteStaContext)); + if (!del_sta_ctx) { + WMA_LOGE("%s: mem alloc failed for tDeleteStaContext for TDLS peer: %pM", + __func__, macaddr); + return -EINVAL; + } + + del_sta_ctx->staId = peer_id; + vos_mem_copy(del_sta_ctx->addr2, macaddr, IEEE80211_ADDR_LEN); + vos_mem_copy(del_sta_ctx->bssId, wma->interfaces[vdev_id].bssid, + IEEE80211_ADDR_LEN); + del_sta_ctx->reasonCode = HAL_DEL_STA_REASON_CODE_KEEP_ALIVE; + wma_send_msg(wma, SIR_LIM_DELETE_STA_CONTEXT_IND, (void *)del_sta_ctx, + 0); + } +#endif /* FEATURE_WLAN_TDLS */ else { del_sta_ctx = (tpDeleteStaContext)vos_mem_malloc(sizeof(tDeleteStaContext)); -- cgit v1.2.3 From 21c2c2f0702b6418ceacffbf53e6ce317a44e102 Mon Sep 17 00:00:00 2001 From: Akash Patel Date: Mon, 31 Mar 2014 12:50:36 -0700 Subject: Cafstaging Release 1.0.0.77 Cafstaging Release 1.0.0.77 Change-Id: Ib16781f9f9b8e6478cbacd534865e309974dfdbe --- CORE/MAC/inc/qwlan_version.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CORE/MAC/inc/qwlan_version.h b/CORE/MAC/inc/qwlan_version.h index 6554e5c67cf2..99075fbbb1e1 100644 --- a/CORE/MAC/inc/qwlan_version.h +++ b/CORE/MAC/inc/qwlan_version.h @@ -42,9 +42,9 @@ BRIEF DESCRIPTION: #define QWLAN_VERSION_MINOR 0 #define QWLAN_VERSION_PATCH 0 #define QWLAN_VERSION_EXTRA "" -#define QWLAN_VERSION_BUILD 76 +#define QWLAN_VERSION_BUILD 77 -#define QWLAN_VERSIONSTR "1.0.0.76" +#define QWLAN_VERSIONSTR "1.0.0.77" #ifdef QCA_WIFI_2_0 -- cgit v1.2.3