diff options
33 files changed, 132 insertions, 72 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 6dc67b1fdb50..a80a586cbdcd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -7277,7 +7277,6 @@ F: drivers/video/aty/aty128fb.c | |||
7277 | RALINK RT2X00 WIRELESS LAN DRIVER | 7277 | RALINK RT2X00 WIRELESS LAN DRIVER |
7278 | P: rt2x00 project | 7278 | P: rt2x00 project |
7279 | M: Ivo van Doorn <IvDoorn@gmail.com> | 7279 | M: Ivo van Doorn <IvDoorn@gmail.com> |
7280 | M: Gertjan van Wingerde <gwingerde@gmail.com> | ||
7281 | M: Helmut Schaa <helmut.schaa@googlemail.com> | 7280 | M: Helmut Schaa <helmut.schaa@googlemail.com> |
7282 | L: linux-wireless@vger.kernel.org | 7281 | L: linux-wireless@vger.kernel.org |
7283 | L: users@rt2x00.serialmonkey.com (moderated for non-subscribers) | 7282 | L: users@rt2x00.serialmonkey.com (moderated for non-subscribers) |
diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c index be571fef185d..a83b57e57b63 100644 --- a/drivers/bluetooth/ath3k.c +++ b/drivers/bluetooth/ath3k.c | |||
@@ -82,6 +82,7 @@ static const struct usb_device_id ath3k_table[] = { | |||
82 | { USB_DEVICE(0x04CA, 0x3004) }, | 82 | { USB_DEVICE(0x04CA, 0x3004) }, |
83 | { USB_DEVICE(0x04CA, 0x3005) }, | 83 | { USB_DEVICE(0x04CA, 0x3005) }, |
84 | { USB_DEVICE(0x04CA, 0x3006) }, | 84 | { USB_DEVICE(0x04CA, 0x3006) }, |
85 | { USB_DEVICE(0x04CA, 0x3007) }, | ||
85 | { USB_DEVICE(0x04CA, 0x3008) }, | 86 | { USB_DEVICE(0x04CA, 0x3008) }, |
86 | { USB_DEVICE(0x04CA, 0x300b) }, | 87 | { USB_DEVICE(0x04CA, 0x300b) }, |
87 | { USB_DEVICE(0x0930, 0x0219) }, | 88 | { USB_DEVICE(0x0930, 0x0219) }, |
@@ -131,6 +132,7 @@ static const struct usb_device_id ath3k_blist_tbl[] = { | |||
131 | { USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 }, | 132 | { USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 }, |
132 | { USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 }, | 133 | { USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 }, |
133 | { USB_DEVICE(0x04ca, 0x3006), .driver_info = BTUSB_ATH3012 }, | 134 | { USB_DEVICE(0x04ca, 0x3006), .driver_info = BTUSB_ATH3012 }, |
135 | { USB_DEVICE(0x04ca, 0x3007), .driver_info = BTUSB_ATH3012 }, | ||
134 | { USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 }, | 136 | { USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 }, |
135 | { USB_DEVICE(0x04ca, 0x300b), .driver_info = BTUSB_ATH3012 }, | 137 | { USB_DEVICE(0x04ca, 0x300b), .driver_info = BTUSB_ATH3012 }, |
136 | { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, | 138 | { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, |
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index f338b0c5a8de..a7dfbf9a3afb 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c | |||
@@ -152,6 +152,7 @@ static const struct usb_device_id blacklist_table[] = { | |||
152 | { USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 }, | 152 | { USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 }, |
153 | { USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 }, | 153 | { USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 }, |
154 | { USB_DEVICE(0x04ca, 0x3006), .driver_info = BTUSB_ATH3012 }, | 154 | { USB_DEVICE(0x04ca, 0x3006), .driver_info = BTUSB_ATH3012 }, |
155 | { USB_DEVICE(0x04ca, 0x3007), .driver_info = BTUSB_ATH3012 }, | ||
155 | { USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 }, | 156 | { USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 }, |
156 | { USB_DEVICE(0x04ca, 0x300b), .driver_info = BTUSB_ATH3012 }, | 157 | { USB_DEVICE(0x04ca, 0x300b), .driver_info = BTUSB_ATH3012 }, |
157 | { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, | 158 | { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, |
@@ -1485,10 +1486,8 @@ static int btusb_probe(struct usb_interface *intf, | |||
1485 | if (id->driver_info & BTUSB_BCM92035) | 1486 | if (id->driver_info & BTUSB_BCM92035) |
1486 | hdev->setup = btusb_setup_bcm92035; | 1487 | hdev->setup = btusb_setup_bcm92035; |
1487 | 1488 | ||
1488 | if (id->driver_info & BTUSB_INTEL) { | 1489 | if (id->driver_info & BTUSB_INTEL) |
1489 | usb_enable_autosuspend(data->udev); | ||
1490 | hdev->setup = btusb_setup_intel; | 1490 | hdev->setup = btusb_setup_intel; |
1491 | } | ||
1492 | 1491 | ||
1493 | /* Interface numbers are hardcoded in the specification */ | 1492 | /* Interface numbers are hardcoded in the specification */ |
1494 | data->isoc = usb_ifnum_to_if(data->udev, 1); | 1493 | data->isoc = usb_ifnum_to_if(data->udev, 1); |
diff --git a/drivers/net/wireless/ath/ath9k/ahb.c b/drivers/net/wireless/ath/ath9k/ahb.c index a0398fe3eb28..be3eb2a8d602 100644 --- a/drivers/net/wireless/ath/ath9k/ahb.c +++ b/drivers/net/wireless/ath/ath9k/ahb.c | |||
@@ -86,7 +86,6 @@ static int ath_ahb_probe(struct platform_device *pdev) | |||
86 | int irq; | 86 | int irq; |
87 | int ret = 0; | 87 | int ret = 0; |
88 | struct ath_hw *ah; | 88 | struct ath_hw *ah; |
89 | struct ath_common *common; | ||
90 | char hw_name[64]; | 89 | char hw_name[64]; |
91 | 90 | ||
92 | if (!dev_get_platdata(&pdev->dev)) { | 91 | if (!dev_get_platdata(&pdev->dev)) { |
@@ -146,9 +145,6 @@ static int ath_ahb_probe(struct platform_device *pdev) | |||
146 | wiphy_info(hw->wiphy, "%s mem=0x%lx, irq=%d\n", | 145 | wiphy_info(hw->wiphy, "%s mem=0x%lx, irq=%d\n", |
147 | hw_name, (unsigned long)mem, irq); | 146 | hw_name, (unsigned long)mem, irq); |
148 | 147 | ||
149 | common = ath9k_hw_common(sc->sc_ah); | ||
150 | /* Will be cleared in ath9k_start() */ | ||
151 | set_bit(ATH_OP_INVALID, &common->op_flags); | ||
152 | return 0; | 148 | return 0; |
153 | 149 | ||
154 | err_irq: | 150 | err_irq: |
diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c index 6d47783f2e5b..ba502a2d199b 100644 --- a/drivers/net/wireless/ath/ath9k/ani.c +++ b/drivers/net/wireless/ath/ath9k/ani.c | |||
@@ -155,6 +155,9 @@ static void ath9k_hw_set_ofdm_nil(struct ath_hw *ah, u8 immunityLevel, | |||
155 | ATH9K_ANI_RSSI_THR_LOW, | 155 | ATH9K_ANI_RSSI_THR_LOW, |
156 | ATH9K_ANI_RSSI_THR_HIGH); | 156 | ATH9K_ANI_RSSI_THR_HIGH); |
157 | 157 | ||
158 | if (AR_SREV_9100(ah) && immunityLevel < ATH9K_ANI_OFDM_DEF_LEVEL) | ||
159 | immunityLevel = ATH9K_ANI_OFDM_DEF_LEVEL; | ||
160 | |||
158 | if (!scan) | 161 | if (!scan) |
159 | aniState->ofdmNoiseImmunityLevel = immunityLevel; | 162 | aniState->ofdmNoiseImmunityLevel = immunityLevel; |
160 | 163 | ||
@@ -235,6 +238,9 @@ static void ath9k_hw_set_cck_nil(struct ath_hw *ah, u_int8_t immunityLevel, | |||
235 | BEACON_RSSI(ah), ATH9K_ANI_RSSI_THR_LOW, | 238 | BEACON_RSSI(ah), ATH9K_ANI_RSSI_THR_LOW, |
236 | ATH9K_ANI_RSSI_THR_HIGH); | 239 | ATH9K_ANI_RSSI_THR_HIGH); |
237 | 240 | ||
241 | if (AR_SREV_9100(ah) && immunityLevel < ATH9K_ANI_CCK_DEF_LEVEL) | ||
242 | immunityLevel = ATH9K_ANI_CCK_DEF_LEVEL; | ||
243 | |||
238 | if (ah->opmode == NL80211_IFTYPE_STATION && | 244 | if (ah->opmode == NL80211_IFTYPE_STATION && |
239 | BEACON_RSSI(ah) <= ATH9K_ANI_RSSI_THR_LOW && | 245 | BEACON_RSSI(ah) <= ATH9K_ANI_RSSI_THR_LOW && |
240 | immunityLevel > ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI) | 246 | immunityLevel > ATH9K_ANI_CCK_MAX_LEVEL_LOW_RSSI) |
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h index 05935f638525..33a2ae77b595 100644 --- a/drivers/net/wireless/ath/ath9k/ath9k.h +++ b/drivers/net/wireless/ath/ath9k/ath9k.h | |||
@@ -254,7 +254,6 @@ struct ath_atx_tid { | |||
254 | 254 | ||
255 | s8 bar_index; | 255 | s8 bar_index; |
256 | bool sched; | 256 | bool sched; |
257 | bool paused; | ||
258 | bool active; | 257 | bool active; |
259 | }; | 258 | }; |
260 | 259 | ||
diff --git a/drivers/net/wireless/ath/ath9k/debug_sta.c b/drivers/net/wireless/ath/ath9k/debug_sta.c index d76e6e0120d2..ffca918ff16a 100644 --- a/drivers/net/wireless/ath/ath9k/debug_sta.c +++ b/drivers/net/wireless/ath/ath9k/debug_sta.c | |||
@@ -72,7 +72,7 @@ static ssize_t read_file_node_aggr(struct file *file, char __user *user_buf, | |||
72 | ath_txq_lock(sc, txq); | 72 | ath_txq_lock(sc, txq); |
73 | if (tid->active) { | 73 | if (tid->active) { |
74 | len += scnprintf(buf + len, size - len, | 74 | len += scnprintf(buf + len, size - len, |
75 | "%3d%11d%10d%10d%10d%10d%9d%6d%8d\n", | 75 | "%3d%11d%10d%10d%10d%10d%9d%6d\n", |
76 | tid->tidno, | 76 | tid->tidno, |
77 | tid->seq_start, | 77 | tid->seq_start, |
78 | tid->seq_next, | 78 | tid->seq_next, |
@@ -80,8 +80,7 @@ static ssize_t read_file_node_aggr(struct file *file, char __user *user_buf, | |||
80 | tid->baw_head, | 80 | tid->baw_head, |
81 | tid->baw_tail, | 81 | tid->baw_tail, |
82 | tid->bar_index, | 82 | tid->bar_index, |
83 | tid->sched, | 83 | tid->sched); |
84 | tid->paused); | ||
85 | } | 84 | } |
86 | ath_txq_unlock(sc, txq); | 85 | ath_txq_unlock(sc, txq); |
87 | } | 86 | } |
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index bcc7cfb1866d..1af77081181e 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
@@ -787,6 +787,9 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc, | |||
787 | common = ath9k_hw_common(ah); | 787 | common = ath9k_hw_common(ah); |
788 | ath9k_set_hw_capab(sc, hw); | 788 | ath9k_set_hw_capab(sc, hw); |
789 | 789 | ||
790 | /* Will be cleared in ath9k_start() */ | ||
791 | set_bit(ATH_OP_INVALID, &common->op_flags); | ||
792 | |||
790 | /* Initialize regulatory */ | 793 | /* Initialize regulatory */ |
791 | error = ath_regd_init(&common->regulatory, sc->hw->wiphy, | 794 | error = ath_regd_init(&common->regulatory, sc->hw->wiphy, |
792 | ath9k_reg_notifier); | 795 | ath9k_reg_notifier); |
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index 25304adece57..914dbc6b1720 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c | |||
@@ -784,7 +784,6 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
784 | { | 784 | { |
785 | struct ath_softc *sc; | 785 | struct ath_softc *sc; |
786 | struct ieee80211_hw *hw; | 786 | struct ieee80211_hw *hw; |
787 | struct ath_common *common; | ||
788 | u8 csz; | 787 | u8 csz; |
789 | u32 val; | 788 | u32 val; |
790 | int ret = 0; | 789 | int ret = 0; |
@@ -877,10 +876,6 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
877 | wiphy_info(hw->wiphy, "%s mem=0x%lx, irq=%d\n", | 876 | wiphy_info(hw->wiphy, "%s mem=0x%lx, irq=%d\n", |
878 | hw_name, (unsigned long)sc->mem, pdev->irq); | 877 | hw_name, (unsigned long)sc->mem, pdev->irq); |
879 | 878 | ||
880 | /* Will be cleared in ath9k_start() */ | ||
881 | common = ath9k_hw_common(sc->sc_ah); | ||
882 | set_bit(ATH_OP_INVALID, &common->op_flags); | ||
883 | |||
884 | return 0; | 879 | return 0; |
885 | 880 | ||
886 | err_init: | 881 | err_init: |
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index a1fac6bdbb04..43ae199601f7 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
@@ -978,6 +978,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp) | |||
978 | u64 tsf = 0; | 978 | u64 tsf = 0; |
979 | unsigned long flags; | 979 | unsigned long flags; |
980 | dma_addr_t new_buf_addr; | 980 | dma_addr_t new_buf_addr; |
981 | unsigned int budget = 512; | ||
981 | 982 | ||
982 | if (edma) | 983 | if (edma) |
983 | dma_type = DMA_BIDIRECTIONAL; | 984 | dma_type = DMA_BIDIRECTIONAL; |
@@ -1116,15 +1117,17 @@ requeue_drop_frag: | |||
1116 | } | 1117 | } |
1117 | requeue: | 1118 | requeue: |
1118 | list_add_tail(&bf->list, &sc->rx.rxbuf); | 1119 | list_add_tail(&bf->list, &sc->rx.rxbuf); |
1119 | if (flush) | ||
1120 | continue; | ||
1121 | 1120 | ||
1122 | if (edma) { | 1121 | if (edma) { |
1123 | ath_rx_edma_buf_link(sc, qtype); | 1122 | ath_rx_edma_buf_link(sc, qtype); |
1124 | } else { | 1123 | } else { |
1125 | ath_rx_buf_relink(sc, bf); | 1124 | ath_rx_buf_relink(sc, bf); |
1126 | ath9k_hw_rxena(ah); | 1125 | if (!flush) |
1126 | ath9k_hw_rxena(ah); | ||
1127 | } | 1127 | } |
1128 | |||
1129 | if (!budget--) | ||
1130 | break; | ||
1128 | } while (1); | 1131 | } while (1); |
1129 | 1132 | ||
1130 | if (!(ah->imask & ATH9K_INT_RXEOL)) { | 1133 | if (!(ah->imask & ATH9K_INT_RXEOL)) { |
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index 87cbec47fb48..66acb2cbd9df 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
@@ -107,9 +107,6 @@ static void ath_tx_queue_tid(struct ath_txq *txq, struct ath_atx_tid *tid) | |||
107 | { | 107 | { |
108 | struct ath_atx_ac *ac = tid->ac; | 108 | struct ath_atx_ac *ac = tid->ac; |
109 | 109 | ||
110 | if (tid->paused) | ||
111 | return; | ||
112 | |||
113 | if (tid->sched) | 110 | if (tid->sched) |
114 | return; | 111 | return; |
115 | 112 | ||
@@ -1407,7 +1404,6 @@ int ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta, | |||
1407 | ath_tx_tid_change_state(sc, txtid); | 1404 | ath_tx_tid_change_state(sc, txtid); |
1408 | 1405 | ||
1409 | txtid->active = true; | 1406 | txtid->active = true; |
1410 | txtid->paused = true; | ||
1411 | *ssn = txtid->seq_start = txtid->seq_next; | 1407 | *ssn = txtid->seq_start = txtid->seq_next; |
1412 | txtid->bar_index = -1; | 1408 | txtid->bar_index = -1; |
1413 | 1409 | ||
@@ -1427,7 +1423,6 @@ void ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid) | |||
1427 | 1423 | ||
1428 | ath_txq_lock(sc, txq); | 1424 | ath_txq_lock(sc, txq); |
1429 | txtid->active = false; | 1425 | txtid->active = false; |
1430 | txtid->paused = false; | ||
1431 | ath_tx_flush_tid(sc, txtid); | 1426 | ath_tx_flush_tid(sc, txtid); |
1432 | ath_tx_tid_change_state(sc, txtid); | 1427 | ath_tx_tid_change_state(sc, txtid); |
1433 | ath_txq_unlock_complete(sc, txq); | 1428 | ath_txq_unlock_complete(sc, txq); |
@@ -1487,7 +1482,7 @@ void ath_tx_aggr_wakeup(struct ath_softc *sc, struct ath_node *an) | |||
1487 | ath_txq_lock(sc, txq); | 1482 | ath_txq_lock(sc, txq); |
1488 | ac->clear_ps_filter = true; | 1483 | ac->clear_ps_filter = true; |
1489 | 1484 | ||
1490 | if (!tid->paused && ath_tid_has_buffered(tid)) { | 1485 | if (ath_tid_has_buffered(tid)) { |
1491 | ath_tx_queue_tid(txq, tid); | 1486 | ath_tx_queue_tid(txq, tid); |
1492 | ath_txq_schedule(sc, txq); | 1487 | ath_txq_schedule(sc, txq); |
1493 | } | 1488 | } |
@@ -1510,7 +1505,6 @@ void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, | |||
1510 | ath_txq_lock(sc, txq); | 1505 | ath_txq_lock(sc, txq); |
1511 | 1506 | ||
1512 | tid->baw_size = IEEE80211_MIN_AMPDU_BUF << sta->ht_cap.ampdu_factor; | 1507 | tid->baw_size = IEEE80211_MIN_AMPDU_BUF << sta->ht_cap.ampdu_factor; |
1513 | tid->paused = false; | ||
1514 | 1508 | ||
1515 | if (ath_tid_has_buffered(tid)) { | 1509 | if (ath_tid_has_buffered(tid)) { |
1516 | ath_tx_queue_tid(txq, tid); | 1510 | ath_tx_queue_tid(txq, tid); |
@@ -1544,8 +1538,6 @@ void ath9k_release_buffered_frames(struct ieee80211_hw *hw, | |||
1544 | continue; | 1538 | continue; |
1545 | 1539 | ||
1546 | tid = ATH_AN_2_TID(an, i); | 1540 | tid = ATH_AN_2_TID(an, i); |
1547 | if (tid->paused) | ||
1548 | continue; | ||
1549 | 1541 | ||
1550 | ath_txq_lock(sc, tid->ac->txq); | 1542 | ath_txq_lock(sc, tid->ac->txq); |
1551 | while (nframes > 0) { | 1543 | while (nframes > 0) { |
@@ -1844,9 +1836,6 @@ void ath_txq_schedule(struct ath_softc *sc, struct ath_txq *txq) | |||
1844 | list_del(&tid->list); | 1836 | list_del(&tid->list); |
1845 | tid->sched = false; | 1837 | tid->sched = false; |
1846 | 1838 | ||
1847 | if (tid->paused) | ||
1848 | continue; | ||
1849 | |||
1850 | if (ath_tx_sched_aggr(sc, txq, tid, &stop)) | 1839 | if (ath_tx_sched_aggr(sc, txq, tid, &stop)) |
1851 | sent = true; | 1840 | sent = true; |
1852 | 1841 | ||
@@ -2698,7 +2687,6 @@ void ath_tx_node_init(struct ath_softc *sc, struct ath_node *an) | |||
2698 | tid->baw_size = WME_MAX_BA; | 2687 | tid->baw_size = WME_MAX_BA; |
2699 | tid->baw_head = tid->baw_tail = 0; | 2688 | tid->baw_head = tid->baw_tail = 0; |
2700 | tid->sched = false; | 2689 | tid->sched = false; |
2701 | tid->paused = false; | ||
2702 | tid->active = false; | 2690 | tid->active = false; |
2703 | __skb_queue_head_init(&tid->buf_q); | 2691 | __skb_queue_head_init(&tid->buf_q); |
2704 | __skb_queue_head_init(&tid->retry_q); | 2692 | __skb_queue_head_init(&tid->retry_q); |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/chip.c b/drivers/net/wireless/brcm80211/brcmfmac/chip.c index df130ef53d1c..c7c9f15c0fe0 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/chip.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/chip.c | |||
@@ -303,10 +303,10 @@ static void brcmf_chip_ai_coredisable(struct brcmf_core_priv *core, | |||
303 | 303 | ||
304 | ci = core->chip; | 304 | ci = core->chip; |
305 | 305 | ||
306 | /* if core is already in reset, just return */ | 306 | /* if core is already in reset, skip reset */ |
307 | regdata = ci->ops->read32(ci->ctx, core->wrapbase + BCMA_RESET_CTL); | 307 | regdata = ci->ops->read32(ci->ctx, core->wrapbase + BCMA_RESET_CTL); |
308 | if ((regdata & BCMA_RESET_CTL_RESET) != 0) | 308 | if ((regdata & BCMA_RESET_CTL_RESET) != 0) |
309 | return; | 309 | goto in_reset_configure; |
310 | 310 | ||
311 | /* configure reset */ | 311 | /* configure reset */ |
312 | ci->ops->write32(ci->ctx, core->wrapbase + BCMA_IOCTL, | 312 | ci->ops->write32(ci->ctx, core->wrapbase + BCMA_IOCTL, |
@@ -322,6 +322,7 @@ static void brcmf_chip_ai_coredisable(struct brcmf_core_priv *core, | |||
322 | SPINWAIT(ci->ops->read32(ci->ctx, core->wrapbase + BCMA_RESET_CTL) != | 322 | SPINWAIT(ci->ops->read32(ci->ctx, core->wrapbase + BCMA_RESET_CTL) != |
323 | BCMA_RESET_CTL_RESET, 300); | 323 | BCMA_RESET_CTL_RESET, 300); |
324 | 324 | ||
325 | in_reset_configure: | ||
325 | /* in-reset configure */ | 326 | /* in-reset configure */ |
326 | ci->ops->write32(ci->ctx, core->wrapbase + BCMA_IOCTL, | 327 | ci->ops->write32(ci->ctx, core->wrapbase + BCMA_IOCTL, |
327 | reset | BCMA_IOCTL_FGC | BCMA_IOCTL_CLK); | 328 | reset | BCMA_IOCTL_FGC | BCMA_IOCTL_CLK); |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c index afb3d15e38ff..be1985296bdc 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | |||
@@ -4948,7 +4948,7 @@ static int brcmf_enable_bw40_2g(struct brcmf_if *ifp) | |||
4948 | if (!err) { | 4948 | if (!err) { |
4949 | /* only set 2G bandwidth using bw_cap command */ | 4949 | /* only set 2G bandwidth using bw_cap command */ |
4950 | band_bwcap.band = cpu_to_le32(WLC_BAND_2G); | 4950 | band_bwcap.band = cpu_to_le32(WLC_BAND_2G); |
4951 | band_bwcap.bw_cap = cpu_to_le32(WLC_BW_40MHZ_BIT); | 4951 | band_bwcap.bw_cap = cpu_to_le32(WLC_BW_CAP_40MHZ); |
4952 | err = brcmf_fil_iovar_data_set(ifp, "bw_cap", &band_bwcap, | 4952 | err = brcmf_fil_iovar_data_set(ifp, "bw_cap", &band_bwcap, |
4953 | sizeof(band_bwcap)); | 4953 | sizeof(band_bwcap)); |
4954 | } else { | 4954 | } else { |
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index 6713b87c8555..f20cbd06a49f 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c | |||
@@ -1020,7 +1020,7 @@ static void iwl_mvm_mc_iface_iterator(void *_data, u8 *mac, | |||
1020 | memcpy(cmd->bssid, vif->bss_conf.bssid, ETH_ALEN); | 1020 | memcpy(cmd->bssid, vif->bss_conf.bssid, ETH_ALEN); |
1021 | len = roundup(sizeof(*cmd) + cmd->count * ETH_ALEN, 4); | 1021 | len = roundup(sizeof(*cmd) + cmd->count * ETH_ALEN, 4); |
1022 | 1022 | ||
1023 | ret = iwl_mvm_send_cmd_pdu(mvm, MCAST_FILTER_CMD, CMD_SYNC, len, cmd); | 1023 | ret = iwl_mvm_send_cmd_pdu(mvm, MCAST_FILTER_CMD, CMD_ASYNC, len, cmd); |
1024 | if (ret) | 1024 | if (ret) |
1025 | IWL_ERR(mvm, "mcast filter cmd error. ret=%d\n", ret); | 1025 | IWL_ERR(mvm, "mcast filter cmd error. ret=%d\n", ret); |
1026 | } | 1026 | } |
@@ -1036,7 +1036,7 @@ static void iwl_mvm_recalc_multicast(struct iwl_mvm *mvm) | |||
1036 | if (WARN_ON_ONCE(!mvm->mcast_filter_cmd)) | 1036 | if (WARN_ON_ONCE(!mvm->mcast_filter_cmd)) |
1037 | return; | 1037 | return; |
1038 | 1038 | ||
1039 | ieee80211_iterate_active_interfaces( | 1039 | ieee80211_iterate_active_interfaces_atomic( |
1040 | mvm->hw, IEEE80211_IFACE_ITER_NORMAL, | 1040 | mvm->hw, IEEE80211_IFACE_ITER_NORMAL, |
1041 | iwl_mvm_mc_iface_iterator, &iter_data); | 1041 | iwl_mvm_mc_iface_iterator, &iter_data); |
1042 | } | 1042 | } |
@@ -1829,6 +1829,11 @@ static int iwl_mvm_mac_sched_scan_start(struct ieee80211_hw *hw, | |||
1829 | 1829 | ||
1830 | mutex_lock(&mvm->mutex); | 1830 | mutex_lock(&mvm->mutex); |
1831 | 1831 | ||
1832 | if (!iwl_mvm_is_idle(mvm)) { | ||
1833 | ret = -EBUSY; | ||
1834 | goto out; | ||
1835 | } | ||
1836 | |||
1832 | switch (mvm->scan_status) { | 1837 | switch (mvm->scan_status) { |
1833 | case IWL_MVM_SCAN_OS: | 1838 | case IWL_MVM_SCAN_OS: |
1834 | IWL_DEBUG_SCAN(mvm, "Stopping previous scan for sched_scan\n"); | 1839 | IWL_DEBUG_SCAN(mvm, "Stopping previous scan for sched_scan\n"); |
diff --git a/drivers/net/wireless/iwlwifi/mvm/mvm.h b/drivers/net/wireless/iwlwifi/mvm/mvm.h index 1e468c3e8dea..8747d03311f3 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h | |||
@@ -1029,6 +1029,9 @@ static inline bool iwl_mvm_vif_low_latency(struct iwl_mvm_vif *mvmvif) | |||
1029 | return mvmvif->low_latency; | 1029 | return mvmvif->low_latency; |
1030 | } | 1030 | } |
1031 | 1031 | ||
1032 | /* Assoc status */ | ||
1033 | bool iwl_mvm_is_idle(struct iwl_mvm *mvm); | ||
1034 | |||
1032 | /* Thermal management and CT-kill */ | 1035 | /* Thermal management and CT-kill */ |
1033 | void iwl_mvm_tt_tx_backoff(struct iwl_mvm *mvm, u32 backoff); | 1036 | void iwl_mvm_tt_tx_backoff(struct iwl_mvm *mvm, u32 backoff); |
1034 | void iwl_mvm_tt_handler(struct iwl_mvm *mvm); | 1037 | void iwl_mvm_tt_handler(struct iwl_mvm *mvm); |
diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c index 3e25af44afd7..36ae01a18dee 100644 --- a/drivers/net/wireless/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/iwlwifi/mvm/scan.c | |||
@@ -741,7 +741,7 @@ int iwl_mvm_config_sched_scan(struct iwl_mvm *mvm, | |||
741 | int band_2ghz = mvm->nvm_data->bands[IEEE80211_BAND_2GHZ].n_channels; | 741 | int band_2ghz = mvm->nvm_data->bands[IEEE80211_BAND_2GHZ].n_channels; |
742 | int band_5ghz = mvm->nvm_data->bands[IEEE80211_BAND_5GHZ].n_channels; | 742 | int band_5ghz = mvm->nvm_data->bands[IEEE80211_BAND_5GHZ].n_channels; |
743 | int head = 0; | 743 | int head = 0; |
744 | int tail = band_2ghz + band_5ghz; | 744 | int tail = band_2ghz + band_5ghz - 1; |
745 | u32 ssid_bitmap; | 745 | u32 ssid_bitmap; |
746 | int cmd_len; | 746 | int cmd_len; |
747 | int ret; | 747 | int ret; |
diff --git a/drivers/net/wireless/iwlwifi/mvm/utils.c b/drivers/net/wireless/iwlwifi/mvm/utils.c index 4c3577e773a5..2f82d0dc7ad8 100644 --- a/drivers/net/wireless/iwlwifi/mvm/utils.c +++ b/drivers/net/wireless/iwlwifi/mvm/utils.c | |||
@@ -690,3 +690,22 @@ bool iwl_mvm_low_latency(struct iwl_mvm *mvm) | |||
690 | 690 | ||
691 | return result; | 691 | return result; |
692 | } | 692 | } |
693 | |||
694 | static void iwl_mvm_idle_iter(void *_data, u8 *mac, struct ieee80211_vif *vif) | ||
695 | { | ||
696 | bool *idle = _data; | ||
697 | |||
698 | if (!vif->bss_conf.idle) | ||
699 | *idle = false; | ||
700 | } | ||
701 | |||
702 | bool iwl_mvm_is_idle(struct iwl_mvm *mvm) | ||
703 | { | ||
704 | bool idle = true; | ||
705 | |||
706 | ieee80211_iterate_active_interfaces_atomic( | ||
707 | mvm->hw, IEEE80211_IFACE_ITER_NORMAL, | ||
708 | iwl_mvm_idle_iter, &idle); | ||
709 | |||
710 | return idle; | ||
711 | } | ||
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c index f41f9b7a6007..a1af903f6c9b 100644 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c | |||
@@ -1848,6 +1848,10 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev, | |||
1848 | * PCI Tx retries from interfering with C3 CPU state */ | 1848 | * PCI Tx retries from interfering with C3 CPU state */ |
1849 | pci_write_config_byte(pdev, PCI_CFG_RETRY_TIMEOUT, 0x00); | 1849 | pci_write_config_byte(pdev, PCI_CFG_RETRY_TIMEOUT, 0x00); |
1850 | 1850 | ||
1851 | trans->dev = &pdev->dev; | ||
1852 | trans_pcie->pci_dev = pdev; | ||
1853 | iwl_disable_interrupts(trans); | ||
1854 | |||
1851 | err = pci_enable_msi(pdev); | 1855 | err = pci_enable_msi(pdev); |
1852 | if (err) { | 1856 | if (err) { |
1853 | dev_err(&pdev->dev, "pci_enable_msi failed(0X%x)\n", err); | 1857 | dev_err(&pdev->dev, "pci_enable_msi failed(0X%x)\n", err); |
@@ -1859,8 +1863,6 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev, | |||
1859 | } | 1863 | } |
1860 | } | 1864 | } |
1861 | 1865 | ||
1862 | trans->dev = &pdev->dev; | ||
1863 | trans_pcie->pci_dev = pdev; | ||
1864 | trans->hw_rev = iwl_read32(trans, CSR_HW_REV); | 1866 | trans->hw_rev = iwl_read32(trans, CSR_HW_REV); |
1865 | trans->hw_id = (pdev->device << 16) + pdev->subsystem_device; | 1867 | trans->hw_id = (pdev->device << 16) + pdev->subsystem_device; |
1866 | snprintf(trans->hw_id_str, sizeof(trans->hw_id_str), | 1868 | snprintf(trans->hw_id_str, sizeof(trans->hw_id_str), |
@@ -1886,8 +1888,6 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev, | |||
1886 | goto out_pci_disable_msi; | 1888 | goto out_pci_disable_msi; |
1887 | } | 1889 | } |
1888 | 1890 | ||
1889 | trans_pcie->inta_mask = CSR_INI_SET_MASK; | ||
1890 | |||
1891 | if (iwl_pcie_alloc_ict(trans)) | 1891 | if (iwl_pcie_alloc_ict(trans)) |
1892 | goto out_free_cmd_pool; | 1892 | goto out_free_cmd_pool; |
1893 | 1893 | ||
@@ -1899,6 +1899,8 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev, | |||
1899 | goto out_free_ict; | 1899 | goto out_free_ict; |
1900 | } | 1900 | } |
1901 | 1901 | ||
1902 | trans_pcie->inta_mask = CSR_INI_SET_MASK; | ||
1903 | |||
1902 | return trans; | 1904 | return trans; |
1903 | 1905 | ||
1904 | out_free_ict: | 1906 | out_free_ict: |
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 30a2367ba8d6..212ac4842c16 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
@@ -621,20 +621,18 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw, | |||
621 | bss_conf->bssid); | 621 | bss_conf->bssid); |
622 | 622 | ||
623 | /* | 623 | /* |
624 | * Update the beacon. This is only required on USB devices. PCI | ||
625 | * devices fetch beacons periodically. | ||
626 | */ | ||
627 | if (changes & BSS_CHANGED_BEACON && rt2x00_is_usb(rt2x00dev)) | ||
628 | rt2x00queue_update_beacon(rt2x00dev, vif); | ||
629 | |||
630 | /* | ||
631 | * Start/stop beaconing. | 624 | * Start/stop beaconing. |
632 | */ | 625 | */ |
633 | if (changes & BSS_CHANGED_BEACON_ENABLED) { | 626 | if (changes & BSS_CHANGED_BEACON_ENABLED) { |
634 | if (!bss_conf->enable_beacon && intf->enable_beacon) { | 627 | if (!bss_conf->enable_beacon && intf->enable_beacon) { |
635 | rt2x00queue_clear_beacon(rt2x00dev, vif); | ||
636 | rt2x00dev->intf_beaconing--; | 628 | rt2x00dev->intf_beaconing--; |
637 | intf->enable_beacon = false; | 629 | intf->enable_beacon = false; |
630 | /* | ||
631 | * Clear beacon in the H/W for this vif. This is needed | ||
632 | * to disable beaconing on this particular interface | ||
633 | * and keep it running on other interfaces. | ||
634 | */ | ||
635 | rt2x00queue_clear_beacon(rt2x00dev, vif); | ||
638 | 636 | ||
639 | if (rt2x00dev->intf_beaconing == 0) { | 637 | if (rt2x00dev->intf_beaconing == 0) { |
640 | /* | 638 | /* |
@@ -645,11 +643,15 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw, | |||
645 | rt2x00queue_stop_queue(rt2x00dev->bcn); | 643 | rt2x00queue_stop_queue(rt2x00dev->bcn); |
646 | mutex_unlock(&intf->beacon_skb_mutex); | 644 | mutex_unlock(&intf->beacon_skb_mutex); |
647 | } | 645 | } |
648 | |||
649 | |||
650 | } else if (bss_conf->enable_beacon && !intf->enable_beacon) { | 646 | } else if (bss_conf->enable_beacon && !intf->enable_beacon) { |
651 | rt2x00dev->intf_beaconing++; | 647 | rt2x00dev->intf_beaconing++; |
652 | intf->enable_beacon = true; | 648 | intf->enable_beacon = true; |
649 | /* | ||
650 | * Upload beacon to the H/W. This is only required on | ||
651 | * USB devices. PCI devices fetch beacons periodically. | ||
652 | */ | ||
653 | if (rt2x00_is_usb(rt2x00dev)) | ||
654 | rt2x00queue_update_beacon(rt2x00dev, vif); | ||
653 | 655 | ||
654 | if (rt2x00dev->intf_beaconing == 1) { | 656 | if (rt2x00dev->intf_beaconing == 1) { |
655 | /* | 657 | /* |
diff --git a/drivers/net/wireless/rtlwifi/rtl8188ee/trx.c b/drivers/net/wireless/rtlwifi/rtl8188ee/trx.c index 06ef47cd6203..5b4c225396f2 100644 --- a/drivers/net/wireless/rtlwifi/rtl8188ee/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8188ee/trx.c | |||
@@ -293,7 +293,7 @@ static void _rtl88ee_translate_rx_signal_stuff(struct ieee80211_hw *hw, | |||
293 | u8 *psaddr; | 293 | u8 *psaddr; |
294 | __le16 fc; | 294 | __le16 fc; |
295 | u16 type, ufc; | 295 | u16 type, ufc; |
296 | bool match_bssid, packet_toself, packet_beacon, addr; | 296 | bool match_bssid, packet_toself, packet_beacon = false, addr; |
297 | 297 | ||
298 | tmp_buf = skb->data + pstatus->rx_drvinfo_size + pstatus->rx_bufshift; | 298 | tmp_buf = skb->data + pstatus->rx_drvinfo_size + pstatus->rx_bufshift; |
299 | 299 | ||
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c index 31b79e78c63c..a903c2671b4d 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c | |||
@@ -1001,7 +1001,7 @@ int rtl92cu_hw_init(struct ieee80211_hw *hw) | |||
1001 | err = _rtl92cu_init_mac(hw); | 1001 | err = _rtl92cu_init_mac(hw); |
1002 | if (err) { | 1002 | if (err) { |
1003 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "init mac failed!\n"); | 1003 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "init mac failed!\n"); |
1004 | return err; | 1004 | goto exit; |
1005 | } | 1005 | } |
1006 | err = rtl92c_download_fw(hw); | 1006 | err = rtl92c_download_fw(hw); |
1007 | if (err) { | 1007 | if (err) { |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c index 36b48be8329c..2b3c78baa9f8 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c | |||
@@ -49,6 +49,12 @@ static u8 _rtl92se_map_hwqueue_to_fwqueue(struct sk_buff *skb, u8 skb_queue) | |||
49 | if (ieee80211_is_nullfunc(fc)) | 49 | if (ieee80211_is_nullfunc(fc)) |
50 | return QSLT_HIGH; | 50 | return QSLT_HIGH; |
51 | 51 | ||
52 | /* Kernel commit 1bf4bbb4024dcdab changed EAPOL packets to use | ||
53 | * queue V0 at priority 7; however, the RTL8192SE appears to have | ||
54 | * that queue at priority 6 | ||
55 | */ | ||
56 | if (skb->priority == 7) | ||
57 | return QSLT_VO; | ||
52 | return skb->priority; | 58 | return skb->priority; |
53 | } | 59 | } |
54 | 60 | ||
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 7eae46ccec01..f2c318655519 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -3692,6 +3692,18 @@ void cfg80211_sched_scan_results(struct wiphy *wiphy); | |||
3692 | void cfg80211_sched_scan_stopped(struct wiphy *wiphy); | 3692 | void cfg80211_sched_scan_stopped(struct wiphy *wiphy); |
3693 | 3693 | ||
3694 | /** | 3694 | /** |
3695 | * cfg80211_sched_scan_stopped_rtnl - notify that the scheduled scan has stopped | ||
3696 | * | ||
3697 | * @wiphy: the wiphy on which the scheduled scan stopped | ||
3698 | * | ||
3699 | * The driver can call this function to inform cfg80211 that the | ||
3700 | * scheduled scan had to be stopped, for whatever reason. The driver | ||
3701 | * is then called back via the sched_scan_stop operation when done. | ||
3702 | * This function should be called with rtnl locked. | ||
3703 | */ | ||
3704 | void cfg80211_sched_scan_stopped_rtnl(struct wiphy *wiphy); | ||
3705 | |||
3706 | /** | ||
3695 | * cfg80211_inform_bss_width_frame - inform cfg80211 of a received BSS frame | 3707 | * cfg80211_inform_bss_width_frame - inform cfg80211 of a received BSS frame |
3696 | * | 3708 | * |
3697 | * @wiphy: the wiphy reporting the BSS | 3709 | * @wiphy: the wiphy reporting the BSS |
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 55a174317925..095943c02d6e 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c | |||
@@ -884,14 +884,17 @@ static int hci_conn_auth(struct hci_conn *conn, __u8 sec_level, __u8 auth_type) | |||
884 | if (!test_and_set_bit(HCI_CONN_AUTH_PEND, &conn->flags)) { | 884 | if (!test_and_set_bit(HCI_CONN_AUTH_PEND, &conn->flags)) { |
885 | struct hci_cp_auth_requested cp; | 885 | struct hci_cp_auth_requested cp; |
886 | 886 | ||
887 | /* encrypt must be pending if auth is also pending */ | ||
888 | set_bit(HCI_CONN_ENCRYPT_PEND, &conn->flags); | ||
889 | |||
890 | cp.handle = cpu_to_le16(conn->handle); | 887 | cp.handle = cpu_to_le16(conn->handle); |
891 | hci_send_cmd(conn->hdev, HCI_OP_AUTH_REQUESTED, | 888 | hci_send_cmd(conn->hdev, HCI_OP_AUTH_REQUESTED, |
892 | sizeof(cp), &cp); | 889 | sizeof(cp), &cp); |
890 | |||
891 | /* If we're already encrypted set the REAUTH_PEND flag, | ||
892 | * otherwise set the ENCRYPT_PEND. | ||
893 | */ | ||
893 | if (conn->key_type != 0xff) | 894 | if (conn->key_type != 0xff) |
894 | set_bit(HCI_CONN_REAUTH_PEND, &conn->flags); | 895 | set_bit(HCI_CONN_REAUTH_PEND, &conn->flags); |
896 | else | ||
897 | set_bit(HCI_CONN_ENCRYPT_PEND, &conn->flags); | ||
895 | } | 898 | } |
896 | 899 | ||
897 | return 0; | 900 | return 0; |
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 07c37d0cecb2..ca19fd4bbb8f 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -3388,6 +3388,12 @@ static void hci_key_refresh_complete_evt(struct hci_dev *hdev, | |||
3388 | if (!conn) | 3388 | if (!conn) |
3389 | goto unlock; | 3389 | goto unlock; |
3390 | 3390 | ||
3391 | /* For BR/EDR the necessary steps are taken through the | ||
3392 | * auth_complete event. | ||
3393 | */ | ||
3394 | if (conn->type != LE_LINK) | ||
3395 | goto unlock; | ||
3396 | |||
3391 | if (!ev->status) | 3397 | if (!ev->status) |
3392 | conn->sec_level = conn->pending_sec_level; | 3398 | conn->sec_level = conn->pending_sec_level; |
3393 | 3399 | ||
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 0e5b67015650..394e201cde6d 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -1232,7 +1232,8 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx) | |||
1232 | if (ether_addr_equal(bssid, rx->sdata->u.ibss.bssid) && | 1232 | if (ether_addr_equal(bssid, rx->sdata->u.ibss.bssid) && |
1233 | test_sta_flag(sta, WLAN_STA_AUTHORIZED)) { | 1233 | test_sta_flag(sta, WLAN_STA_AUTHORIZED)) { |
1234 | sta->last_rx = jiffies; | 1234 | sta->last_rx = jiffies; |
1235 | if (ieee80211_is_data(hdr->frame_control)) { | 1235 | if (ieee80211_is_data(hdr->frame_control) && |
1236 | !is_multicast_ether_addr(hdr->addr1)) { | ||
1236 | sta->last_rx_rate_idx = status->rate_idx; | 1237 | sta->last_rx_rate_idx = status->rate_idx; |
1237 | sta->last_rx_rate_flag = status->flag; | 1238 | sta->last_rx_rate_flag = status->flag; |
1238 | sta->last_rx_rate_vht_flag = status->vht_flag; | 1239 | sta->last_rx_rate_vht_flag = status->vht_flag; |
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index c34a5f97abc7..632d372bb511 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -1147,7 +1147,8 @@ void ieee80211_sta_ps_deliver_wakeup(struct sta_info *sta) | |||
1147 | atomic_dec(&ps->num_sta_ps); | 1147 | atomic_dec(&ps->num_sta_ps); |
1148 | 1148 | ||
1149 | /* This station just woke up and isn't aware of our SMPS state */ | 1149 | /* This station just woke up and isn't aware of our SMPS state */ |
1150 | if (!ieee80211_smps_is_restrictive(sta->known_smps_mode, | 1150 | if (!ieee80211_vif_is_mesh(&sdata->vif) && |
1151 | !ieee80211_smps_is_restrictive(sta->known_smps_mode, | ||
1151 | sdata->smps_mode) && | 1152 | sdata->smps_mode) && |
1152 | sta->known_smps_mode != sdata->bss->req_smps && | 1153 | sta->known_smps_mode != sdata->bss->req_smps && |
1153 | sta_info_tx_streams(sta) != 1) { | 1154 | sta_info_tx_streams(sta) != 1) { |
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index 00ba90b02ab2..60cb7a665976 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c | |||
@@ -314,10 +314,9 @@ ieee80211_add_tx_radiotap_header(struct ieee80211_local *local, | |||
314 | !is_multicast_ether_addr(hdr->addr1)) | 314 | !is_multicast_ether_addr(hdr->addr1)) |
315 | txflags |= IEEE80211_RADIOTAP_F_TX_FAIL; | 315 | txflags |= IEEE80211_RADIOTAP_F_TX_FAIL; |
316 | 316 | ||
317 | if ((info->status.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) || | 317 | if (info->status.rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT) |
318 | (info->status.rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT)) | ||
319 | txflags |= IEEE80211_RADIOTAP_F_TX_CTS; | 318 | txflags |= IEEE80211_RADIOTAP_F_TX_CTS; |
320 | else if (info->status.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) | 319 | if (info->status.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) |
321 | txflags |= IEEE80211_RADIOTAP_F_TX_RTS; | 320 | txflags |= IEEE80211_RADIOTAP_F_TX_RTS; |
322 | 321 | ||
323 | put_unaligned_le16(txflags, pos); | 322 | put_unaligned_le16(txflags, pos); |
diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h index a0b0aea76525..cec5b60487a4 100644 --- a/net/mac80211/trace.h +++ b/net/mac80211/trace.h | |||
@@ -21,10 +21,10 @@ | |||
21 | 21 | ||
22 | #define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \ | 22 | #define VIF_ENTRY __field(enum nl80211_iftype, vif_type) __field(void *, sdata) \ |
23 | __field(bool, p2p) \ | 23 | __field(bool, p2p) \ |
24 | __string(vif_name, sdata->dev ? sdata->dev->name : "<nodev>") | 24 | __string(vif_name, sdata->name) |
25 | #define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \ | 25 | #define VIF_ASSIGN __entry->vif_type = sdata->vif.type; __entry->sdata = sdata; \ |
26 | __entry->p2p = sdata->vif.p2p; \ | 26 | __entry->p2p = sdata->vif.p2p; \ |
27 | __assign_str(vif_name, sdata->dev ? sdata->dev->name : sdata->name) | 27 | __assign_str(vif_name, sdata->name) |
28 | #define VIF_PR_FMT " vif:%s(%d%s)" | 28 | #define VIF_PR_FMT " vif:%s(%d%s)" |
29 | #define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : "" | 29 | #define VIF_PR_ARG __get_str(vif_name), __entry->vif_type, __entry->p2p ? "/p2p" : "" |
30 | 30 | ||
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index ad058759e85e..c08bd4aca6bb 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -1777,7 +1777,7 @@ int ieee80211_reconfig(struct ieee80211_local *local) | |||
1777 | mutex_unlock(&local->mtx); | 1777 | mutex_unlock(&local->mtx); |
1778 | 1778 | ||
1779 | if (sched_scan_stopped) | 1779 | if (sched_scan_stopped) |
1780 | cfg80211_sched_scan_stopped(local->hw.wiphy); | 1780 | cfg80211_sched_scan_stopped_rtnl(local->hw.wiphy); |
1781 | 1781 | ||
1782 | /* | 1782 | /* |
1783 | * If this is for hw restart things are still running. | 1783 | * If this is for hw restart things are still running. |
diff --git a/net/mac80211/vht.c b/net/mac80211/vht.c index e9e36a256165..9265adfdabfc 100644 --- a/net/mac80211/vht.c +++ b/net/mac80211/vht.c | |||
@@ -129,9 +129,12 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(struct ieee80211_sub_if_data *sdata, | |||
129 | if (!vht_cap_ie || !sband->vht_cap.vht_supported) | 129 | if (!vht_cap_ie || !sband->vht_cap.vht_supported) |
130 | return; | 130 | return; |
131 | 131 | ||
132 | /* A VHT STA must support 40 MHz */ | 132 | /* |
133 | if (!(sta->sta.ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40)) | 133 | * A VHT STA must support 40 MHz, but if we verify that here |
134 | return; | 134 | * then we break a few things - some APs (e.g. Netgear R6300v2 |
135 | * and others based on the BCM4360 chipset) will unset this | ||
136 | * capability bit when operating in 20 MHz. | ||
137 | */ | ||
135 | 138 | ||
136 | vht_cap->vht_supported = true; | 139 | vht_cap->vht_supported = true; |
137 | 140 | ||
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 0f5da18cc619..e7329bb6a323 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c | |||
@@ -284,14 +284,22 @@ void cfg80211_sched_scan_results(struct wiphy *wiphy) | |||
284 | } | 284 | } |
285 | EXPORT_SYMBOL(cfg80211_sched_scan_results); | 285 | EXPORT_SYMBOL(cfg80211_sched_scan_results); |
286 | 286 | ||
287 | void cfg80211_sched_scan_stopped(struct wiphy *wiphy) | 287 | void cfg80211_sched_scan_stopped_rtnl(struct wiphy *wiphy) |
288 | { | 288 | { |
289 | struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); | 289 | struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); |
290 | 290 | ||
291 | ASSERT_RTNL(); | ||
292 | |||
291 | trace_cfg80211_sched_scan_stopped(wiphy); | 293 | trace_cfg80211_sched_scan_stopped(wiphy); |
292 | 294 | ||
293 | rtnl_lock(); | ||
294 | __cfg80211_stop_sched_scan(rdev, true); | 295 | __cfg80211_stop_sched_scan(rdev, true); |
296 | } | ||
297 | EXPORT_SYMBOL(cfg80211_sched_scan_stopped_rtnl); | ||
298 | |||
299 | void cfg80211_sched_scan_stopped(struct wiphy *wiphy) | ||
300 | { | ||
301 | rtnl_lock(); | ||
302 | cfg80211_sched_scan_stopped_rtnl(wiphy); | ||
295 | rtnl_unlock(); | 303 | rtnl_unlock(); |
296 | } | 304 | } |
297 | EXPORT_SYMBOL(cfg80211_sched_scan_stopped); | 305 | EXPORT_SYMBOL(cfg80211_sched_scan_stopped); |
diff --git a/net/wireless/sme.c b/net/wireless/sme.c index e2923a3f2e5c..0c0844b585d1 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c | |||
@@ -234,7 +234,6 @@ void cfg80211_conn_work(struct work_struct *work) | |||
234 | NULL, 0, NULL, 0, | 234 | NULL, 0, NULL, 0, |
235 | WLAN_STATUS_UNSPECIFIED_FAILURE, | 235 | WLAN_STATUS_UNSPECIFIED_FAILURE, |
236 | false, NULL); | 236 | false, NULL); |
237 | cfg80211_sme_free(wdev); | ||
238 | } | 237 | } |
239 | wdev_unlock(wdev); | 238 | wdev_unlock(wdev); |
240 | } | 239 | } |
@@ -647,6 +646,7 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid, | |||
647 | cfg80211_unhold_bss(bss_from_pub(bss)); | 646 | cfg80211_unhold_bss(bss_from_pub(bss)); |
648 | cfg80211_put_bss(wdev->wiphy, bss); | 647 | cfg80211_put_bss(wdev->wiphy, bss); |
649 | } | 648 | } |
649 | cfg80211_sme_free(wdev); | ||
650 | return; | 650 | return; |
651 | } | 651 | } |
652 | 652 | ||