Search Linux Wireless

[PATCH v2 1/2] mac80211: mark stopped sched scan only after driver does

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Change internal state in mac80211 only after the driver
reports that sched scan was actually stopped.

Signed-off-by: Eyal Shapira <eyal@xxxxxxxxxx>
---
v2: the driver should always call ieee80211_sched_scan_stopped
so a single kfree in the stopped flow is enough (Thanks Luca)

 net/mac80211/scan.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 2c5041c..99a38df 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -875,7 +875,7 @@ out:
 int ieee80211_request_sched_scan_stop(struct ieee80211_sub_if_data *sdata)
 {
 	struct ieee80211_local *local = sdata->local;
-	int ret = 0, i;
+	int ret = 0;
 
 	mutex_lock(&sdata->local->mtx);
 
@@ -884,13 +884,9 @@ int ieee80211_request_sched_scan_stop(struct ieee80211_sub_if_data *sdata)
 		goto out;
 	}
 
-	if (local->sched_scanning) {
-		for (i = 0; i < IEEE80211_NUM_BANDS; i++)
-			kfree(local->sched_scan_ies.ie[i]);
-
+	if (local->sched_scanning)
 		drv_sched_scan_stop(local, sdata);
-		local->sched_scanning = false;
-	}
+
 out:
 	mutex_unlock(&sdata->local->mtx);
 
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux