aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2013-08-23 11:47:48 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-08-23 11:47:48 -0400
commit81ca2ff9450c2e983ee416eca17ebe6fa9c3da4f (patch)
tree6e21a27d727481434b58543d8cff960bb7672b53
parent4a5a8aa6c966eafc106543bd955ae388230420e5 (diff)
parent19c361608ce3e73f352e323262f7e0a8264be3af (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_txrx.c10
-rw-r--r--drivers/net/wireless/ath/ath9k/init.c3
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c3
-rw-r--r--drivers/net/wireless/ath/carl9170/main.c3
-rw-r--r--drivers/net/wireless/iwlegacy/4965-mac.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt2800lib.c3
-rw-r--r--include/net/mac80211.h1
-rw-r--r--net/mac80211/ibss.c34
-rw-r--r--net/mac80211/rc80211_minstrel_ht.c3
9 files changed, 52 insertions, 10 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
index e602c9519709..c028df76b564 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
@@ -448,6 +448,7 @@ static void ath9k_htc_tx_process(struct ath9k_htc_priv *priv,
448 struct ieee80211_conf *cur_conf = &priv->hw->conf; 448 struct ieee80211_conf *cur_conf = &priv->hw->conf;
449 bool txok; 449 bool txok;
450 int slot; 450 int slot;
451 int hdrlen, padsize;
451 452
452 slot = strip_drv_header(priv, skb); 453 slot = strip_drv_header(priv, skb);
453 if (slot < 0) { 454 if (slot < 0) {
@@ -504,6 +505,15 @@ send_mac80211:
504 505
505 ath9k_htc_tx_clear_slot(priv, slot); 506 ath9k_htc_tx_clear_slot(priv, slot);
506 507
508 /* Remove padding before handing frame back to mac80211 */
509 hdrlen = ieee80211_get_hdrlen_from_skb(skb);
510
511 padsize = hdrlen & 3;
512 if (padsize && skb->len > hdrlen + padsize) {
513 memmove(skb->data + padsize, skb->data, hdrlen);
514 skb_pull(skb, padsize);
515 }
516
507 /* Send status to mac80211 */ 517 /* Send status to mac80211 */
508 ieee80211_tx_status(priv->hw, skb); 518 ieee80211_tx_status(priv->hw, skb);
509} 519}
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 16f8b201642b..026a2a067b46 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -802,7 +802,8 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
802 IEEE80211_HW_PS_NULLFUNC_STACK | 802 IEEE80211_HW_PS_NULLFUNC_STACK |
803 IEEE80211_HW_SPECTRUM_MGMT | 803 IEEE80211_HW_SPECTRUM_MGMT |
804 IEEE80211_HW_REPORTS_TX_ACK_STATUS | 804 IEEE80211_HW_REPORTS_TX_ACK_STATUS |
805 IEEE80211_HW_SUPPORTS_RC_TABLE; 805 IEEE80211_HW_SUPPORTS_RC_TABLE |
806 IEEE80211_HW_SUPPORTS_HT_CCK_RATES;
806 807
807 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) { 808 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) {
808 hw->flags |= IEEE80211_HW_AMPDU_AGGREGATION; 809 hw->flags |= IEEE80211_HW_AMPDU_AGGREGATION;
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 1737a3e33685..cb5a65553ac7 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -173,8 +173,7 @@ static void ath_restart_work(struct ath_softc *sc)
173{ 173{
174 ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, 0); 174 ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, 0);
175 175
176 if (AR_SREV_9340(sc->sc_ah) || AR_SREV_9485(sc->sc_ah) || 176 if (AR_SREV_9340(sc->sc_ah) || AR_SREV_9330(sc->sc_ah))
177 AR_SREV_9550(sc->sc_ah))
178 ieee80211_queue_delayed_work(sc->hw, &sc->hw_pll_work, 177 ieee80211_queue_delayed_work(sc->hw, &sc->hw_pll_work,
179 msecs_to_jiffies(ATH_PLL_WORK_INTERVAL)); 178 msecs_to_jiffies(ATH_PLL_WORK_INTERVAL));
180 179
diff --git a/drivers/net/wireless/ath/carl9170/main.c b/drivers/net/wireless/ath/carl9170/main.c
index 4a33c6e39ca2..349fa22a921a 100644
--- a/drivers/net/wireless/ath/carl9170/main.c
+++ b/drivers/net/wireless/ath/carl9170/main.c
@@ -1860,7 +1860,8 @@ void *carl9170_alloc(size_t priv_size)
1860 IEEE80211_HW_PS_NULLFUNC_STACK | 1860 IEEE80211_HW_PS_NULLFUNC_STACK |
1861 IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC | 1861 IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC |
1862 IEEE80211_HW_SUPPORTS_RC_TABLE | 1862 IEEE80211_HW_SUPPORTS_RC_TABLE |
1863 IEEE80211_HW_SIGNAL_DBM; 1863 IEEE80211_HW_SIGNAL_DBM |
1864 IEEE80211_HW_SUPPORTS_HT_CCK_RATES;
1864 1865
1865 if (!modparam_noht) { 1866 if (!modparam_noht) {
1866 /* 1867 /*
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index f2ed62e37340..7acf5ee23582 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -4464,9 +4464,9 @@ il4965_irq_tasklet(struct il_priv *il)
4464 set_bit(S_RFKILL, &il->status); 4464 set_bit(S_RFKILL, &il->status);
4465 } else { 4465 } else {
4466 clear_bit(S_RFKILL, &il->status); 4466 clear_bit(S_RFKILL, &il->status);
4467 wiphy_rfkill_set_hw_state(il->hw->wiphy, hw_rf_kill);
4468 il_force_reset(il, true); 4467 il_force_reset(il, true);
4469 } 4468 }
4469 wiphy_rfkill_set_hw_state(il->hw->wiphy, hw_rf_kill);
4470 4470
4471 handled |= CSR_INT_BIT_RF_KILL; 4471 handled |= CSR_INT_BIT_RF_KILL;
4472 } 4472 }
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 1f80ea5e29dd..1b41c8eda12d 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -6133,7 +6133,8 @@ static int rt2800_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
6133 IEEE80211_HW_SUPPORTS_PS | 6133 IEEE80211_HW_SUPPORTS_PS |
6134 IEEE80211_HW_PS_NULLFUNC_STACK | 6134 IEEE80211_HW_PS_NULLFUNC_STACK |
6135 IEEE80211_HW_AMPDU_AGGREGATION | 6135 IEEE80211_HW_AMPDU_AGGREGATION |
6136 IEEE80211_HW_REPORTS_TX_ACK_STATUS; 6136 IEEE80211_HW_REPORTS_TX_ACK_STATUS |
6137 IEEE80211_HW_SUPPORTS_HT_CCK_RATES;
6137 6138
6138 /* 6139 /*
6139 * Don't set IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING for USB devices 6140 * Don't set IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING for USB devices
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 5b7a3dadadde..551ba6a6a073 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1499,6 +1499,7 @@ enum ieee80211_hw_flags {
1499 IEEE80211_HW_SUPPORTS_RC_TABLE = 1<<24, 1499 IEEE80211_HW_SUPPORTS_RC_TABLE = 1<<24,
1500 IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF = 1<<25, 1500 IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF = 1<<25,
1501 IEEE80211_HW_TIMING_BEACON_ONLY = 1<<26, 1501 IEEE80211_HW_TIMING_BEACON_ONLY = 1<<26,
1502 IEEE80211_HW_SUPPORTS_HT_CCK_RATES = 1<<27,
1502}; 1503};
1503 1504
1504/** 1505/**
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index ea7b9c2c7e66..2d45643c964e 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -36,7 +36,7 @@
36 36
37static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, 37static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
38 const u8 *bssid, const int beacon_int, 38 const u8 *bssid, const int beacon_int,
39 struct ieee80211_channel *chan, 39 struct cfg80211_chan_def *req_chandef,
40 const u32 basic_rates, 40 const u32 basic_rates,
41 const u16 capability, u64 tsf, 41 const u16 capability, u64 tsf,
42 bool creator) 42 bool creator)
@@ -51,6 +51,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
51 u32 bss_change; 51 u32 bss_change;
52 u8 supp_rates[IEEE80211_MAX_SUPP_RATES]; 52 u8 supp_rates[IEEE80211_MAX_SUPP_RATES];
53 struct cfg80211_chan_def chandef; 53 struct cfg80211_chan_def chandef;
54 struct ieee80211_channel *chan;
54 struct beacon_data *presp; 55 struct beacon_data *presp;
55 int frame_len; 56 int frame_len;
56 57
@@ -81,7 +82,9 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
81 82
82 sdata->drop_unencrypted = capability & WLAN_CAPABILITY_PRIVACY ? 1 : 0; 83 sdata->drop_unencrypted = capability & WLAN_CAPABILITY_PRIVACY ? 1 : 0;
83 84
84 chandef = ifibss->chandef; 85 /* make a copy of the chandef, it could be modified below. */
86 chandef = *req_chandef;
87 chan = chandef.chan;
85 if (!cfg80211_reg_can_beacon(local->hw.wiphy, &chandef)) { 88 if (!cfg80211_reg_can_beacon(local->hw.wiphy, &chandef)) {
86 chandef.width = NL80211_CHAN_WIDTH_20; 89 chandef.width = NL80211_CHAN_WIDTH_20;
87 chandef.center_freq1 = chan->center_freq; 90 chandef.center_freq1 = chan->center_freq;
@@ -259,10 +262,12 @@ static void ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
259 struct cfg80211_bss *cbss = 262 struct cfg80211_bss *cbss =
260 container_of((void *)bss, struct cfg80211_bss, priv); 263 container_of((void *)bss, struct cfg80211_bss, priv);
261 struct ieee80211_supported_band *sband; 264 struct ieee80211_supported_band *sband;
265 struct cfg80211_chan_def chandef;
262 u32 basic_rates; 266 u32 basic_rates;
263 int i, j; 267 int i, j;
264 u16 beacon_int = cbss->beacon_interval; 268 u16 beacon_int = cbss->beacon_interval;
265 const struct cfg80211_bss_ies *ies; 269 const struct cfg80211_bss_ies *ies;
270 enum nl80211_channel_type chan_type;
266 u64 tsf; 271 u64 tsf;
267 272
268 sdata_assert_lock(sdata); 273 sdata_assert_lock(sdata);
@@ -270,6 +275,26 @@ static void ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
270 if (beacon_int < 10) 275 if (beacon_int < 10)
271 beacon_int = 10; 276 beacon_int = 10;
272 277
278 switch (sdata->u.ibss.chandef.width) {
279 case NL80211_CHAN_WIDTH_20_NOHT:
280 case NL80211_CHAN_WIDTH_20:
281 case NL80211_CHAN_WIDTH_40:
282 chan_type = cfg80211_get_chandef_type(&sdata->u.ibss.chandef);
283 cfg80211_chandef_create(&chandef, cbss->channel, chan_type);
284 break;
285 case NL80211_CHAN_WIDTH_5:
286 case NL80211_CHAN_WIDTH_10:
287 cfg80211_chandef_create(&chandef, cbss->channel,
288 NL80211_CHAN_WIDTH_20_NOHT);
289 chandef.width = sdata->u.ibss.chandef.width;
290 break;
291 default:
292 /* fall back to 20 MHz for unsupported modes */
293 cfg80211_chandef_create(&chandef, cbss->channel,
294 NL80211_CHAN_WIDTH_20_NOHT);
295 break;
296 }
297
273 sband = sdata->local->hw.wiphy->bands[cbss->channel->band]; 298 sband = sdata->local->hw.wiphy->bands[cbss->channel->band];
274 299
275 basic_rates = 0; 300 basic_rates = 0;
@@ -294,7 +319,7 @@ static void ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
294 319
295 __ieee80211_sta_join_ibss(sdata, cbss->bssid, 320 __ieee80211_sta_join_ibss(sdata, cbss->bssid,
296 beacon_int, 321 beacon_int,
297 cbss->channel, 322 &chandef,
298 basic_rates, 323 basic_rates,
299 cbss->capability, 324 cbss->capability,
300 tsf, false); 325 tsf, false);
@@ -736,7 +761,7 @@ static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata)
736 sdata->drop_unencrypted = 0; 761 sdata->drop_unencrypted = 0;
737 762
738 __ieee80211_sta_join_ibss(sdata, bssid, sdata->vif.bss_conf.beacon_int, 763 __ieee80211_sta_join_ibss(sdata, bssid, sdata->vif.bss_conf.beacon_int,
739 ifibss->chandef.chan, ifibss->basic_rates, 764 &ifibss->chandef, ifibss->basic_rates,
740 capability, 0, true); 765 capability, 0, true);
741} 766}
742 767
@@ -1138,6 +1163,7 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata)
1138 clear_bit(SDATA_STATE_OFFCHANNEL_BEACON_STOPPED, &sdata->state); 1163 clear_bit(SDATA_STATE_OFFCHANNEL_BEACON_STOPPED, &sdata->state);
1139 ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED | 1164 ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED |
1140 BSS_CHANGED_IBSS); 1165 BSS_CHANGED_IBSS);
1166 ieee80211_vif_release_channel(sdata);
1141 synchronize_rcu(); 1167 synchronize_rcu();
1142 kfree(presp); 1168 kfree(presp);
1143 1169
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index f5aed963b22e..f3bbea1eb9e7 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -828,6 +828,9 @@ minstrel_ht_update_cck(struct minstrel_priv *mp, struct minstrel_ht_sta *mi,
828 if (sband->band != IEEE80211_BAND_2GHZ) 828 if (sband->band != IEEE80211_BAND_2GHZ)
829 return; 829 return;
830 830
831 if (!(mp->hw->flags & IEEE80211_HW_SUPPORTS_HT_CCK_RATES))
832 return;
833
831 mi->cck_supported = 0; 834 mi->cck_supported = 0;
832 mi->cck_supported_short = 0; 835 mi->cck_supported_short = 0;
833 for (i = 0; i < 4; i++) { 836 for (i = 0; i < 4; i++) {