diff options
| author | David S. Miller <davem@davemloft.net> | 2013-10-17 16:05:50 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2013-10-17 16:05:50 -0400 |
| commit | df709a18cae475de38ddaff63584692d50267b92 (patch) | |
| tree | 94db1a56c2427baaf1d2d92364718f69f77d95c7 /net/mac80211 | |
| parent | ce97fef4235378108ed3bd96e1b3eab8fd0a1fbd (diff) | |
| parent | 39c253ed7817bf477189a132b114303c9aa2c2d2 (diff) | |
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville says:
====================
Please pull this batch of fixes intended for the 3.12 stream!
For the mac80211 bits, Johannes says:
"Jouni fixes a remain-on-channel vs. scan bug, and Felix fixes client TX
probing on VLANs."
And also:
"This time I have two fixes from Emmanuel for RF-kill issues, and fixed
two issues reported by Evan Huus and Thomas Lindroth respectively."
On top of those...
Avinash Patil adds a couple of mwifiex fixes to properly inform cfg80211
about some different types of disconnects, avoiding WARNINGs.
Mark Cave-Ayland corrects a pointer arithmetic problem in rtlwifi,
avoiding incorrect automatic gain calculations.
Solomon Peachy sends a cw1200 fix for locking around calls to
cw1200_irq_handler, addressing "lost interrupt" problems.
Please let me know if there are problems!
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211')
| -rw-r--r-- | net/mac80211/cfg.c | 2 | ||||
| -rw-r--r-- | net/mac80211/ieee80211_i.h | 3 | ||||
| -rw-r--r-- | net/mac80211/offchannel.c | 2 | ||||
| -rw-r--r-- | net/mac80211/scan.c | 19 | ||||
| -rw-r--r-- | net/mac80211/status.c | 3 | ||||
| -rw-r--r-- | net/mac80211/tx.c | 3 | ||||
| -rw-r--r-- | net/mac80211/util.c | 4 |
7 files changed, 34 insertions, 2 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 2e7855a1b10d..629dee7ec9bf 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
| @@ -3518,7 +3518,7 @@ static int ieee80211_probe_client(struct wiphy *wiphy, struct net_device *dev, | |||
| 3518 | return -EINVAL; | 3518 | return -EINVAL; |
| 3519 | } | 3519 | } |
| 3520 | band = chanctx_conf->def.chan->band; | 3520 | band = chanctx_conf->def.chan->band; |
| 3521 | sta = sta_info_get(sdata, peer); | 3521 | sta = sta_info_get_bss(sdata, peer); |
| 3522 | if (sta) { | 3522 | if (sta) { |
| 3523 | qos = test_sta_flag(sta, WLAN_STA_WME); | 3523 | qos = test_sta_flag(sta, WLAN_STA_WME); |
| 3524 | } else { | 3524 | } else { |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index b6186517ec56..611abfcfb5eb 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
| @@ -893,6 +893,8 @@ struct tpt_led_trigger { | |||
| 893 | * that the scan completed. | 893 | * that the scan completed. |
| 894 | * @SCAN_ABORTED: Set for our scan work function when the driver reported | 894 | * @SCAN_ABORTED: Set for our scan work function when the driver reported |
| 895 | * a scan complete for an aborted scan. | 895 | * a scan complete for an aborted scan. |
| 896 | * @SCAN_HW_CANCELLED: Set for our scan work function when the scan is being | ||
| 897 | * cancelled. | ||
| 896 | */ | 898 | */ |
| 897 | enum { | 899 | enum { |
| 898 | SCAN_SW_SCANNING, | 900 | SCAN_SW_SCANNING, |
| @@ -900,6 +902,7 @@ enum { | |||
| 900 | SCAN_ONCHANNEL_SCANNING, | 902 | SCAN_ONCHANNEL_SCANNING, |
| 901 | SCAN_COMPLETED, | 903 | SCAN_COMPLETED, |
| 902 | SCAN_ABORTED, | 904 | SCAN_ABORTED, |
| 905 | SCAN_HW_CANCELLED, | ||
| 903 | }; | 906 | }; |
| 904 | 907 | ||
| 905 | /** | 908 | /** |
diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c index acd1f71adc03..0c2a29484c07 100644 --- a/net/mac80211/offchannel.c +++ b/net/mac80211/offchannel.c | |||
| @@ -394,6 +394,8 @@ void ieee80211_sw_roc_work(struct work_struct *work) | |||
| 394 | 394 | ||
| 395 | if (started) | 395 | if (started) |
| 396 | ieee80211_start_next_roc(local); | 396 | ieee80211_start_next_roc(local); |
| 397 | else if (list_empty(&local->roc_list)) | ||
| 398 | ieee80211_run_deferred_scan(local); | ||
| 397 | } | 399 | } |
| 398 | 400 | ||
| 399 | out_unlock: | 401 | out_unlock: |
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 08afe74b98f4..d2d17a449224 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
| @@ -238,6 +238,9 @@ static bool ieee80211_prep_hw_scan(struct ieee80211_local *local) | |||
| 238 | enum ieee80211_band band; | 238 | enum ieee80211_band band; |
| 239 | int i, ielen, n_chans; | 239 | int i, ielen, n_chans; |
| 240 | 240 | ||
| 241 | if (test_bit(SCAN_HW_CANCELLED, &local->scanning)) | ||
| 242 | return false; | ||
| 243 | |||
| 241 | do { | 244 | do { |
| 242 | if (local->hw_scan_band == IEEE80211_NUM_BANDS) | 245 | if (local->hw_scan_band == IEEE80211_NUM_BANDS) |
| 243 | return false; | 246 | return false; |
| @@ -940,7 +943,23 @@ void ieee80211_scan_cancel(struct ieee80211_local *local) | |||
| 940 | if (!local->scan_req) | 943 | if (!local->scan_req) |
| 941 | goto out; | 944 | goto out; |
| 942 | 945 | ||
| 946 | /* | ||
| 947 | * We have a scan running and the driver already reported completion, | ||
| 948 | * but the worker hasn't run yet or is stuck on the mutex - mark it as | ||
| 949 | * cancelled. | ||
| 950 | */ | ||
| 951 | if (test_bit(SCAN_HW_SCANNING, &local->scanning) && | ||
| 952 | test_bit(SCAN_COMPLETED, &local->scanning)) { | ||
| 953 | set_bit(SCAN_HW_CANCELLED, &local->scanning); | ||
| 954 | goto out; | ||
| 955 | } | ||
| 956 | |||
| 943 | if (test_bit(SCAN_HW_SCANNING, &local->scanning)) { | 957 | if (test_bit(SCAN_HW_SCANNING, &local->scanning)) { |
| 958 | /* | ||
| 959 | * Make sure that __ieee80211_scan_completed doesn't trigger a | ||
| 960 | * scan on another band. | ||
| 961 | */ | ||
| 962 | set_bit(SCAN_HW_CANCELLED, &local->scanning); | ||
| 944 | if (local->ops->cancel_hw_scan) | 963 | if (local->ops->cancel_hw_scan) |
| 945 | drv_cancel_hw_scan(local, | 964 | drv_cancel_hw_scan(local, |
| 946 | rcu_dereference_protected(local->scan_sdata, | 965 | rcu_dereference_protected(local->scan_sdata, |
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 368837fe3b80..78dc2e99027e 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c | |||
| @@ -180,6 +180,9 @@ static void ieee80211_frame_acked(struct sta_info *sta, struct sk_buff *skb) | |||
| 180 | struct ieee80211_local *local = sta->local; | 180 | struct ieee80211_local *local = sta->local; |
| 181 | struct ieee80211_sub_if_data *sdata = sta->sdata; | 181 | struct ieee80211_sub_if_data *sdata = sta->sdata; |
| 182 | 182 | ||
| 183 | if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) | ||
| 184 | sta->last_rx = jiffies; | ||
| 185 | |||
| 183 | if (ieee80211_is_data_qos(mgmt->frame_control)) { | 186 | if (ieee80211_is_data_qos(mgmt->frame_control)) { |
| 184 | struct ieee80211_hdr *hdr = (void *) skb->data; | 187 | struct ieee80211_hdr *hdr = (void *) skb->data; |
| 185 | u8 *qc = ieee80211_get_qos_ctl(hdr); | 188 | u8 *qc = ieee80211_get_qos_ctl(hdr); |
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 3456c0486b48..70b5a05c0a4e 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
| @@ -1120,7 +1120,8 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata, | |||
| 1120 | tx->sta = rcu_dereference(sdata->u.vlan.sta); | 1120 | tx->sta = rcu_dereference(sdata->u.vlan.sta); |
| 1121 | if (!tx->sta && sdata->dev->ieee80211_ptr->use_4addr) | 1121 | if (!tx->sta && sdata->dev->ieee80211_ptr->use_4addr) |
| 1122 | return TX_DROP; | 1122 | return TX_DROP; |
| 1123 | } else if (info->flags & IEEE80211_TX_CTL_INJECTED || | 1123 | } else if (info->flags & (IEEE80211_TX_CTL_INJECTED | |
| 1124 | IEEE80211_TX_INTFL_NL80211_FRAME_TX) || | ||
| 1124 | tx->sdata->control_port_protocol == tx->skb->protocol) { | 1125 | tx->sdata->control_port_protocol == tx->skb->protocol) { |
| 1125 | tx->sta = sta_info_get_bss(sdata, hdr->addr1); | 1126 | tx->sta = sta_info_get_bss(sdata, hdr->addr1); |
| 1126 | } | 1127 | } |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 9c3200bcfc02..69e4ef5348a0 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
| @@ -2238,6 +2238,10 @@ u64 ieee80211_calculate_rx_timestamp(struct ieee80211_local *local, | |||
| 2238 | } | 2238 | } |
| 2239 | 2239 | ||
| 2240 | rate = cfg80211_calculate_bitrate(&ri); | 2240 | rate = cfg80211_calculate_bitrate(&ri); |
| 2241 | if (WARN_ONCE(!rate, | ||
| 2242 | "Invalid bitrate: flags=0x%x, idx=%d, vht_nss=%d\n", | ||
| 2243 | status->flag, status->rate_idx, status->vht_nss)) | ||
| 2244 | return 0; | ||
| 2241 | 2245 | ||
| 2242 | /* rewind from end of MPDU */ | 2246 | /* rewind from end of MPDU */ |
| 2243 | if (status->flag & RX_FLAG_MACTIME_END) | 2247 | if (status->flag & RX_FLAG_MACTIME_END) |
