linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: fix IBSS code
@ 2008-02-21 10:08 Johannes Berg
  2008-02-21 17:07 ` John W. Linville
  2008-02-21 17:16 ` Pavel Roskin
  0 siblings, 2 replies; 8+ messages in thread
From: Johannes Berg @ 2008-02-21 10:08 UTC (permalink / raw)
  To: John Linville; +Cc: bruno randolf, linux-wireless

This patch fixes two errors introduced by

    commit 19d35612f3cd7f60dd9174c0100584e21f5a1025
    Author: Bruno Randolf <bruno@thinktube.com>
    Date:   Mon Feb 18 11:21:36 2008 +0900

        mac80211: enable IBSS merging

The first error is an endianness problem that sparse found and
the second is a build failure when CONFIG_MAC80211_IBSS_DEBUG
is not set.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Bruno Randolf <bruno@thinktube.com>
---
 net/mac80211/ieee80211_sta.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- everything.orig/net/mac80211/ieee80211_sta.c	2008-02-21 11:04:18.000000000 +0100
+++ everything/net/mac80211/ieee80211_sta.c	2008-02-21 11:04:32.000000000 +0100
@@ -2412,7 +2412,7 @@ static void ieee80211_rx_bss_info(struct
 	/* check if we need to merge IBSS */
 	if (sdata->vif.type == IEEE80211_IF_TYPE_IBSS && beacon &&
 	    !local->sta_sw_scanning && !local->sta_hw_scanning &&
-	    mgmt->u.beacon.capab_info & WLAN_CAPABILITY_IBSS &&
+	    bss->capability & WLAN_CAPABILITY_IBSS &&
 	    bss->freq == local->oper_channel->center_freq &&
 	    elems.ssid_len == sdata->u.sta.ssid_len &&
 	    memcmp(elems.ssid, sdata->u.sta.ssid, sdata->u.sta.ssid_len) == 0) {
@@ -2452,7 +2452,9 @@ static void ieee80211_rx_bss_info(struct
 		       jiffies);
 #endif /* CONFIG_MAC80211_IBSS_DEBUG */
 		if (beacon_timestamp > rx_timestamp) {
-			if (CONFIG_MAC80211_IBSS_DEBUG || net_ratelimit())
+#ifndef CONFIG_MAC80211_IBSS_DEBUG
+			if (net_ratelimit())
+#endif
 				printk(KERN_DEBUG "%s: beacon TSF higher than "
 				       "local TSF - IBSS merge with BSSID %s\n",
 				       dev->name, print_mac(mac, mgmt->bssid));



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-02-22  0:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-21 10:08 [PATCH] mac80211: fix IBSS code Johannes Berg
2008-02-21 17:07 ` John W. Linville
2008-02-21 19:23   ` Johannes Berg
2008-02-21 19:43     ` John W. Linville
2008-02-22  0:51       ` bruno randolf
2008-02-21 17:16 ` Pavel Roskin
2008-02-21 17:32   ` John W. Linville
2008-02-21 18:27     ` Pavel Roskin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).