Skip to content

Commit

Permalink
mac80211: fix warning in ieee80211_probe_client
Browse files Browse the repository at this point in the history
The warning is spurious -- if !sta we always exit without using the
unassigned qos variable, and if we do find the sta we assign it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Nov 11, 2011
1 parent 731f8e1 commit b4487c2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -2570,12 +2570,13 @@ static int ieee80211_probe_client(struct wiphy *wiphy, struct net_device *dev,

rcu_read_lock();
sta = sta_info_get(sdata, peer);
if (sta)
if (sta) {
qos = test_sta_flag(sta, WLAN_STA_WME);
rcu_read_unlock();

if (!sta)
rcu_read_unlock();
} else {
rcu_read_unlock();
return -ENOLINK;
}

if (qos) {
fc = cpu_to_le16(IEEE80211_FTYPE_DATA |
Expand Down

0 comments on commit b4487c2

Please sign in to comment.