diff options
author | David S. Miller <davem@davemloft.net> | 2013-10-23 16:28:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-23 16:49:34 -0400 |
commit | c3fa32b9764dc45dcf8a2231b1c110abc4a63e0b (patch) | |
tree | 6cf2896a77b65bec64284681e1c3851eb3263e09 /net/mac80211 | |
parent | 34d92d5315b64a3e5292b7e9511c1bb617227fb6 (diff) | |
parent | 320437af954cbe66478f1f5e8b34cb5a8d072191 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/usb/qmi_wwan.c
include/net/dst.h
Trivial merge conflicts, both were overlapping changes.
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 ac28af74a414..b0a651cc389f 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -3564,7 +3564,7 @@ static int ieee80211_probe_client(struct wiphy *wiphy, struct net_device *dev, | |||
3564 | return -EINVAL; | 3564 | return -EINVAL; |
3565 | } | 3565 | } |
3566 | band = chanctx_conf->def.chan->band; | 3566 | band = chanctx_conf->def.chan->band; |
3567 | sta = sta_info_get(sdata, peer); | 3567 | sta = sta_info_get_bss(sdata, peer); |
3568 | if (sta) { | 3568 | if (sta) { |
3569 | qos = test_sta_flag(sta, WLAN_STA_WME); | 3569 | qos = test_sta_flag(sta, WLAN_STA_WME); |
3570 | } else { | 3570 | } else { |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 3a87c8976a32..e73cd0637f3b 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 ecb57b0bf74a..5ad66a83ef7f 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; |
@@ -939,7 +942,23 @@ void ieee80211_scan_cancel(struct ieee80211_local *local) | |||
939 | if (!local->scan_req) | 942 | if (!local->scan_req) |
940 | goto out; | 943 | goto out; |
941 | 944 | ||
945 | /* | ||
946 | * We have a scan running and the driver already reported completion, | ||
947 | * but the worker hasn't run yet or is stuck on the mutex - mark it as | ||
948 | * cancelled. | ||
949 | */ | ||
950 | if (test_bit(SCAN_HW_SCANNING, &local->scanning) && | ||
951 | test_bit(SCAN_COMPLETED, &local->scanning)) { | ||
952 | set_bit(SCAN_HW_CANCELLED, &local->scanning); | ||
953 | goto out; | ||
954 | } | ||
955 | |||
942 | if (test_bit(SCAN_HW_SCANNING, &local->scanning)) { | 956 | if (test_bit(SCAN_HW_SCANNING, &local->scanning)) { |
957 | /* | ||
958 | * Make sure that __ieee80211_scan_completed doesn't trigger a | ||
959 | * scan on another band. | ||
960 | */ | ||
961 | set_bit(SCAN_HW_CANCELLED, &local->scanning); | ||
943 | if (local->ops->cancel_hw_scan) | 962 | if (local->ops->cancel_hw_scan) |
944 | drv_cancel_hw_scan(local, | 963 | drv_cancel_hw_scan(local, |
945 | rcu_dereference_protected(local->scan_sdata, | 964 | 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 4fcbf634b548..9993fcb19ecd 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 1220f5afdb7e..aefb9d5b9620 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -2236,6 +2236,10 @@ u64 ieee80211_calculate_rx_timestamp(struct ieee80211_local *local, | |||
2236 | } | 2236 | } |
2237 | 2237 | ||
2238 | rate = cfg80211_calculate_bitrate(&ri); | 2238 | rate = cfg80211_calculate_bitrate(&ri); |
2239 | if (WARN_ONCE(!rate, | ||
2240 | "Invalid bitrate: flags=0x%x, idx=%d, vht_nss=%d\n", | ||
2241 | status->flag, status->rate_idx, status->vht_nss)) | ||
2242 | return 0; | ||
2239 | 2243 | ||
2240 | /* rewind from end of MPDU */ | 2244 | /* rewind from end of MPDU */ |
2241 | if (status->flag & RX_FLAG_MACTIME_END) | 2245 | if (status->flag & RX_FLAG_MACTIME_END) |