diff options
| -rw-r--r-- | CORE/HDD/inc/wlan_hdd_main.h | 11 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 1 | ||||
| -rwxr-xr-x | CORE/HDD/src/wlan_hdd_main.c | 48 |
3 files changed, 38 insertions, 22 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h index c78f9b60bb63..f36ff2b519b5 100644 --- a/CORE/HDD/inc/wlan_hdd_main.h +++ b/CORE/HDD/inc/wlan_hdd_main.h @@ -1813,4 +1813,15 @@ const char *hdd_get_fwpath(void); uint8_t wlan_hdd_find_opclass(tHalHandle hal, uint8_t channel, uint8_t bw_offset); +#ifdef QCA_LL_TX_FLOW_CT +void wlan_hdd_clean_tx_flow_control_timer(hdd_context_t *hddctx, + hdd_adapter_t *adapter); +#else +static inline void +wlan_hdd_clean_tx_flow_control_timer(hdd_context_t *hddctx, + hdd_adapter_t *adapter) +{ +} +#endif + #endif // end #if !defined( WLAN_HDD_MAIN_H ) diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index 19bdeb048c9e..1cd8790e8dc4 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -12964,6 +12964,7 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy, case NL80211_IFTYPE_ADHOC: wlan_hdd_tdls_exit(pAdapter); + wlan_hdd_clean_tx_flow_control_timer(pHddCtx, pAdapter); hddLog(LOG1, FL("Setting interface Type to ADHOC")); wlan_hdd_change_iface_to_adhoc(ndev, pRoamProfile, type); break; diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index a14d598d9180..8f37cb0812ad 100755 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -325,6 +325,30 @@ const char* hdd_device_mode_to_string(uint8_t device_mode) } } +#ifdef QCA_LL_TX_FLOW_CT + +/** + * wlan_hdd_clean_tx_flow_control_timer - Function cleans tx flow control timer + * @hddctx: pointer to hddctx + * @hdd_adapter_t: pointer to hdd_adapter_t + * + * Function deregister's, destroy tx flow control timer + * + * Return: None + */ +void wlan_hdd_clean_tx_flow_control_timer(hdd_context_t *hddctx, + hdd_adapter_t *adapter) +{ + WLANTL_DeRegisterTXFlowControl(hddctx->pvosContext, + adapter->sessionId); + if (adapter->tx_flow_timer_initialized == VOS_TRUE) { + vos_timer_destroy(&adapter->tx_flow_control_timer); + adapter->tx_flow_timer_initialized = VOS_FALSE; + } +} + +#endif + /** * wlan_hdd_find_opclass() - Find operating class for a channel * @hal: handler to HAL @@ -9195,17 +9219,7 @@ VOS_STATUS hdd_stop_adapter( hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter, cancel_work_sync(&pAdapter->ipv4NotifierWorkQueue); #endif -#ifdef QCA_LL_TX_FLOW_CT - WLANTL_DeRegisterTXFlowControl(pHddCtx->pvosContext, pAdapter->sessionId); - if (pAdapter->tx_flow_timer_initialized == VOS_TRUE) { - if(VOS_TIMER_STATE_STOPPED != - vos_timer_getCurrentState(&pAdapter->tx_flow_control_timer)) { - vos_timer_stop(&pAdapter->tx_flow_control_timer); - } - vos_timer_destroy(&pAdapter->tx_flow_control_timer); - pAdapter->tx_flow_timer_initialized = VOS_FALSE; - } -#endif /* QCA_LL_TX_FLOW_CT */ + wlan_hdd_clean_tx_flow_control_timer(pHddCtx, pAdapter); #ifdef WLAN_NS_OFFLOAD #ifdef WLAN_OPEN_SOURCE @@ -9256,17 +9270,7 @@ VOS_STATUS hdd_stop_adapter( hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter, hdd_set_sap_auth_offload(pAdapter, FALSE); -#ifdef QCA_LL_TX_FLOW_CT - WLANTL_DeRegisterTXFlowControl(pHddCtx->pvosContext, pAdapter->sessionId); - if (pAdapter->tx_flow_timer_initialized == VOS_TRUE) { - if(VOS_TIMER_STATE_STOPPED != - vos_timer_getCurrentState(&pAdapter->tx_flow_control_timer)) { - vos_timer_stop(&pAdapter->tx_flow_control_timer); - } - vos_timer_destroy(&pAdapter->tx_flow_control_timer); - pAdapter->tx_flow_timer_initialized = VOS_FALSE; - } -#endif /* QCA_LL_TX_FLOW_CT */ + wlan_hdd_clean_tx_flow_control_timer(pHddCtx, pAdapter); mutex_lock(&pHddCtx->sap_lock); if (test_bit(SOFTAP_BSS_STARTED, &pAdapter->event_flags)) |
