diff options
| author | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2015-03-03 19:44:53 +0530 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2015-03-03 19:46:06 +0530 |
| commit | afce6a4bdadb3cc447639d4be1a616ad135bcd1b (patch) | |
| tree | 2632acc6977ac06cba55451cb64cb5fb263a33cb | |
| parent | 8a46a63df3d3678bb1c1970a33c2573ad384df64 (diff) | |
| parent | 74350a9c31b62197422496256dc7688f15100005 (diff) | |
Release 4.0.10.46 QCACLD WLAN Driver
Merge remote-tracking branch 'origin/caf/caf-wlan/master' into HEAD
* origin/caf/caf-wlan/master:
Cafstaging Release 4.0.10.46
qcacld: Separate Tx desc pool for two VDEV for MCC Tx flow control
qcacld-2.0: Making sure there is no active entry during unload
qcacld-2.0: Reset pHddCtx->btCoexModeSet value after a shutdown
qcacld-2.0: Fix Crash in csrProcessScanCommand
qcacld-2.0: Need to free Active sessions in case of SSR
qcacld-2.0: HDD: Reinitialization of extended scan callback function
qcacld-2.0: Protect standard hostapd ioctls from SSR
qcacld-2.0: Flush Stale scan results for PNO Scan
qcacld-2.0: Accept RoC even if sta interface is in connecting state
qcacld-2.0: Protect netdev ops functions from SSR
Change-Id: Icbd557d56675f0ecf9fb7f195529c706f09d6031
| -rw-r--r-- | CORE/CLD_TXRX/TXRX/ol_tx.c | 26 | ||||
| -rw-r--r-- | CORE/CLD_TXRX/TXRX/ol_tx_send.c | 27 | ||||
| -rw-r--r-- | CORE/CLD_TXRX/TXRX/ol_txrx.c | 10 | ||||
| -rw-r--r-- | CORE/HDD/inc/wlan_hdd_cfg.h | 14 | ||||
| -rw-r--r-- | CORE/HDD/inc/wlan_hdd_main.h | 2 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 169 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_early_suspend.c | 5 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_hostapd.c | 355 | ||||
| -rwxr-xr-x | CORE/HDD/src/wlan_hdd_main.c | 252 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_p2p.c | 7 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_tx_rx.c | 51 | ||||
| -rw-r--r-- | CORE/MAC/inc/qwlan_version.h | 4 | ||||
| -rw-r--r-- | CORE/SME/src/csr/csrApiScan.c | 4 |
13 files changed, 640 insertions, 286 deletions
diff --git a/CORE/CLD_TXRX/TXRX/ol_tx.c b/CORE/CLD_TXRX/TXRX/ol_tx.c index 7e469e43596f..ff0d49335605 100644 --- a/CORE/CLD_TXRX/TXRX/ol_tx.c +++ b/CORE/CLD_TXRX/TXRX/ol_tx.c @@ -536,33 +536,7 @@ ol_tx_hl_base( */ next = adf_nbuf_next(msdu); -#if defined(CONFIG_PER_VDEV_TX_DESC_POOL) - if (adf_os_atomic_read(&vdev->tx_desc_count) > - ((ol_tx_desc_pool_size_hl(pdev->ctrl_pdev) >> 1) - - TXRX_HL_TX_FLOW_CTRL_MGMT_RESERVED)) { -#ifdef QCA_LL_TX_FLOW_CT - /* Give tx desc to avoid drop because net_if will stop later */ - tx_desc = ol_tx_desc_hl(pdev, vdev, msdu, &tx_msdu_info); - - adf_os_spin_lock_bh(&pdev->tx_mutex); - if ( !(adf_os_atomic_read(&vdev->os_q_paused)) ) { - /* pause netif_queue */ - adf_os_atomic_set(&vdev->os_q_paused, 1); - adf_os_spin_unlock_bh(&pdev->tx_mutex); - vdev->osif_flow_control_cb(vdev->osif_dev, - vdev->vdev_id, A_FALSE); - } else { - adf_os_spin_unlock_bh(&pdev->tx_mutex); - } -#else - tx_desc = NULL; -#endif /* QCA_LL_TX_FLOW_CT */ - } else { - tx_desc = ol_tx_desc_hl(pdev, vdev, msdu, &tx_msdu_info); - } -#else /* CONFIG_PER_VDEV_TX_DESC_POOL */ tx_desc = ol_tx_desc_hl(pdev, vdev, msdu, &tx_msdu_info); -#endif /* CONFIG_PER_VDEV_TX_DESC_POOL */ if (! tx_desc) { /* diff --git a/CORE/CLD_TXRX/TXRX/ol_tx_send.c b/CORE/CLD_TXRX/TXRX/ol_tx_send.c index f53ee9a90205..ccb48eb643fc 100644 --- a/CORE/CLD_TXRX/TXRX/ol_tx_send.c +++ b/CORE/CLD_TXRX/TXRX/ol_tx_send.c @@ -58,6 +58,7 @@ #include <ol_txrx_encap.h> /* OL_TX_RESTORE_HDR, etc*/ #endif #include <ol_tx_queue.h> +#include <ol_txrx.h> #ifdef TX_CREDIT_RECLAIM_SUPPORT @@ -111,6 +112,31 @@ #endif #ifdef QCA_LL_TX_FLOW_CT +#ifdef CONFIG_PER_VDEV_TX_DESC_POOL +#define OL_TX_FLOW_CT_UNPAUSE_OS_Q(pdev) \ +do { \ + struct ol_txrx_vdev_t *vdev; \ + TAILQ_FOREACH(vdev, &pdev->vdev_list, vdev_list_elem) { \ + if (adf_os_atomic_read(&vdev->os_q_paused) && \ + (vdev->tx_fl_hwm != 0)) { \ + adf_os_spin_lock(&pdev->tx_mutex); \ + if (((ol_tx_desc_pool_size_hl(vdev->pdev->ctrl_pdev) >> 1) \ + - TXRX_HL_TX_FLOW_CTRL_MGMT_RESERVED) \ + - adf_os_atomic_read(&vdev->tx_desc_count) \ + > vdev->tx_fl_hwm) \ + { \ + adf_os_atomic_set(&vdev->os_q_paused, 0); \ + adf_os_spin_unlock(&pdev->tx_mutex); \ + vdev->osif_flow_control_cb(vdev->osif_dev, \ + vdev->vdev_id, A_TRUE); \ + } \ + else { \ + adf_os_spin_unlock(&pdev->tx_mutex); \ + } \ + } \ + } \ +} while(0) +#else #define OL_TX_FLOW_CT_UNPAUSE_OS_Q(pdev) \ do { \ struct ol_txrx_vdev_t *vdev; \ @@ -130,6 +156,7 @@ do { } \ } \ } while(0) +#endif #else #define OL_TX_FLOW_CT_UNPAUSE_OS_Q(pdev) #endif /* QCA_LL_TX_FLOW_CT */ diff --git a/CORE/CLD_TXRX/TXRX/ol_txrx.c b/CORE/CLD_TXRX/TXRX/ol_txrx.c index 3635fd612c9d..bbfdc0a5c508 100644 --- a/CORE/CLD_TXRX/TXRX/ol_txrx.c +++ b/CORE/CLD_TXRX/TXRX/ol_txrx.c @@ -2181,7 +2181,15 @@ ol_txrx_get_tx_resource( ) { adf_os_spin_lock_bh(&vdev->pdev->tx_mutex); - if (vdev->pdev->tx_desc.num_free < (u_int16_t)low_watermark) { +#ifdef CONFIG_PER_VDEV_TX_DESC_POOL + if (((ol_tx_desc_pool_size_hl(vdev->pdev->ctrl_pdev) >> 1) + - TXRX_HL_TX_FLOW_CTRL_MGMT_RESERVED) + - adf_os_atomic_read(&vdev->tx_desc_count) + < (u_int16_t)low_watermark) +#else + if (vdev->pdev->tx_desc.num_free < (u_int16_t)low_watermark) +#endif + { vdev->tx_fl_lwm = (u_int16_t)low_watermark; vdev->tx_fl_hwm = (u_int16_t)(low_watermark + high_watermark_offset); /* Not enough free resource, stop TX OS Q */ diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h index 5155490687b5..4ff0d7cdd892 100644 --- a/CORE/HDD/inc/wlan_hdd_cfg.h +++ b/CORE/HDD/inc/wlan_hdd_cfg.h @@ -2275,10 +2275,11 @@ This feature requires the dependent cfg.ini "gRoamPrefer5GHz" set to 1 */ #define CFG_LL_TX_LBW_FLOW_LWM "TxLbwFlowLowWaterMark" #define CFG_LL_TX_LBW_FLOW_LWM_MIN ( 0 ) -#define CFG_LL_TX_LBW_FLOW_LWM_MAX ( 1000 ) #if defined(CONFIG_HL_SUPPORT) -#define CFG_LL_TX_LBW_FLOW_LWM_DEFAULT ( 0 ) +#define CFG_LL_TX_LBW_FLOW_LWM_MAX ( 2300 ) +#define CFG_LL_TX_LBW_FLOW_LWM_DEFAULT ( 2250 ) #else +#define CFG_LL_TX_LBW_FLOW_LWM_MAX ( 1000 ) #define CFG_LL_TX_LBW_FLOW_LWM_DEFAULT ( 450 ) #endif /* defined(CONFIG_HL_SUPPORT) */ @@ -2286,7 +2287,7 @@ This feature requires the dependent cfg.ini "gRoamPrefer5GHz" set to 1 */ #define CFG_LL_TX_LBW_FLOW_HWM_OFFSET_MIN ( 0 ) #define CFG_LL_TX_LBW_FLOW_HWM_OFFSET_MAX ( 300 ) #if defined(CONFIG_HL_SUPPORT) -#define CFG_LL_TX_LBW_FLOW_HWM_OFFSET_DEFAULT ( 0 ) +#define CFG_LL_TX_LBW_FLOW_HWM_OFFSET_DEFAULT ( 40 ) #else #define CFG_LL_TX_LBW_FLOW_HWM_OFFSET_DEFAULT ( 50 ) #endif /* defined(CONFIG_HL_SUPPORT) */ @@ -2298,10 +2299,11 @@ This feature requires the dependent cfg.ini "gRoamPrefer5GHz" set to 1 */ #define CFG_LL_TX_HBW_FLOW_LWM "TxHbwFlowLowWaterMark" #define CFG_LL_TX_HBW_FLOW_LWM_MIN ( 0 ) -#define CFG_LL_TX_HBW_FLOW_LWM_MAX ( 1000 ) #if defined(CONFIG_HL_SUPPORT) -#define CFG_LL_TX_HBW_FLOW_LWM_DEFAULT ( 0 ) +#define CFG_LL_TX_HBW_FLOW_LWM_MAX ( 2300 ) +#define CFG_LL_TX_HBW_FLOW_LWM_DEFAULT ( 2150 ) #else +#define CFG_LL_TX_HBW_FLOW_LWM_MAX ( 1000 ) #define CFG_LL_TX_HBW_FLOW_LWM_DEFAULT ( 406 ) #endif /* defined(CONFIG_HL_SUPPORT) */ @@ -2309,7 +2311,7 @@ This feature requires the dependent cfg.ini "gRoamPrefer5GHz" set to 1 */ #define CFG_LL_TX_HBW_FLOW_HWM_OFFSET_MIN ( 0 ) #define CFG_LL_TX_HBW_FLOW_HWM_OFFSET_MAX ( 300 ) #if defined(CONFIG_HL_SUPPORT) -#define CFG_LL_TX_HBW_FLOW_HWM_OFFSET_DEFAULT ( 0 ) +#define CFG_LL_TX_HBW_FLOW_HWM_OFFSET_DEFAULT ( 140 ) #else #define CFG_LL_TX_HBW_FLOW_HWM_OFFSET_DEFAULT ( 94 ) #endif /* defined(CONFIG_HL_SUPPORT) */ diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h index 4d826fdf10d2..b95984db82d7 100644 --- a/CORE/HDD/inc/wlan_hdd_main.h +++ b/CORE/HDD/inc/wlan_hdd_main.h @@ -1629,7 +1629,7 @@ int wlan_hdd_validate_context(hdd_context_t *pHddCtx); v_BOOL_t hdd_is_valid_mac_address(const tANI_U8* pMacAddr); VOS_STATUS hdd_issta_p2p_clientconnected(hdd_context_t *pHddCtx); void hdd_ipv4_notifier_work_queue(struct work_struct *work); -v_BOOL_t hdd_isConnectionInProgress( hdd_context_t *pHddCtx ); +bool hdd_isConnectionInProgress(hdd_context_t *pHddCtx, bool is_roc); #ifdef WLAN_FEATURE_PACKET_FILTERING int wlan_hdd_setIPv6Filter(hdd_context_t *pHddCtx, tANI_U8 filterType, tANI_U8 sessionId); #endif diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index 0e1c2dbb1778..44a7366b8da2 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -10233,86 +10233,101 @@ allow_suspend: } /* - * FUNCTION: hdd_isConnectionInProgress + * hdd_isConnectionInProgress() - HDD function to check connection in progress + * @pHddCtx - HDD context + * @is_roc - roc + * * Go through each adapter and check if Connection is in progress * + * Return: true if connection in progress; false otherwise. */ -v_BOOL_t hdd_isConnectionInProgress( hdd_context_t *pHddCtx ) +bool hdd_isConnectionInProgress(hdd_context_t *pHddCtx, bool is_roc) { - hdd_adapter_list_node_t *pAdapterNode = NULL, *pNext = NULL; - hdd_station_ctx_t *pHddStaCtx = NULL; - hdd_adapter_t *pAdapter = NULL; - VOS_STATUS status = 0; - v_U8_t staId = 0; - v_U8_t *staMac = NULL; - - if (TRUE == pHddCtx->btCoexModeSet) - { - VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO, - FL("BTCoex Mode operation in progress")); - return VOS_TRUE; - } - - status = hdd_get_front_adapter ( pHddCtx, &pAdapterNode ); - - while ( NULL != pAdapterNode && VOS_STATUS_SUCCESS == status ) - { - pAdapter = pAdapterNode->pAdapter; + hdd_adapter_list_node_t *pAdapterNode = NULL, *pNext = NULL; + hdd_station_ctx_t *pHddStaCtx = NULL; + hdd_adapter_t *pAdapter = NULL; + VOS_STATUS status = 0; + v_U8_t staId = 0; + v_U8_t *staMac = NULL; + + if (TRUE == pHddCtx->btCoexModeSet) { + hddLog(LOG1, FL("BTCoex Mode operation in progress")); + return true; + } - if( pAdapter ) - { - hddLog(LOG1, FL("Adapter with device mode %s(%d) exists"), - hdd_device_mode_to_string(pAdapter->device_mode), - pAdapter->device_mode); - if (((WLAN_HDD_INFRA_STATION == pAdapter->device_mode) || - (WLAN_HDD_P2P_CLIENT == pAdapter->device_mode) || - (WLAN_HDD_P2P_DEVICE == pAdapter->device_mode)) && - (eConnectionState_Connecting == - (WLAN_HDD_GET_STATION_CTX_PTR(pAdapter))->conn_info.connState)) - { - hddLog(VOS_TRACE_LEVEL_ERROR, - "%s: %p(%d) Connection is in progress", __func__, - WLAN_HDD_GET_STATION_CTX_PTR(pAdapter), pAdapter->sessionId); - return VOS_TRUE; - } - if ((WLAN_HDD_INFRA_STATION == pAdapter->device_mode) || - (WLAN_HDD_P2P_CLIENT == pAdapter->device_mode) || - (WLAN_HDD_P2P_DEVICE == pAdapter->device_mode)) - { - pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter); - if ((eConnectionState_Associated == pHddStaCtx->conn_info.connState) && - (VOS_FALSE == pHddStaCtx->conn_info.uIsAuthenticated)) - { - staMac = (v_U8_t *) &(pAdapter->macAddressCurrent.bytes[0]); - hddLog(VOS_TRACE_LEVEL_ERROR, - "%s: client " MAC_ADDRESS_STR " is in the middle of WPS/EAPOL exchange.", - __func__,MAC_ADDR_ARRAY(staMac)); - return VOS_TRUE; - } - } - else if ((WLAN_HDD_SOFTAP == pAdapter->device_mode) || - (WLAN_HDD_P2P_GO == pAdapter->device_mode)) - { - for (staId = 0; staId < WLAN_MAX_STA_COUNT; staId++) - { - if ((pAdapter->aStaInfo[staId].isUsed) && - (WLANTL_STA_CONNECTED == pAdapter->aStaInfo[staId].tlSTAState)) - { - staMac = (v_U8_t *) &(pAdapter->aStaInfo[staId].macAddrSTA.bytes[0]); + status = hdd_get_front_adapter(pHddCtx, &pAdapterNode); + + while (NULL != pAdapterNode && VOS_STATUS_SUCCESS == status) { + pAdapter = pAdapterNode->pAdapter; + + if (pAdapter) { + hddLog(LOG1, FL("Adapter with device mode %s(%d) exists"), + hdd_device_mode_to_string(pAdapter->device_mode), + pAdapter->device_mode); + if ((((!is_roc) && + (WLAN_HDD_INFRA_STATION == + pAdapter->device_mode)) || + (WLAN_HDD_P2P_CLIENT == + pAdapter->device_mode) || + (WLAN_HDD_P2P_DEVICE == + pAdapter->device_mode)) && + (eConnectionState_Connecting == + (WLAN_HDD_GET_STATION_CTX_PTR(pAdapter))-> + conn_info.connState)) { + hddLog(LOGE, + FL("%p(%d) Connection is in progress"), + WLAN_HDD_GET_STATION_CTX_PTR(pAdapter), + pAdapter->sessionId); + return true; + } - hddLog(VOS_TRACE_LEVEL_ERROR, - "%s: client " MAC_ADDRESS_STR " of SoftAP/P2P-GO is in the " - "middle of WPS/EAPOL exchange.", __func__, - MAC_ADDR_ARRAY(staMac)); - return VOS_TRUE; - } - } - } - } - status = hdd_get_next_adapter ( pHddCtx, pAdapterNode, &pNext ); - pAdapterNode = pNext; - } - return VOS_FALSE; + if (((!is_roc) && + (WLAN_HDD_INFRA_STATION == + pAdapter->device_mode)) || + (WLAN_HDD_P2P_CLIENT == + pAdapter->device_mode) || + (WLAN_HDD_P2P_DEVICE == + pAdapter->device_mode)) { + pHddStaCtx = + WLAN_HDD_GET_STATION_CTX_PTR(pAdapter); + if ((eConnectionState_Associated == + pHddStaCtx->conn_info.connState) && + (VOS_FALSE == + pHddStaCtx->conn_info. + uIsAuthenticated)) { + staMac = (v_U8_t *) &(pAdapter-> + macAddressCurrent.bytes[0]); + hddLog(LOGE, + FL("client " MAC_ADDRESS_STR " is in the middle of WPS/EAPOL exchange."), + MAC_ADDR_ARRAY(staMac)); + return true; + } + } else if ((WLAN_HDD_SOFTAP == pAdapter->device_mode) || + (WLAN_HDD_P2P_GO == pAdapter->device_mode)) { + for (staId = 0; staId < WLAN_MAX_STA_COUNT; + staId++) { + if ((pAdapter->aStaInfo[staId]. + isUsed) && + (WLANTL_STA_CONNECTED == + pAdapter->aStaInfo[staId]. + tlSTAState)) { + staMac = (v_U8_t *) &(pAdapter-> + aStaInfo[staId]. + macAddrSTA.bytes[0]); + + hddLog(LOGE, + FL("client " MAC_ADDRESS_STR " of SoftAP/P2P-GO is in the " + "middle of WPS/EAPOL exchange."), + MAC_ADDR_ARRAY(staMac)); + return true; + } + } + } + } + status = hdd_get_next_adapter(pHddCtx, pAdapterNode, &pNext); + pAdapterNode = pNext; + } + return false; } static void wlan_hdd_cfg80211_scan_block_cb(struct work_struct *work) @@ -10483,9 +10498,8 @@ int __wlan_hdd_cfg80211_scan( struct wiphy *wiphy, /* Check if scan is allowed at this point of time. */ - if (hdd_isConnectionInProgress(pHddCtx)) - { - hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Scan not allowed", __func__); + if (hdd_isConnectionInProgress(pHddCtx, false)) { + hddLog(LOGE, FL("Scan not allowed")); return -EBUSY; } @@ -14039,6 +14053,7 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy, * that the wlan wakelock which was held in the wlan_hdd_cfg80211_scan * function. */ + sme_ScanFlushResult(hHal, pAdapter->sessionId); if (TRUE == pScanInfo->mScanPending) { ret = wlan_hdd_scan_abort(pAdapter); diff --git a/CORE/HDD/src/wlan_hdd_early_suspend.c b/CORE/HDD/src/wlan_hdd_early_suspend.c index b4e11b52bf56..b97d44e38525 100644 --- a/CORE/HDD/src/wlan_hdd_early_suspend.c +++ b/CORE/HDD/src/wlan_hdd_early_suspend.c @@ -2169,6 +2169,7 @@ VOS_STATUS hdd_wlan_re_init(void *hif_sc) pHddCtx->isLogpInProgress = FALSE; vos_set_logp_in_progress(VOS_MODULE_ID_VOSS, FALSE); pHddCtx->hdd_mcastbcast_filter_set = FALSE; + pHddCtx->btCoexModeSet = false; hdd_register_mcast_bcast_filter(pHddCtx); hdd_ssr_timer_del(); @@ -2184,6 +2185,10 @@ VOS_STATUS hdd_wlan_re_init(void *hif_sc) goto err_unregister_pmops; } vos_set_reinit_in_progress(VOS_MODULE_ID_VOSS, FALSE); +#ifdef FEATURE_WLAN_EXTSCAN + sme_ExtScanRegisterCallback(pHddCtx->hHal, + wlan_hdd_cfg80211_extscan_callback); +#endif /* FEATURE_WLAN_EXTSCAN */ #ifdef WLAN_FEATURE_LPSS wlan_hdd_send_all_scan_intf_info(pHddCtx); diff --git a/CORE/HDD/src/wlan_hdd_hostapd.c b/CORE/HDD/src/wlan_hdd_hostapd.c index e4c20f4d7c16..a037f0932278 100644 --- a/CORE/HDD/src/wlan_hdd_hostapd.c +++ b/CORE/HDD/src/wlan_hdd_hostapd.c @@ -3760,60 +3760,94 @@ int iw_get_WPSPBCProbeReqIEs(struct net_device *dev, return ret; } -/**--------------------------------------------------------------------------- - - \brief iw_set_auth_hostap() - - This function sets the auth type received from the wpa_supplicant. - - \param - dev - Pointer to the net device. - - info - Pointer to the iw_request_info. - - wrqu - Pointer to the iwreq_data. - - extra - Pointer to the data. - \return - 0 for success, non zero for failure - - --------------------------------------------------------------------------*/ +/** + * __iw_set_auth_hostap() - This function sets the auth type received + * from the wpa_supplicant. + * + * @dev - Pointer to the net device. + * @info - Pointer to the iw_request_info. + * @wrqu - Pointer to the iwreq_data. + * @extra - Pointer to the data. + * + * Return: 0 for success, non zero for failure. + */ static int -iw_set_auth_hostap(struct net_device *dev,struct iw_request_info *info, - union iwreq_data *wrqu,char *extra) +__iw_set_auth_hostap(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) { - hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev); - hdd_wext_state_t *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter); - - ENTER(); - switch(wrqu->param.flags & IW_AUTH_INDEX) - { - case IW_AUTH_TKIP_COUNTERMEASURES: - { - if(wrqu->param.value) { - hddLog(VOS_TRACE_LEVEL_INFO_HIGH, - "Counter Measure started %d", wrqu->param.value); - pWextState->mTKIPCounterMeasures = TKIP_COUNTER_MEASURE_STARTED; - } - else { - hddLog(VOS_TRACE_LEVEL_INFO_HIGH, - "Counter Measure stopped=%d", wrqu->param.value); - pWextState->mTKIPCounterMeasures = TKIP_COUNTER_MEASURE_STOPED; - } - - hdd_softap_tkip_mic_fail_counter_measure(pAdapter, - wrqu->param.value); - } - break; + hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev); + hdd_wext_state_t *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter); + + ENTER(); + switch (wrqu->param.flags & IW_AUTH_INDEX) { + case IW_AUTH_TKIP_COUNTERMEASURES: + if (wrqu->param.value) { + hddLog(LOG2, + FL("Counter Measure started(%d)"), + wrqu->param.value); + pWextState->mTKIPCounterMeasures = + TKIP_COUNTER_MEASURE_STARTED; + } else { + hddLog(LOG2, + FL("Counter Measure stopped(%d)"), + wrqu->param.value); + pWextState->mTKIPCounterMeasures = + TKIP_COUNTER_MEASURE_STOPED; + } + + hdd_softap_tkip_mic_fail_counter_measure(pAdapter, + wrqu->param.value); + break; + + default: + hddLog(LOGW, FL("called with unsupported auth type %d"), + wrqu->param.flags & IW_AUTH_INDEX); + break; + } + + EXIT(); + return 0; +} - default: +/** + * iw_set_auth_hostap() - Wrapper function to protect __iw_set_auth_hostap + * from the SSR. + * + * @dev - Pointer to the net device. + * @info - Pointer to the iw_request_info. + * @wrqu - Pointer to the iwreq_data. + * @extra - Pointer to the data. + * + * Return: 0 for success, non zero for failure. + */ +static int +iw_set_auth_hostap(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + int ret; - hddLog(LOGW, "%s called with unsupported auth type %d", __func__, - wrqu->param.flags & IW_AUTH_INDEX); - break; - } + vos_ssr_protect(__func__); + ret = __iw_set_auth_hostap(dev, info, wrqu, extra); + vos_ssr_unprotect(__func__); - EXIT(); - return 0; + return ret; } -static int iw_set_ap_encodeext(struct net_device *dev, - struct iw_request_info *info, - union iwreq_data *wrqu, char *extra) +/** + * __iw_set_ap_encodeext() - set ap encode + * + * @dev - Pointer to the net device. + * @info - Pointer to the iw_request_info. + * @wrqu - Pointer to the iwreq_data. + * @extra - Pointer to the data. + * + * Return: 0 for success, non zero for failure. + */ +static int __iw_set_ap_encodeext(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) { hdd_adapter_t *pHostapdAdapter = (netdev_priv(dev)); #ifndef WLAN_FEATURE_MBSSID @@ -4001,6 +4035,30 @@ static int iw_set_ap_encodeext(struct net_device *dev, return retval; } +/** + * iw_set_ap_encodeext() - Wrapper function to protect __iw_set_ap_encodeext + * from the SSR. + * + * @dev - Pointer to the net device. + * @info - Pointer to the iw_request_info. + * @wrqu - Pointer to the iwreq_data. + * @extra - Pointer to the data. + * + * Return: 0 for success, non zero for failure. + */ +static int iw_set_ap_encodeext(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + int ret; + + vos_ssr_protect(__func__); + ret = __iw_set_ap_encodeext(dev, info, wrqu, extra); + vos_ssr_unprotect(__func__); + + return ret; +} + static int iw_set_ap_mlme(struct net_device *dev, struct iw_request_info *info, @@ -4050,32 +4108,98 @@ static int iw_set_ap_mlme(struct net_device *dev, // return status; } +/** + * __iw_get_ap_rts_threshold() - get ap rts threshold + * @dev - Pointer to the net device. + * @info - Pointer to the iw_request_info. + * @wrqu - Pointer to the iwreq_data. + * @extra - Pointer to the data. + * + * Return: 0 for success, non zero for failure. + */ +static int __iw_get_ap_rts_threshold(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + hdd_adapter_t *pHostapdAdapter = netdev_priv(dev); + return hdd_wlan_get_rts_threshold(pHostapdAdapter, wrqu); +} + +/** + * iw_get_ap_rts_threshold() - Wrapper function to protect + * __iw_get_ap_rts_threshold from the SSR. + * @dev - Pointer to the net device. + * @info - Pointer to the iw_request_info. + * @wrqu - Pointer to the iwreq_data. + * @extra - Pointer to the data. + * + * Return: 0 for success, non zero for failure. + */ static int iw_get_ap_rts_threshold(struct net_device *dev, - struct iw_request_info *info, - union iwreq_data *wrqu, char *extra) + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) { - hdd_adapter_t *pHostapdAdapter = (netdev_priv(dev)); - v_U32_t status = 0; + int ret; - status = hdd_wlan_get_rts_threshold(pHostapdAdapter, wrqu); + vos_ssr_protect(__func__); + ret = __iw_get_ap_rts_threshold(dev, info, wrqu, extra); + vos_ssr_unprotect(__func__); - return status; + return ret; +} + +/** + * __iw_get_ap_frag_threshold() - get ap fragmentation threshold + * @dev - Pointer to the net device. + * @info - Pointer to the iw_request_info. + * @wrqu - Pointer to the iwreq_data. + * @extra - Pointer to the data. + * + * Return: 0 for success, non zero for failure. + */ +static int __iw_get_ap_frag_threshold(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + hdd_adapter_t *pHostapdAdapter = netdev_priv(dev); + return hdd_wlan_get_frag_threshold(pHostapdAdapter, wrqu); } +/** + * iw_get_ap_frag_threshold() - Wrapper function to protect + * __iw_get_ap_frag_threshold from the SSR. + * @dev - Pointer to the net device. + * @info - Pointer to the iw_request_info. + * @wrqu - Pointer to the iwreq_data. + * @extra - Pointer to the data. + * + * Return: 0 for success, non zero for failure. + */ static int iw_get_ap_frag_threshold(struct net_device *dev, - struct iw_request_info *info, - union iwreq_data *wrqu, char *extra) + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) { - hdd_adapter_t *pHostapdAdapter = (netdev_priv(dev)); - v_U32_t status = 0; + int ret; - status = hdd_wlan_get_frag_threshold(pHostapdAdapter, wrqu); + vos_ssr_protect(__func__); + ret = __iw_get_ap_frag_threshold(dev, info, wrqu, extra); + vos_ssr_unprotect(__func__); - return status; + return ret; } -static int iw_get_ap_freq(struct net_device *dev, struct iw_request_info *info, - struct iw_freq *fwrq, char *extra) +/** + * __iw_get_ap_freq() - get ap frequency + * @dev - Pointer to the net device. + * @info - Pointer to the iw_request_info. + * @wrqu - Pointer to the iwreq_data. + * @extra - Pointer to the data. + * + * Return: 0 for success, non zero for failure. + */ +static int __iw_get_ap_freq(struct net_device *dev, + struct iw_request_info *info, + struct iw_freq *fwrq, char *extra) { v_U32_t status = FALSE, channel = 0, freq = 0; hdd_adapter_t *pHostapdAdapter = (netdev_priv(dev)); @@ -4130,18 +4254,71 @@ static int iw_get_ap_freq(struct net_device *dev, struct iw_request_info *info, return 0; } -static int iw_get_mode(struct net_device *dev, - struct iw_request_info *info, - union iwreq_data *wrqu, - char *extra) +/** + * iw_get_ap_freq() - Wrapper function to protect + * __iw_get_ap_freq from the SSR. + * @dev - Pointer to the net device. + * @info - Pointer to the iw_request_info. + * @wrqu - Pointer to the iwreq_data. + * @extra - Pointer to the data. + * + * Return: 0 for success, non zero for failure. + */ +static int iw_get_ap_freq(struct net_device *dev, + struct iw_request_info *info, + struct iw_freq *wrqu, char *extra) { - int status = 0; + int ret; + vos_ssr_protect(__func__); + ret = __iw_get_ap_freq(dev, info, wrqu, extra); + vos_ssr_unprotect(__func__); + + return ret; +} + +/** + * __iw_get_mode() - get mode + * @dev - Pointer to the net device. + * @info - Pointer to the iw_request_info. + * @wrqu - Pointer to the iwreq_data. + * @extra - Pointer to the data. + * + * Return: 0 for success, non zero for failure. + */ +static int __iw_get_mode(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, + char *extra) +{ wrqu->mode = IW_MODE_MASTER; - return status; + return 0; +} + +/** + * iw_get_mode() - Wrapper function to protect __iw_get_mode from the SSR. + * @dev - Pointer to the net device. + * @info - Pointer to the iw_request_info. + * @wrqu - Pointer to the iwreq_data. + * @extra - Pointer to the data. + * + * Return: 0 for success, non zero for failure. + */ +static int iw_get_mode(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + int ret; + + vos_ssr_protect(__func__); + ret = __iw_get_mode(dev, info, wrqu, extra); + vos_ssr_unprotect(__func__); + + return ret; } + static int __iw_softap_setwpsie(struct net_device *dev, struct iw_request_info *info, union iwreq_data *wrqu, @@ -4661,10 +4838,20 @@ static int iw_softap_get_sta_info(struct net_device *dev, return ret; } -static int iw_set_ap_genie(struct net_device *dev, - struct iw_request_info *info, - union iwreq_data *wrqu, - char *extra) +/** + * __iw_set_ap_genie() - set ap wpa/rsn ie + * + * @dev - Pointer to the net device. + * @info - Pointer to the iw_request_info. + * @wrqu - Pointer to the iwreq_data. + * @extra - Pointer to the data. + * + * Return: 0 for success, non zero for failure. + */ +static int __iw_set_ap_genie(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, + char *extra) { hdd_adapter_t *pHostapdAdapter = (netdev_priv(dev)); @@ -4708,6 +4895,32 @@ static int iw_set_ap_genie(struct net_device *dev, return halStatus; } +/** + * iw_set_ap_genie() - Wrapper function to protect __iw_set_ap_genie + * from the SSR. + * + * @dev - Pointer to the net device. + * @info - Pointer to the iw_request_info. + * @wrqu - Pointer to the iwreq_data. + * @extra - Pointer to the data. + * + * Return: 0 for success, non zero for failure. + */ +static int +iw_set_ap_genie(struct net_device *dev, + struct iw_request_info *info, + union iwreq_data *wrqu, char *extra) +{ + int ret; + + vos_ssr_protect(__func__); + ret = __iw_set_ap_genie(dev, info, wrqu, extra); + vos_ssr_unprotect(__func__); + + return ret; +} + + VOS_STATUS wlan_hdd_get_linkspeed_for_peermac(hdd_adapter_t *pAdapter, tSirMacAddr macAddress) { diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c index 3cbdd0616462..f7a4834ad764 100755 --- a/CORE/HDD/src/wlan_hdd_main.c +++ b/CORE/HDD/src/wlan_hdd_main.c @@ -7534,7 +7534,15 @@ static int hdd_driver_ioctl(hdd_adapter_t *pAdapter, struct ifreq *ifr) return ret; } -int hdd_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) +/** + * __hdd_ioctl() - HDD ioctl handler + * @dev: pointer to net_device structure + * @ifr: pointer to ifreq structure + * @cmd: ioctl command + * + * Return: 0 for success and error number for failure. + */ +static int __hdd_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev); hdd_context_t *pHddCtx; @@ -7590,6 +7598,24 @@ int hdd_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) return ret; } +/** + * hdd_ioctl() - Wrapper function to protect __hdd_ioctl() function from SSR + * @dev: pointer to net_device structure + * @ifr: pointer to ifreq structure + * @cmd: ioctl command + * + * Return: 0 for success and error number for failure. + */ +static int hdd_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) +{ + int ret; + + vos_ssr_protect(__func__); + ret = __hdd_ioctl(dev, ifr, cmd); + vos_ssr_unprotect(__func__); + + return ret; +} /* @@ -8311,18 +8337,15 @@ v_BOOL_t hdd_is_valid_mac_address(const tANI_U8 *pMacAddr) return (xdigit == 12 && (separator == 5 || separator == 0)); } -/**--------------------------------------------------------------------------- - - \brief hdd_open() - HDD Open function - - This is called in response to ifconfig up - - \param - dev Pointer to net_device structure - - \return - 0 for success non-zero for failure - - --------------------------------------------------------------------------*/ -int hdd_open (struct net_device *dev) +/** + * __hdd_open() - HDD Open function + * @dev: pointer to net_device structure + * + * This is called in response to ifconfig up + * + * Return: 0 for success and error number for failure + */ +static int __hdd_open(struct net_device *dev) { hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev); hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter); @@ -8369,25 +8392,42 @@ int hdd_open (struct net_device *dev) return ret; } -int hdd_mon_open (struct net_device *dev) +/** + * hdd_open() - Wrapper function for __hdd_open to protect it from SSR + * @dev: pointer to net_device structure + * + * This is called in response to ifconfig up + * + * Return: 0 for success and error number for failure + */ +static int hdd_open(struct net_device *dev) { - netif_start_queue(dev); + int ret; - return 0; -} -/**--------------------------------------------------------------------------- + vos_ssr_protect(__func__); + ret = __hdd_open(dev); + vos_ssr_unprotect(__func__); - \brief hdd_stop() - HDD stop function - - This is called in response to ifconfig down + return ret; +} - \param - dev Pointer to net_device structure - \return - 0 for success non-zero for failure +int hdd_mon_open (struct net_device *dev) +{ + netif_start_queue(dev); - --------------------------------------------------------------------------*/ + return 0; +} -int hdd_stop (struct net_device *dev) +/** + * __hdd_stop() - HDD stop function + * @dev: pointer to net_device structure + * + * This is called in response to ifconfig down + * + * Return: 0 for success and error number for failure + */ +static int __hdd_stop(struct net_device *dev) { hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev); hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter); @@ -8492,57 +8532,79 @@ int hdd_stop (struct net_device *dev) return 0; } -/**--------------------------------------------------------------------------- - - \brief hdd_uninit() - HDD uninit function - - This is called during the netdev unregister to uninitialize all data -associated with the device +/** + * hdd_stop() - Wrapper function for __hdd_stop to protect it from SSR + * @dev: pointer to net_device structure + * + * This is called in response to ifconfig down + * + * Return: 0 for success and error number for failure + */ +static int hdd_stop (struct net_device *dev) +{ + int ret; - \param - dev Pointer to net_device structure + vos_ssr_protect(__func__); + ret = __hdd_stop(dev); + vos_ssr_unprotect(__func__); - \return - void + return ret; +} - --------------------------------------------------------------------------*/ -static void hdd_uninit (struct net_device *dev) +/** + * __hdd_uninit() - HDD uninit function + * @dev: pointer to net_device structure + * + * This is called during the netdev unregister to uninitialize all data + * associated with the device + * + * Return: none + */ +static void __hdd_uninit(struct net_device *dev) { - hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev); + hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev); - ENTER(); + ENTER(); - do - { - if (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic) - { - hddLog(VOS_TRACE_LEVEL_FATAL, - "%s: Invalid magic", __func__); - break; - } + if (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic) { + hddLog(LOGP, FL("Invalid magic")); + return; + } - if (NULL == pAdapter->pHddCtx) - { - hddLog(VOS_TRACE_LEVEL_FATAL, - "%s: NULL pHddCtx", __func__); - break; - } + if (NULL == pAdapter->pHddCtx) { + hddLog(LOGP, FL("NULL pHddCtx")); + return; + } - if (dev != pAdapter->dev) - { - hddLog(VOS_TRACE_LEVEL_FATAL, - "%s: Invalid device reference", __func__); - /* we haven't validated all cases so let this go for now */ - } + if (dev != pAdapter->dev) + hddLog(LOGP, FL("Invalid device reference")); - hdd_deinit_adapter(pAdapter->pHddCtx, pAdapter); + hdd_deinit_adapter(pAdapter->pHddCtx, pAdapter); - /* after uninit our adapter structure will no longer be valid */ - pAdapter->dev = NULL; - pAdapter->magic = 0; - } while (0); + /* After uninit our adapter structure will no longer be valid */ + pAdapter->dev = NULL; + pAdapter->magic = 0; - EXIT(); + EXIT(); +} + +/** + * hdd_uninit() - Wrapper function to protect __hdd_uninit from SSR + * @dev: pointer to net_device structure + * + * This is called during the netdev unregister to uninitialize all data + * associated with the device + * + * Return: none + */ +static void hdd_uninit(struct net_device *dev) +{ + vos_ssr_protect(__func__); + __hdd_uninit(dev); + vos_ssr_unprotect(__func__); } + /**--------------------------------------------------------------------------- \brief hdd_full_pwr_cbk() - HDD full power callback function @@ -8657,32 +8719,50 @@ VOS_STATUS hdd_read_cfg_file(v_VOID_t *pCtx, char *pFileName, return VOS_STATUS_SUCCESS; } -/**--------------------------------------------------------------------------- - - \brief hdd_set_mac_address() - +/** + * __hdd_set_mac_address() - HDD set mac address + * @dev: pointer to net_device structure + * @addr: Pointer to the sockaddr + * + * This function sets the user specified mac address using + * the command ifconfig wlanX hw ether <mac adress>. + * + * Return: 0 for success. + */ +static int __hdd_set_mac_address(struct net_device *dev, void *addr) +{ + hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev); + struct sockaddr *psta_mac_addr = addr; - This function sets the user specified mac address using - the command ifconfig wlanX hw ether <mac adress>. + ENTER(); - \param - dev - Pointer to the net device. - - addr - Pointer to the sockaddr. - \return - 0 for success, non zero for failure + memcpy(&pAdapter->macAddressCurrent, psta_mac_addr->sa_data, ETH_ALEN); + memcpy(dev->dev_addr, psta_mac_addr->sa_data, ETH_ALEN); - --------------------------------------------------------------------------*/ + EXIT(); + return 0; +} +/** + * hdd_set_mac_address() - Wrapper function to protect __hdd_set_mac_address() + * function from SSR + * @dev: pointer to net_device structure + * @addr: Pointer to the sockaddr + * + * This function sets the user specified mac address using + * the command ifconfig wlanX hw ether <mac adress>. + * + * Return: 0 for success. + */ static int hdd_set_mac_address(struct net_device *dev, void *addr) { - hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev); - struct sockaddr *psta_mac_addr = addr; - eHalStatus halStatus = eHAL_STATUS_SUCCESS; - - ENTER(); + int ret; - memcpy(&pAdapter->macAddressCurrent, psta_mac_addr->sa_data, ETH_ALEN); - memcpy(dev->dev_addr, psta_mac_addr->sa_data, ETH_ALEN); + vos_ssr_protect(__func__); + ret = __hdd_set_mac_address(dev, addr); + vos_ssr_unprotect(__func__); - EXIT(); - return halStatus; + return ret; } tANI_U8* wlan_hdd_get_intf_addr(hdd_context_t* pHddCtx) @@ -10481,6 +10561,7 @@ VOS_STATUS hdd_reset_all_adapters( hdd_context_t *pHddCtx ) pAdapter->sessionCtx.station.hdd_ReassocScenario = VOS_FALSE; hdd_deinit_tx_rx(pAdapter); + wlan_hdd_decr_active_session(pHddCtx, pAdapter->device_mode); if (test_bit(WMM_INIT_DONE, &pAdapter->event_flags)) { hdd_wmm_adapter_close( pAdapter ); @@ -10763,12 +10844,19 @@ void hdd_dump_concurrency_info(hdd_context_t *pHddCtx) WLAN_TFC_IPAUC_TX_DESC_RESERVE; } else #endif /* IPA_UC_OFFLOAD */ +#ifdef CONFIG_HL_SUPPORT + { + pAdapter->tx_flow_low_watermark = 0; + } + pAdapter->tx_flow_high_watermark_offset = 0; +#else { pAdapter->tx_flow_low_watermark = pHddCtx->cfg_ini->TxFlowLowWaterMark; } pAdapter->tx_flow_high_watermark_offset = pHddCtx->cfg_ini->TxFlowHighWaterMarkOffset; +#endif WLANTL_SetAdapterMaxQDepth(pHddCtx->pvosContext, pAdapter->sessionId, pHddCtx->cfg_ini->TxFlowMaxQueueDepth); @@ -13524,8 +13612,10 @@ static void hdd_driver_exit(void) } } + rtnl_lock(); pHddCtx->isUnloadInProgress = TRUE; vos_set_load_unload_in_progress(VOS_MODULE_ID_VOSS, TRUE); + rtnl_unlock(); } vos_wait_for_work_thread_completion(__func__); diff --git a/CORE/HDD/src/wlan_hdd_p2p.c b/CORE/HDD/src/wlan_hdd_p2p.c index fa54cbd13572..fd6f06293510 100644 --- a/CORE/HDD/src/wlan_hdd_p2p.c +++ b/CORE/HDD/src/wlan_hdd_p2p.c @@ -744,7 +744,7 @@ void wlan_hdd_roc_request_dequeue(struct work_struct *work) /* If driver is busy then we can't run RoC */ if (hdd_ctx->isLoadInProgress || hdd_ctx->isUnloadInProgress || - hdd_isConnectionInProgress(hdd_ctx)) { + hdd_isConnectionInProgress(hdd_ctx, true)) { hddLog(LOGE, FL("Wlan Load/Unload or Connection is in progress")); return; @@ -820,9 +820,8 @@ static int wlan_hdd_request_remain_on_channel( struct wiphy *wiphy, return -EAGAIN; } - if (hdd_isConnectionInProgress((hdd_context_t *)pAdapter->pHddCtx)) { - hddLog( LOGE, - "%s: Connection is in progress", __func__); + if (hdd_isConnectionInProgress((hdd_context_t *)pAdapter->pHddCtx, true)) { + hddLog(LOGE, FL("Connection is in progress")); isBusy = VOS_TRUE; } diff --git a/CORE/HDD/src/wlan_hdd_tx_rx.c b/CORE/HDD/src/wlan_hdd_tx_rx.c index 66559e6854e4..b6b2abe6262b 100644 --- a/CORE/HDD/src/wlan_hdd_tx_rx.c +++ b/CORE/HDD/src/wlan_hdd_tx_rx.c @@ -47,6 +47,7 @@ #include <linux/netdevice.h> #include <linux/skbuff.h> #include <linux/etherdevice.h> +#include <vos_sched.h> #ifdef IPV6_MCAST_WAR #include <linux/if_ether.h> #endif @@ -1012,15 +1013,17 @@ VOS_STATUS hdd_Ibss_GetStaId(hdd_station_ctx_t *pHddStaCtx, v_MACADDR_t *pMacAdd return VOS_STATUS_E_FAILURE; } -/**============================================================================ - @brief hdd_tx_timeout() - Function called by OS if there is any - timeout during transmission. Since HDD simply enqueues packet - and returns control to OS right away, this would never be invoked - - @param dev : [in] pointer to Libra network device - @return : None - ===========================================================================*/ -void hdd_tx_timeout(struct net_device *dev) +/** + * __hdd_tx_timeout() - HDD tx timeout handler + * @dev: pointer to net_device structure + * + * Function called by OS if there is any timeout during transmission. + * Since HDD simply enqueues packet and returns control to OS right away, + * this would never be invoked + * + * Return: none + */ +static void __hdd_tx_timeout(struct net_device *dev) { hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev); struct netdev_queue *txq; @@ -1028,10 +1031,12 @@ void hdd_tx_timeout(struct net_device *dev) hddLog(LOGE, FL("Transmission timeout occurred jiffies %lu trans_start %lu"), jiffies, dev->trans_start); - //Getting here implies we disabled the TX queues for too long. Queues are - //disabled either because of disassociation or low resource scenarios. In - //case of disassociation it is ok to ignore this. But if associated, we have - //do possible recovery here + /* + * Getting here implies we disabled the TX queues for too long. Queues are + * disabled either because of disassociation or low resource scenarios. In + * case of disassociation it is ok to ignore this. But if associated, we have + * do possible recovery here. + */ VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_INFO, "num_bytes AC0: %d AC1: %d AC2: %d AC3: %d", @@ -1047,8 +1052,7 @@ void hdd_tx_timeout(struct net_device *dev) pAdapter->isTxSuspended[2], pAdapter->isTxSuspended[3]); - for (i = 0; i < 8; i++) - { + for (i = 0; i < 8; i++) { txq = netdev_get_tx_queue(dev, i); hddLog(LOG1, FL("Queue%d status: %d txq->trans_start %lu"), i, netif_tx_queue_stopped(txq), txq->trans_start); @@ -1058,6 +1062,23 @@ void hdd_tx_timeout(struct net_device *dev) "carrier state: %d", netif_carrier_ok(dev)); } +/** + * hdd_tx_timeout() - Wrapper function to protect __hdd_tx_timeout from SSR + * @dev: pointer to net_device structure + * + * Function called by OS if there is any timeout during transmission. + * Since HDD simply enqueues packet and returns control to OS right away, + * this would never be invoked + * + * Return: none + */ +void hdd_tx_timeout(struct net_device *dev) +{ + vos_ssr_protect(__func__); + __hdd_tx_timeout(dev); + vos_ssr_unprotect(__func__); +} + /**============================================================================ @brief hdd_stats() - Function registered with the Linux OS for diff --git a/CORE/MAC/inc/qwlan_version.h b/CORE/MAC/inc/qwlan_version.h index ee5139038c37..14013edd6274 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 10 #define QWLAN_VERSION_EXTRA "" -#define QWLAN_VERSION_BUILD 45 +#define QWLAN_VERSION_BUILD 46 -#define QWLAN_VERSIONSTR "4.0.10.45" +#define QWLAN_VERSIONSTR "4.0.10.46" #define AR6320_REV1_VERSION 0x5000000 diff --git a/CORE/SME/src/csr/csrApiScan.c b/CORE/SME/src/csr/csrApiScan.c index 42f2558f603c..e76c6311cdad 100644 --- a/CORE/SME/src/csr/csrApiScan.c +++ b/CORE/SME/src/csr/csrApiScan.c @@ -5913,8 +5913,8 @@ eHalStatus csrProcessScanCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand ) (NULL != pCommand->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList)) { len = pCommand->u.scanCmd.u.scanRequest.ChannelInfo.numOfChannels; - //allocate twice the channel - newChannelInfo.ChannelList = (tANI_U8 *)vos_mem_malloc(newChannelInfo.numOfChannels * 2); + /* Allocate twice the channel */ + newChannelInfo.ChannelList = vos_mem_malloc(len * 2); pChannel = pCommand->u.scanCmd.u.scanRequest.ChannelInfo.ChannelList; } else |
