summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanumanth Reddy Pothula <c_hpothu@codeaurora.org>2016-09-07 20:59:18 +0530
committerqcabuildsw <qcabuildsw@localhost>2016-10-03 17:38:27 -0700
commit7a65740e470c3e3ccd80940dd7b5aee1743ce8a3 (patch)
tree5f730f8e7391e7677c0dddab5757cbb4c6f9fed1
parent478730010a2190ae8a0f7575904c3f580fc79dab (diff)
qcacld-3.0: Unregister wext interface, on STA interface down
Host registers wext handlers, during STA interface UP. But not unregistering during interface down, lending user to issue iwpriv commands though interface is down. Unregister wext interface, by initializing wireless_handlers to NULL during interface down. Change-Id: I839d733595672c8c43e5a085ea5f1e97d98c4c31 CRs-Fixed: 1064023
-rw-r--r--core/hdd/src/wlan_hdd_main.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 8b85b66e8820..56452b1cc757 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -2742,10 +2742,21 @@ void hdd_cleanup_actionframe(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter)
* Return: None.
*/
void hdd_station_adapter_deinit(hdd_context_t *hdd_ctx,
- hdd_adapter_t *adapter)
+ hdd_adapter_t *adapter,
+ bool rtnl_held)
{
ENTER_DEV(adapter->dev);
+ if (adapter->dev) {
+ if (rtnl_held)
+ adapter->dev->wireless_handlers = NULL;
+ else {
+ rtnl_lock();
+ adapter->dev->wireless_handlers = NULL;
+ rtnl_unlock();
+ }
+ }
+
if (test_bit(INIT_TX_RX_SUCCESS, &adapter->event_flags)) {
hdd_deinit_tx_rx(adapter);
clear_bit(INIT_TX_RX_SUCCESS, &adapter->event_flags);
@@ -2798,7 +2809,7 @@ void hdd_deinit_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
case QDF_P2P_CLIENT_MODE:
case QDF_P2P_DEVICE_MODE:
{
- hdd_station_adapter_deinit(hdd_ctx, adapter);
+ hdd_station_adapter_deinit(hdd_ctx, adapter, rtnl_held);
break;
}