Skip to contentSkip to conversation

mac80211: fix ifmodes check

PATCH New Johannes Berg 1 participant 1 message Dec 11, 2008 mac80211

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 mac80211: fix ifmodes check

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().

---
 net/mac80211/main.c |    2 +-

1 filechanged, 1 insertion(+), 1 deletion(-)

net/mac80211/main.c +1 -1
@@ -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)