From fbe9c429f195111bbf7f1630efa19aee295fd8e7 Mon Sep 17 00:00:00 2001 From: Helmut Schaa Date: Thu, 23 Jul 2009 12:14:04 +0200 Subject: mac80211: Replace {sw, hw}_scanning variables with a bitfield Use a bitfield to store the current scan mode instead of two boolean variables {sw,hw}_scanning. This patch does not introduce functional changes but allows us to enhance the scan flags later (for example for background scanning). Signed-off-by: Helmut Schaa Signed-off-by: John W. Linville --- net/mac80211/iface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net/mac80211/iface.c') diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 0cb29df09e3..d79a2110504 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c @@ -518,7 +518,7 @@ static int ieee80211_stop(struct net_device *dev) * the scan_sdata is NULL already don't send out a * scan event to userspace -- the scan is incomplete. */ - if (local->sw_scanning) + if (test_bit(SCAN_SW_SCANNING, &local->scanning)) ieee80211_scan_completed(&local->hw, true); } @@ -920,7 +920,7 @@ u32 __ieee80211_recalc_idle(struct ieee80211_local *local) struct ieee80211_sub_if_data *sdata; int count = 0; - if (local->hw_scanning || local->sw_scanning) + if (local->scanning) return ieee80211_idle_off(local, "scanning"); list_for_each_entry(sdata, &local->interfaces, list) { -- cgit v1.2.3