diff options
author | David S. Miller <davem@davemloft.net> | 2013-10-03 16:28:18 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-03 16:28:34 -0400 |
commit | 7df9b48588cb3970b564a471b2f7a018c1706e8d (patch) | |
tree | c8b074c58d247f46a4b5de7e30ae4d11760a54ec /net | |
parent | 1661bf364ae9c506bc8795fef70d1532931be1e8 (diff) | |
parent | 1eea72f03a139146f341e450cf56934b2e01a4d3 (diff) |
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville says:
====================
Here is another batch of fixes intended for the 3.12 stream...
For the mac80211 bits, Johannes says:
"This time I have two fixes for IBSS (including one for wext, hah), a fix
for extended rates IEs, an active monitor checking fix and a sysfs
registration race fix."
On top of those...
Amitkumar Karwar brings an mwifiex fix for an interrupt loss issue
w/ SDIO devices. The problem was due to a command timeout issue
introduced by an earlier patch.
Felix Fietkau a stall in the ath9k driver. This patch fixes the
regression introduced in the commit "ath9k: use software queues for
un-aggregated data packets".
Stanislaw Gruszka reverts an rt2x00 patch that was found to cause
connection problems with some devices.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/rx.c | 3 | ||||
-rw-r--r-- | net/mac80211/util.c | 5 | ||||
-rw-r--r-- | net/wireless/core.c | 21 | ||||
-rw-r--r-- | net/wireless/ibss.c | 3 | ||||
-rw-r--r-- | net/wireless/nl80211.c | 4 |
5 files changed, 22 insertions, 14 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 54395d7583ba..674eac1f996c 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -3056,6 +3056,9 @@ static int prepare_for_handlers(struct ieee80211_rx_data *rx, | |||
3056 | case NL80211_IFTYPE_ADHOC: | 3056 | case NL80211_IFTYPE_ADHOC: |
3057 | if (!bssid) | 3057 | if (!bssid) |
3058 | return 0; | 3058 | return 0; |
3059 | if (ether_addr_equal(sdata->vif.addr, hdr->addr2) || | ||
3060 | ether_addr_equal(sdata->u.ibss.bssid, hdr->addr2)) | ||
3061 | return 0; | ||
3059 | if (ieee80211_is_beacon(hdr->frame_control)) { | 3062 | if (ieee80211_is_beacon(hdr->frame_control)) { |
3060 | return 1; | 3063 | return 1; |
3061 | } else if (!ieee80211_bssid_match(bssid, sdata->u.ibss.bssid)) { | 3064 | } else if (!ieee80211_bssid_match(bssid, sdata->u.ibss.bssid)) { |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index e1b34a18b243..9c3200bcfc02 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -2103,7 +2103,7 @@ int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata, | |||
2103 | { | 2103 | { |
2104 | struct ieee80211_local *local = sdata->local; | 2104 | struct ieee80211_local *local = sdata->local; |
2105 | struct ieee80211_supported_band *sband; | 2105 | struct ieee80211_supported_band *sband; |
2106 | int rate, skip, shift; | 2106 | int rate, shift; |
2107 | u8 i, exrates, *pos; | 2107 | u8 i, exrates, *pos; |
2108 | u32 basic_rates = sdata->vif.bss_conf.basic_rates; | 2108 | u32 basic_rates = sdata->vif.bss_conf.basic_rates; |
2109 | u32 rate_flags; | 2109 | u32 rate_flags; |
@@ -2131,14 +2131,11 @@ int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata, | |||
2131 | pos = skb_put(skb, exrates + 2); | 2131 | pos = skb_put(skb, exrates + 2); |
2132 | *pos++ = WLAN_EID_EXT_SUPP_RATES; | 2132 | *pos++ = WLAN_EID_EXT_SUPP_RATES; |
2133 | *pos++ = exrates; | 2133 | *pos++ = exrates; |
2134 | skip = 0; | ||
2135 | for (i = 8; i < sband->n_bitrates; i++) { | 2134 | for (i = 8; i < sband->n_bitrates; i++) { |
2136 | u8 basic = 0; | 2135 | u8 basic = 0; |
2137 | if ((rate_flags & sband->bitrates[i].flags) | 2136 | if ((rate_flags & sband->bitrates[i].flags) |
2138 | != rate_flags) | 2137 | != rate_flags) |
2139 | continue; | 2138 | continue; |
2140 | if (skip++ < 8) | ||
2141 | continue; | ||
2142 | if (need_basic && basic_rates & BIT(i)) | 2139 | if (need_basic && basic_rates & BIT(i)) |
2143 | basic = 0x80; | 2140 | basic = 0x80; |
2144 | rate = DIV_ROUND_UP(sband->bitrates[i].bitrate, | 2141 | rate = DIV_ROUND_UP(sband->bitrates[i].bitrate, |
diff --git a/net/wireless/core.c b/net/wireless/core.c index 67153964aad2..fe8d4f2be49b 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c | |||
@@ -566,18 +566,13 @@ int wiphy_register(struct wiphy *wiphy) | |||
566 | /* check and set up bitrates */ | 566 | /* check and set up bitrates */ |
567 | ieee80211_set_bitrate_flags(wiphy); | 567 | ieee80211_set_bitrate_flags(wiphy); |
568 | 568 | ||
569 | 569 | rtnl_lock(); | |
570 | res = device_add(&rdev->wiphy.dev); | 570 | res = device_add(&rdev->wiphy.dev); |
571 | if (res) | ||
572 | return res; | ||
573 | |||
574 | res = rfkill_register(rdev->rfkill); | ||
575 | if (res) { | 571 | if (res) { |
576 | device_del(&rdev->wiphy.dev); | 572 | rtnl_unlock(); |
577 | return res; | 573 | return res; |
578 | } | 574 | } |
579 | 575 | ||
580 | rtnl_lock(); | ||
581 | /* set up regulatory info */ | 576 | /* set up regulatory info */ |
582 | wiphy_regulatory_register(wiphy); | 577 | wiphy_regulatory_register(wiphy); |
583 | 578 | ||
@@ -606,6 +601,15 @@ int wiphy_register(struct wiphy *wiphy) | |||
606 | 601 | ||
607 | rdev->wiphy.registered = true; | 602 | rdev->wiphy.registered = true; |
608 | rtnl_unlock(); | 603 | rtnl_unlock(); |
604 | |||
605 | res = rfkill_register(rdev->rfkill); | ||
606 | if (res) { | ||
607 | rfkill_destroy(rdev->rfkill); | ||
608 | rdev->rfkill = NULL; | ||
609 | wiphy_unregister(&rdev->wiphy); | ||
610 | return res; | ||
611 | } | ||
612 | |||
609 | return 0; | 613 | return 0; |
610 | } | 614 | } |
611 | EXPORT_SYMBOL(wiphy_register); | 615 | EXPORT_SYMBOL(wiphy_register); |
@@ -640,7 +644,8 @@ void wiphy_unregister(struct wiphy *wiphy) | |||
640 | rtnl_unlock(); | 644 | rtnl_unlock(); |
641 | __count == 0; })); | 645 | __count == 0; })); |
642 | 646 | ||
643 | rfkill_unregister(rdev->rfkill); | 647 | if (rdev->rfkill) |
648 | rfkill_unregister(rdev->rfkill); | ||
644 | 649 | ||
645 | rtnl_lock(); | 650 | rtnl_lock(); |
646 | rdev->wiphy.registered = false; | 651 | rdev->wiphy.registered = false; |
diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c index 39bff7d36768..403fe29c024d 100644 --- a/net/wireless/ibss.c +++ b/net/wireless/ibss.c | |||
@@ -263,6 +263,8 @@ int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev, | |||
263 | if (chan->flags & IEEE80211_CHAN_DISABLED) | 263 | if (chan->flags & IEEE80211_CHAN_DISABLED) |
264 | continue; | 264 | continue; |
265 | wdev->wext.ibss.chandef.chan = chan; | 265 | wdev->wext.ibss.chandef.chan = chan; |
266 | wdev->wext.ibss.chandef.center_freq1 = | ||
267 | chan->center_freq; | ||
266 | break; | 268 | break; |
267 | } | 269 | } |
268 | 270 | ||
@@ -347,6 +349,7 @@ int cfg80211_ibss_wext_siwfreq(struct net_device *dev, | |||
347 | if (chan) { | 349 | if (chan) { |
348 | wdev->wext.ibss.chandef.chan = chan; | 350 | wdev->wext.ibss.chandef.chan = chan; |
349 | wdev->wext.ibss.chandef.width = NL80211_CHAN_WIDTH_20_NOHT; | 351 | wdev->wext.ibss.chandef.width = NL80211_CHAN_WIDTH_20_NOHT; |
352 | wdev->wext.ibss.chandef.center_freq1 = freq; | ||
350 | wdev->wext.ibss.channel_fixed = true; | 353 | wdev->wext.ibss.channel_fixed = true; |
351 | } else { | 354 | } else { |
352 | /* cfg80211_ibss_wext_join will pick one if needed */ | 355 | /* cfg80211_ibss_wext_join will pick one if needed */ |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index af8d84a4a5b2..626dc3b5fd8d 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -2421,7 +2421,7 @@ static int nl80211_set_interface(struct sk_buff *skb, struct genl_info *info) | |||
2421 | change = true; | 2421 | change = true; |
2422 | } | 2422 | } |
2423 | 2423 | ||
2424 | if (flags && (*flags & NL80211_MNTR_FLAG_ACTIVE) && | 2424 | if (flags && (*flags & MONITOR_FLAG_ACTIVE) && |
2425 | !(rdev->wiphy.features & NL80211_FEATURE_ACTIVE_MONITOR)) | 2425 | !(rdev->wiphy.features & NL80211_FEATURE_ACTIVE_MONITOR)) |
2426 | return -EOPNOTSUPP; | 2426 | return -EOPNOTSUPP; |
2427 | 2427 | ||
@@ -2483,7 +2483,7 @@ static int nl80211_new_interface(struct sk_buff *skb, struct genl_info *info) | |||
2483 | info->attrs[NL80211_ATTR_MNTR_FLAGS] : NULL, | 2483 | info->attrs[NL80211_ATTR_MNTR_FLAGS] : NULL, |
2484 | &flags); | 2484 | &flags); |
2485 | 2485 | ||
2486 | if (!err && (flags & NL80211_MNTR_FLAG_ACTIVE) && | 2486 | if (!err && (flags & MONITOR_FLAG_ACTIVE) && |
2487 | !(rdev->wiphy.features & NL80211_FEATURE_ACTIVE_MONITOR)) | 2487 | !(rdev->wiphy.features & NL80211_FEATURE_ACTIVE_MONITOR)) |
2488 | return -EOPNOTSUPP; | 2488 | return -EOPNOTSUPP; |
2489 | 2489 | ||