Search Linux Wireless

[PATCH] mac80211: fix ifmodes check

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

 



In "mac80211: only create default STA interface if supported",
I tried to make sure a driver supported STA mode before adding
the default virtual interface. That had a stupid bug though
which Larry found: I didn't use BIT().

Signed-off-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>
Reported-by: Larry Finger <Larry.Finger@xxxxxxxxxxxx>
---
 net/mac80211/main.c |    2 +-
 1 filechanged, 1 insertion(+), 1 deletion(-)
	 
--- everything.orig/net/mac80211/main.c	2008-12-11 09:27:30.000000000 +0100
+++ everything/net/mac80211/main.c	2008-12-11 09:27:39.000000000 +0100
@@ -887,7 +887,7 @@ int ieee80211_register_hw(struct ieee802
 	local->mdev->select_queue = ieee80211_select_queue;
 
 	/* add one default STA interface if supported */
-	if (local->hw.wiphy->interface_modes & NL80211_IFTYPE_STATION) {
+	if (local->hw.wiphy->interface_modes & BIT(NL80211_IFTYPE_STATION)) {
 		result = ieee80211_if_add(local, "wlan%d", NULL,
 					  NL80211_IFTYPE_STATION, NULL);
 		if (result)


--
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