aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-08-12 20:44:53 -0400
committerDavid S. Miller <davem@davemloft.net>2009-08-12 20:44:53 -0400
commitaa11d958d1a6572eda08214d7c6a735804fe48a5 (patch)
treed025b05270ad1e010660d17eeadc6ac3c1abbd7d /net/wireless
parent07f6642ee9418e962e54cbc07471cfe2e559c568 (diff)
parent9799218ae36910af50f002a5db1802d576fffb43 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: arch/microblaze/include/asm/socket.h
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/reg.c9
-rw-r--r--net/wireless/reg.h3
-rw-r--r--net/wireless/scan.c4
3 files changed, 10 insertions, 6 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index b3ac0aace0e..0f61ae613f3 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -1095,17 +1095,18 @@ static void handle_reg_beacon(struct wiphy *wiphy,
1095 1095
1096 chan->beacon_found = true; 1096 chan->beacon_found = true;
1097 1097
1098 if (wiphy->disable_beacon_hints)
1099 return;
1100
1098 chan_before.center_freq = chan->center_freq; 1101 chan_before.center_freq = chan->center_freq;
1099 chan_before.flags = chan->flags; 1102 chan_before.flags = chan->flags;
1100 1103
1101 if ((chan->flags & IEEE80211_CHAN_PASSIVE_SCAN) && 1104 if (chan->flags & IEEE80211_CHAN_PASSIVE_SCAN) {
1102 !(chan->orig_flags & IEEE80211_CHAN_PASSIVE_SCAN)) {
1103 chan->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN; 1105 chan->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
1104 channel_changed = true; 1106 channel_changed = true;
1105 } 1107 }
1106 1108
1107 if ((chan->flags & IEEE80211_CHAN_NO_IBSS) && 1109 if (chan->flags & IEEE80211_CHAN_NO_IBSS) {
1108 !(chan->orig_flags & IEEE80211_CHAN_NO_IBSS)) {
1109 chan->flags &= ~IEEE80211_CHAN_NO_IBSS; 1110 chan->flags &= ~IEEE80211_CHAN_NO_IBSS;
1110 channel_changed = true; 1111 channel_changed = true;
1111 } 1112 }
diff --git a/net/wireless/reg.h b/net/wireless/reg.h
index 662a9dad76d..3362c7c069b 100644
--- a/net/wireless/reg.h
+++ b/net/wireless/reg.h
@@ -30,7 +30,8 @@ int set_regdom(const struct ieee80211_regdomain *rd);
30 * non-radar 5 GHz channels. 30 * non-radar 5 GHz channels.
31 * 31 *
32 * Drivers do not need to call this, cfg80211 will do it for after a scan 32 * Drivers do not need to call this, cfg80211 will do it for after a scan
33 * on a newly found BSS. 33 * on a newly found BSS. If you cannot make use of this feature you can
34 * set the wiphy->disable_beacon_hints to true.
34 */ 35 */
35int regulatory_hint_found_beacon(struct wiphy *wiphy, 36int regulatory_hint_found_beacon(struct wiphy *wiphy,
36 struct ieee80211_channel *beacon_chan, 37 struct ieee80211_channel *beacon_chan,
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 67714d7ed5b..0ccf3a07dc0 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -141,7 +141,7 @@ static int cmp_ies(u8 num, u8 *ies1, size_t len1, u8 *ies2, size_t len2)
141 141
142 if (!ie1 && !ie2) 142 if (!ie1 && !ie2)
143 return 0; 143 return 0;
144 if (!ie1) 144 if (!ie1 || !ie2)
145 return -1; 145 return -1;
146 146
147 r = memcmp(ie1 + 2, ie2 + 2, min(ie1[1], ie2[1])); 147 r = memcmp(ie1 + 2, ie2 + 2, min(ie1[1], ie2[1]));
@@ -194,6 +194,8 @@ static bool is_mesh(struct cfg80211_bss *a,
194 ie = find_ie(WLAN_EID_MESH_CONFIG, 194 ie = find_ie(WLAN_EID_MESH_CONFIG,
195 a->information_elements, 195 a->information_elements,
196 a->len_information_elements); 196 a->len_information_elements);
197 if (!ie)
198 return false;
197 if (ie[1] != IEEE80211_MESH_CONFIG_LEN) 199 if (ie[1] != IEEE80211_MESH_CONFIG_LEN)
198 return false; 200 return false;
199 201