diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/ibss.c | 4 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 2 | ||||
-rw-r--r-- | net/mac80211/iface.c | 4 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 2 | ||||
-rw-r--r-- | net/mac80211/rx.c | 10 | ||||
-rw-r--r-- | net/mac80211/tx.c | 3 |
6 files changed, 14 insertions, 11 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 33fd8d9f714e..cef7c29214a8 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -457,8 +457,8 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, | |||
457 | * fall back to HT20 if we don't use or use | 457 | * fall back to HT20 if we don't use or use |
458 | * the other extension channel | 458 | * the other extension channel |
459 | */ | 459 | */ |
460 | if ((channel_type == NL80211_CHAN_HT40MINUS || | 460 | if (!(channel_type == NL80211_CHAN_HT40MINUS || |
461 | channel_type == NL80211_CHAN_HT40PLUS) && | 461 | channel_type == NL80211_CHAN_HT40PLUS) || |
462 | channel_type != sdata->u.ibss.channel_type) | 462 | channel_type != sdata->u.ibss.channel_type) |
463 | sta_ht_cap_new.cap &= | 463 | sta_ht_cap_new.cap &= |
464 | ~IEEE80211_HT_CAP_SUP_WIDTH_20_40; | 464 | ~IEEE80211_HT_CAP_SUP_WIDTH_20_40; |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index d9798a307f20..db8fae51714c 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -1210,7 +1210,7 @@ void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, | |||
1210 | struct sk_buff *skb); | 1210 | struct sk_buff *skb); |
1211 | void ieee80211_sta_reset_beacon_monitor(struct ieee80211_sub_if_data *sdata); | 1211 | void ieee80211_sta_reset_beacon_monitor(struct ieee80211_sub_if_data *sdata); |
1212 | void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata); | 1212 | void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata); |
1213 | void ieee80211_mgd_teardown(struct ieee80211_sub_if_data *sdata); | 1213 | void ieee80211_mgd_stop(struct ieee80211_sub_if_data *sdata); |
1214 | 1214 | ||
1215 | /* IBSS code */ | 1215 | /* IBSS code */ |
1216 | void ieee80211_ibss_notify_scan_completed(struct ieee80211_local *local); | 1216 | void ieee80211_ibss_notify_scan_completed(struct ieee80211_local *local); |
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 401c01f0731e..c20051b7ffcd 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -486,6 +486,8 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, | |||
486 | /* free all potentially still buffered bcast frames */ | 486 | /* free all potentially still buffered bcast frames */ |
487 | local->total_ps_buffered -= skb_queue_len(&sdata->u.ap.ps_bc_buf); | 487 | local->total_ps_buffered -= skb_queue_len(&sdata->u.ap.ps_bc_buf); |
488 | skb_queue_purge(&sdata->u.ap.ps_bc_buf); | 488 | skb_queue_purge(&sdata->u.ap.ps_bc_buf); |
489 | } else if (sdata->vif.type == NL80211_IFTYPE_STATION) { | ||
490 | ieee80211_mgd_stop(sdata); | ||
489 | } | 491 | } |
490 | 492 | ||
491 | if (going_down) | 493 | if (going_down) |
@@ -644,8 +646,6 @@ static void ieee80211_teardown_sdata(struct net_device *dev) | |||
644 | 646 | ||
645 | if (ieee80211_vif_is_mesh(&sdata->vif)) | 647 | if (ieee80211_vif_is_mesh(&sdata->vif)) |
646 | mesh_rmc_free(sdata); | 648 | mesh_rmc_free(sdata); |
647 | else if (sdata->vif.type == NL80211_IFTYPE_STATION) | ||
648 | ieee80211_mgd_teardown(sdata); | ||
649 | 649 | ||
650 | flushed = sta_info_flush(local, sdata); | 650 | flushed = sta_info_flush(local, sdata); |
651 | WARN_ON(flushed); | 651 | WARN_ON(flushed); |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index f76da5b3f5c5..20c680bfc3ae 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -3497,7 +3497,7 @@ int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata, | |||
3497 | return 0; | 3497 | return 0; |
3498 | } | 3498 | } |
3499 | 3499 | ||
3500 | void ieee80211_mgd_teardown(struct ieee80211_sub_if_data *sdata) | 3500 | void ieee80211_mgd_stop(struct ieee80211_sub_if_data *sdata) |
3501 | { | 3501 | { |
3502 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; | 3502 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; |
3503 | 3503 | ||
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index bcfe8c77c839..d64e285400aa 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -103,7 +103,7 @@ static void | |||
103 | ieee80211_add_rx_radiotap_header(struct ieee80211_local *local, | 103 | ieee80211_add_rx_radiotap_header(struct ieee80211_local *local, |
104 | struct sk_buff *skb, | 104 | struct sk_buff *skb, |
105 | struct ieee80211_rate *rate, | 105 | struct ieee80211_rate *rate, |
106 | int rtap_len) | 106 | int rtap_len, bool has_fcs) |
107 | { | 107 | { |
108 | struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); | 108 | struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); |
109 | struct ieee80211_radiotap_header *rthdr; | 109 | struct ieee80211_radiotap_header *rthdr; |
@@ -134,7 +134,7 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local, | |||
134 | } | 134 | } |
135 | 135 | ||
136 | /* IEEE80211_RADIOTAP_FLAGS */ | 136 | /* IEEE80211_RADIOTAP_FLAGS */ |
137 | if (local->hw.flags & IEEE80211_HW_RX_INCLUDES_FCS) | 137 | if (has_fcs && (local->hw.flags & IEEE80211_HW_RX_INCLUDES_FCS)) |
138 | *pos |= IEEE80211_RADIOTAP_F_FCS; | 138 | *pos |= IEEE80211_RADIOTAP_F_FCS; |
139 | if (status->flag & (RX_FLAG_FAILED_FCS_CRC | RX_FLAG_FAILED_PLCP_CRC)) | 139 | if (status->flag & (RX_FLAG_FAILED_FCS_CRC | RX_FLAG_FAILED_PLCP_CRC)) |
140 | *pos |= IEEE80211_RADIOTAP_F_BADFCS; | 140 | *pos |= IEEE80211_RADIOTAP_F_BADFCS; |
@@ -294,7 +294,8 @@ ieee80211_rx_monitor(struct ieee80211_local *local, struct sk_buff *origskb, | |||
294 | } | 294 | } |
295 | 295 | ||
296 | /* prepend radiotap information */ | 296 | /* prepend radiotap information */ |
297 | ieee80211_add_rx_radiotap_header(local, skb, rate, needed_headroom); | 297 | ieee80211_add_rx_radiotap_header(local, skb, rate, needed_headroom, |
298 | true); | ||
298 | 299 | ||
299 | skb_reset_mac_header(skb); | 300 | skb_reset_mac_header(skb); |
300 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 301 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
@@ -2571,7 +2572,8 @@ static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx, | |||
2571 | goto out_free_skb; | 2572 | goto out_free_skb; |
2572 | 2573 | ||
2573 | /* prepend radiotap information */ | 2574 | /* prepend radiotap information */ |
2574 | ieee80211_add_rx_radiotap_header(local, skb, rate, needed_headroom); | 2575 | ieee80211_add_rx_radiotap_header(local, skb, rate, needed_headroom, |
2576 | false); | ||
2575 | 2577 | ||
2576 | skb_set_mac_header(skb, 0); | 2578 | skb_set_mac_header(skb, 0); |
2577 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 2579 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 782a60198df4..e76facc69e95 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -1158,7 +1158,8 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata, | |||
1158 | tx->sta = rcu_dereference(sdata->u.vlan.sta); | 1158 | tx->sta = rcu_dereference(sdata->u.vlan.sta); |
1159 | if (!tx->sta && sdata->dev->ieee80211_ptr->use_4addr) | 1159 | if (!tx->sta && sdata->dev->ieee80211_ptr->use_4addr) |
1160 | return TX_DROP; | 1160 | return TX_DROP; |
1161 | } else if (info->flags & IEEE80211_TX_CTL_INJECTED) { | 1161 | } else if (info->flags & IEEE80211_TX_CTL_INJECTED || |
1162 | tx->sdata->control_port_protocol == tx->skb->protocol) { | ||
1162 | tx->sta = sta_info_get_bss(sdata, hdr->addr1); | 1163 | tx->sta = sta_info_get_bss(sdata, hdr->addr1); |
1163 | } | 1164 | } |
1164 | if (!tx->sta) | 1165 | if (!tx->sta) |