mac80211: fix ifmodes check
Johannes Berg
maintainerPATCH 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().
Signed-off-by Johannes Berg <[email protected]>
Reported-by Larry Finger <[email protected]>
--- 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)