]> err.no Git - linux-2.6/commitdiff
mac80211: don't report selected IBSS when not found
authorVladimir Koutny <vlado@work.ksp.sk>
Mon, 7 Jul 2008 12:23:01 +0000 (14:23 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 7 Jul 2008 19:31:40 +0000 (15:31 -0400)
Don't report a 'selected' IBSS in sta_find_ibss when none was found.

Signed-off-by: Vladimir Koutny <vlado@ksp.sk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/mlme.c

index a7018540ae89d878902c13cef8065e299de3f8c8..b404537c0bcd1a470f4f7e305ab18c1e263c0b34 100644 (file)
@@ -3614,8 +3614,10 @@ static int ieee80211_sta_find_ibss(struct net_device *dev,
        spin_unlock_bh(&local->sta_bss_lock);
 
 #ifdef CONFIG_MAC80211_IBSS_DEBUG
-       printk(KERN_DEBUG "   sta_find_ibss: selected %s current "
-              "%s\n", print_mac(mac, bssid), print_mac(mac2, ifsta->bssid));
+       if (found)
+               printk(KERN_DEBUG "   sta_find_ibss: selected %s current "
+                      "%s\n", print_mac(mac, bssid),
+                      print_mac(mac2, ifsta->bssid));
 #endif /* CONFIG_MAC80211_IBSS_DEBUG */
        if (found && memcmp(ifsta->bssid, bssid, ETH_ALEN) != 0 &&
            (bss = ieee80211_rx_bss_get(dev, bssid,