mac80211: treat the WME sta flag as a bit
authorArik Nemtsov <arik@wizery.com>
Mon, 26 Sep 2011 06:36:42 +0000 (09:36 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 27 Sep 2011 18:36:04 +0000 (14:36 -0400)
Correct flag usage - use it as a bit index instead of a bit value.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/wireless/nl80211.c

index 74d16192fbf0b013e5c001bcfad4dbe982fa9812..bf3fc4f264f50af6f78413c9537d460d704a52de 100644 (file)
@@ -2620,7 +2620,7 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info)
 
        /* parse WME attributes if sta is WME capable */
        if ((rdev->wiphy.flags & WIPHY_FLAG_AP_UAPSD) &&
-           (params.sta_flags_set & NL80211_STA_FLAG_WME) &&
+           (params.sta_flags_set & BIT(NL80211_STA_FLAG_WME)) &&
            info->attrs[NL80211_ATTR_STA_WME]) {
                struct nlattr *tb[NL80211_STA_WME_MAX + 1];
                struct nlattr *nla;