From 526e53389a253af80ee05a71ee100761984d86c8 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Tue, 5 Feb 2013 16:51:29 +0100 Subject: [PATCH] --- yaml --- r: 352655 b: refs/heads/master c: 83c7aa1a1475ae1c42640ab6e4559016142efc67 h: refs/heads/master i: 352653: 11898871f8ed49f9c1ad42b78a142adae29980eb 352651: bc5be5da1d9091938f9b388a6398820985c5c359 352647: 6b058e30a816a2ebd1f75b52ee136f4d89fbe924 352639: 958d861f8d74142bb638482d6c05c4bca5c1421f v: v3 --- [refs] | 2 +- trunk/drivers/net/wireless/mwifiex/sta_ioctl.c | 5 ----- trunk/include/net/cfg80211.h | 8 ++++---- trunk/net/wireless/scan.c | 11 +++-------- 4 files changed, 8 insertions(+), 18 deletions(-) diff --git a/[refs] b/[refs] index a248b2f0784c..a00f164f544b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b207cdb07f3f01ec1adaac62e9d0cc918c60a81a +refs/heads/master: 83c7aa1a1475ae1c42640ab6e4559016142efc67 diff --git a/trunk/drivers/net/wireless/mwifiex/sta_ioctl.c b/trunk/drivers/net/wireless/mwifiex/sta_ioctl.c index ee85b41a4dfd..8866a2b69c94 100644 --- a/trunk/drivers/net/wireless/mwifiex/sta_ioctl.c +++ b/trunk/drivers/net/wireless/mwifiex/sta_ioctl.c @@ -162,11 +162,6 @@ int mwifiex_fill_new_bss_desc(struct mwifiex_private *priv, rcu_read_lock(); ies = rcu_dereference(bss->ies); - if (WARN_ON(!ies)) { - /* should never happen */ - rcu_read_unlock(); - return -EINVAL; - } beacon_ie = kmemdup(ies->data, ies->len, GFP_ATOMIC); beacon_ie_len = ies->len; rcu_read_unlock(); diff --git a/trunk/include/net/cfg80211.h b/trunk/include/net/cfg80211.h index 04a702d1f2a5..fb766314b3a1 100644 --- a/trunk/include/net/cfg80211.h +++ b/trunk/include/net/cfg80211.h @@ -1287,10 +1287,10 @@ struct cfg80211_bss_ies { * @tsf: timestamp of last received update * @beacon_interval: the beacon interval as from the frame * @capability: the capability field in host byte order - * @ies: the information elements (Note that there - * is no guarantee that these are well-formed!); this is a pointer to - * either the beacon_ies or proberesp_ies depending on whether Probe - * Response frame has been received + * @ies: the information elements (Note that there is no guarantee that these + * are well-formed!); this is a pointer to either the beacon_ies or + * proberesp_ies depending on whether Probe Response frame has been + * received. It is always non-%NULL. * @beacon_ies: the information elements from the last Beacon frame * (implementation note: if @hidden_beacon_bss is set this struct doesn't * own the beacon_ies, but they're just pointers to the ones from the diff --git a/trunk/net/wireless/scan.c b/trunk/net/wireless/scan.c index 5e0983d60428..02a238329c83 100644 --- a/trunk/net/wireless/scan.c +++ b/trunk/net/wireless/scan.c @@ -1293,15 +1293,10 @@ ieee80211_bss(struct wiphy *wiphy, struct iw_request_info *info, rcu_read_lock(); ies = rcu_dereference(bss->pub.ies); - if (ies) { - rem = ies->len; - ie = ies->data; - } else { - rem = 0; - ie = NULL; - } + rem = ies->len; + ie = ies->data; - while (ies && rem >= 2) { + while (rem >= 2) { /* invalid data */ if (ie[1] > rem - 2) break;