Revert "wlan: Address excessive logging issues during driver unload"
This reverts commit 4dba97ae4812bcea816e66b699f07bf5e418a4c2.
Change-Id: I0effdec6d0140f7f2be273c14651ab93c95cb361
CRs-Fixed: 802404
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 97def2a..3a47157 100755
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -6004,18 +6004,7 @@
.ndo_do_ioctl = hdd_ioctl,
.ndo_set_mac_address = hdd_set_mac_address,
};
- static struct net_device_ops nullify_netdev_ops = {
- .ndo_open = NULL,
- .ndo_stop = NULL,
- .ndo_uninit = NULL,
- .ndo_start_xmit = NULL,
- .ndo_tx_timeout = NULL,
- .ndo_get_stats = NULL,
- .ndo_set_mac_address = NULL,
- .ndo_do_ioctl = NULL,
- .ndo_change_mtu = NULL,
- .ndo_select_queue = NULL,
- };
+
#endif
void hdd_set_station_ops( struct net_device *pWlanDev )
@@ -8188,6 +8177,15 @@
pAdapter = pAdapterNode->pAdapter;
if (NULL != pAdapter)
{
+ /* Disable TX on the interface, after this hard_start_xmit() will
+ * not be called on that interface
+ */
+ hddLog(VOS_TRACE_LEVEL_INFO, FL("Disabling queues"));
+ netif_tx_disable(pAdapter->dev);
+
+ /* Mark the interface status as "down" for outside world */
+ netif_carrier_off(pAdapter->dev);
+
/* DeInit the adapter. This ensures that all data packets
* are freed.
*/
@@ -10001,13 +9999,6 @@
}
else
{
- /* We wait for active entry threads to exit from driver
- * by waiting until rtnl_lock is available.
- */
- rtnl_lock();
- hdd_nullify_netdev_ops(pHddCtx);
- rtnl_unlock();
-
INIT_COMPLETION(pHddCtx->ssr_comp_var);
if ((pHddCtx->isLogpInProgress) && (FALSE ==
vos_is_wlan_in_badState(VOS_MODULE_ID_HDD, NULL)))
@@ -10024,8 +10015,10 @@
}
}
+ rtnl_lock();
pHddCtx->isLoadUnloadInProgress = WLAN_HDD_UNLOAD_IN_PROGRESS;
vos_set_load_unload_in_progress(VOS_MODULE_ID_VOSS, TRUE);
+ rtnl_unlock();
/* Driver Need to send country code 00 in below condition
* 1) If gCountryCodePriority is set to 1; and last country
@@ -10921,32 +10914,6 @@
return pRemainChanCtx;
}
-void hdd_nullify_netdev_ops(hdd_context_t *pHddCtx)
-{
- VOS_STATUS status;
- hdd_adapter_list_node_t *pAdapterNode = NULL, *pNext = NULL;
- hdd_adapter_t *pAdapter;
-
- status = hdd_get_front_adapter ( pHddCtx, &pAdapterNode );
- while ( NULL != pAdapterNode && VOS_STATUS_SUCCESS == status )
- {
- pAdapter = pAdapterNode->pAdapter;
- if (NULL != pAdapter)
- {
- /* Disable TX on the interface, after this hard_start_xmit() will
- * not be called on that interface
- */
- hddLog(VOS_TRACE_LEVEL_INFO, FL("Disabling queues"));
- netif_tx_disable(pAdapter->dev);
- /* Mark the interface status as "down" for outside world */
- netif_carrier_off(pAdapter->dev);
- pAdapter->dev->netdev_ops = &nullify_netdev_ops;
- }
- status = hdd_get_next_adapter ( pHddCtx, pAdapterNode, &pNext );
- pAdapterNode = pNext;
- }
-}
-
//Register the module init/exit functions
module_init(hdd_module_init);
module_exit(hdd_module_exit);