diff options
author | John W. Linville <linville@tuxdriver.com> | 2013-12-20 15:40:06 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-12-20 15:40:06 -0500 |
commit | 76ae07df2520d2f26c565747ad40c9e993b16cf7 (patch) | |
tree | b44c7c5dd5fa8f953078661dfaa4c7c881e64636 | |
parent | 965cdea825693c821d200e38fac9402cde6dce6a (diff) | |
parent | b7e047358449f8eb5cba8197b42280b676b82e54 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
-rw-r--r-- | drivers/bluetooth/ath3k.c | 2 | ||||
-rw-r--r-- | drivers/bluetooth/btusb.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9002_mac.c | 52 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_main.c | 25 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/pci.c | 4 | ||||
-rw-r--r-- | net/bluetooth/hci_sock.c | 26 | ||||
-rw-r--r-- | net/wireless/radiotap.c | 4 | ||||
-rw-r--r-- | net/wireless/sme.c | 22 |
9 files changed, 101 insertions, 40 deletions
diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c index 6bfc1bb318f6..dceb85f8d9a8 100644 --- a/drivers/bluetooth/ath3k.c +++ b/drivers/bluetooth/ath3k.c | |||
@@ -87,6 +87,7 @@ static const struct usb_device_id ath3k_table[] = { | |||
87 | { USB_DEVICE(0x0CF3, 0xE004) }, | 87 | { USB_DEVICE(0x0CF3, 0xE004) }, |
88 | { USB_DEVICE(0x0CF3, 0xE005) }, | 88 | { USB_DEVICE(0x0CF3, 0xE005) }, |
89 | { USB_DEVICE(0x0930, 0x0219) }, | 89 | { USB_DEVICE(0x0930, 0x0219) }, |
90 | { USB_DEVICE(0x0930, 0x0220) }, | ||
90 | { USB_DEVICE(0x0489, 0xe057) }, | 91 | { USB_DEVICE(0x0489, 0xe057) }, |
91 | { USB_DEVICE(0x13d3, 0x3393) }, | 92 | { USB_DEVICE(0x13d3, 0x3393) }, |
92 | { USB_DEVICE(0x0489, 0xe04e) }, | 93 | { USB_DEVICE(0x0489, 0xe04e) }, |
@@ -129,6 +130,7 @@ static const struct usb_device_id ath3k_blist_tbl[] = { | |||
129 | { USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 }, | 130 | { USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 }, |
130 | { USB_DEVICE(0x0cf3, 0xe005), .driver_info = BTUSB_ATH3012 }, | 131 | { USB_DEVICE(0x0cf3, 0xe005), .driver_info = BTUSB_ATH3012 }, |
131 | { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, | 132 | { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, |
133 | { USB_DEVICE(0x0930, 0x0220), .driver_info = BTUSB_ATH3012 }, | ||
132 | { USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 }, | 134 | { USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 }, |
133 | { USB_DEVICE(0x13d3, 0x3393), .driver_info = BTUSB_ATH3012 }, | 135 | { USB_DEVICE(0x13d3, 0x3393), .driver_info = BTUSB_ATH3012 }, |
134 | { USB_DEVICE(0x0489, 0xe04e), .driver_info = BTUSB_ATH3012 }, | 136 | { USB_DEVICE(0x0489, 0xe04e), .driver_info = BTUSB_ATH3012 }, |
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index c0ff34f2d2df..3980fd18f6ea 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c | |||
@@ -154,6 +154,7 @@ static const struct usb_device_id blacklist_table[] = { | |||
154 | { USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 }, | 154 | { USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 }, |
155 | { USB_DEVICE(0x0cf3, 0xe005), .driver_info = BTUSB_ATH3012 }, | 155 | { USB_DEVICE(0x0cf3, 0xe005), .driver_info = BTUSB_ATH3012 }, |
156 | { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, | 156 | { USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 }, |
157 | { USB_DEVICE(0x0930, 0x0220), .driver_info = BTUSB_ATH3012 }, | ||
157 | { USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 }, | 158 | { USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 }, |
158 | { USB_DEVICE(0x13d3, 0x3393), .driver_info = BTUSB_ATH3012 }, | 159 | { USB_DEVICE(0x13d3, 0x3393), .driver_info = BTUSB_ATH3012 }, |
159 | { USB_DEVICE(0x0489, 0xe04e), .driver_info = BTUSB_ATH3012 }, | 160 | { USB_DEVICE(0x0489, 0xe04e), .driver_info = BTUSB_ATH3012 }, |
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_mac.c b/drivers/net/wireless/ath/ath9k/ar9002_mac.c index 8d78253c26ce..a366d6b4626f 100644 --- a/drivers/net/wireless/ath/ath9k/ar9002_mac.c +++ b/drivers/net/wireless/ath/ath9k/ar9002_mac.c | |||
@@ -76,9 +76,16 @@ static bool ar9002_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked) | |||
76 | mask2 |= ATH9K_INT_CST; | 76 | mask2 |= ATH9K_INT_CST; |
77 | if (isr2 & AR_ISR_S2_TSFOOR) | 77 | if (isr2 & AR_ISR_S2_TSFOOR) |
78 | mask2 |= ATH9K_INT_TSFOOR; | 78 | mask2 |= ATH9K_INT_TSFOOR; |
79 | |||
80 | if (!(pCap->hw_caps & ATH9K_HW_CAP_RAC_SUPPORTED)) { | ||
81 | REG_WRITE(ah, AR_ISR_S2, isr2); | ||
82 | isr &= ~AR_ISR_BCNMISC; | ||
83 | } | ||
79 | } | 84 | } |
80 | 85 | ||
81 | isr = REG_READ(ah, AR_ISR_RAC); | 86 | if (pCap->hw_caps & ATH9K_HW_CAP_RAC_SUPPORTED) |
87 | isr = REG_READ(ah, AR_ISR_RAC); | ||
88 | |||
82 | if (isr == 0xffffffff) { | 89 | if (isr == 0xffffffff) { |
83 | *masked = 0; | 90 | *masked = 0; |
84 | return false; | 91 | return false; |
@@ -97,11 +104,23 @@ static bool ar9002_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked) | |||
97 | 104 | ||
98 | *masked |= ATH9K_INT_TX; | 105 | *masked |= ATH9K_INT_TX; |
99 | 106 | ||
100 | s0_s = REG_READ(ah, AR_ISR_S0_S); | 107 | if (pCap->hw_caps & ATH9K_HW_CAP_RAC_SUPPORTED) { |
108 | s0_s = REG_READ(ah, AR_ISR_S0_S); | ||
109 | s1_s = REG_READ(ah, AR_ISR_S1_S); | ||
110 | } else { | ||
111 | s0_s = REG_READ(ah, AR_ISR_S0); | ||
112 | REG_WRITE(ah, AR_ISR_S0, s0_s); | ||
113 | s1_s = REG_READ(ah, AR_ISR_S1); | ||
114 | REG_WRITE(ah, AR_ISR_S1, s1_s); | ||
115 | |||
116 | isr &= ~(AR_ISR_TXOK | | ||
117 | AR_ISR_TXDESC | | ||
118 | AR_ISR_TXERR | | ||
119 | AR_ISR_TXEOL); | ||
120 | } | ||
121 | |||
101 | ah->intr_txqs |= MS(s0_s, AR_ISR_S0_QCU_TXOK); | 122 | ah->intr_txqs |= MS(s0_s, AR_ISR_S0_QCU_TXOK); |
102 | ah->intr_txqs |= MS(s0_s, AR_ISR_S0_QCU_TXDESC); | 123 | ah->intr_txqs |= MS(s0_s, AR_ISR_S0_QCU_TXDESC); |
103 | |||
104 | s1_s = REG_READ(ah, AR_ISR_S1_S); | ||
105 | ah->intr_txqs |= MS(s1_s, AR_ISR_S1_QCU_TXERR); | 124 | ah->intr_txqs |= MS(s1_s, AR_ISR_S1_QCU_TXERR); |
106 | ah->intr_txqs |= MS(s1_s, AR_ISR_S1_QCU_TXEOL); | 125 | ah->intr_txqs |= MS(s1_s, AR_ISR_S1_QCU_TXEOL); |
107 | } | 126 | } |
@@ -114,13 +133,15 @@ static bool ar9002_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked) | |||
114 | *masked |= mask2; | 133 | *masked |= mask2; |
115 | } | 134 | } |
116 | 135 | ||
117 | if (AR_SREV_9100(ah)) | 136 | if (!AR_SREV_9100(ah) && (isr & AR_ISR_GENTMR)) { |
118 | return true; | ||
119 | |||
120 | if (isr & AR_ISR_GENTMR) { | ||
121 | u32 s5_s; | 137 | u32 s5_s; |
122 | 138 | ||
123 | s5_s = REG_READ(ah, AR_ISR_S5_S); | 139 | if (pCap->hw_caps & ATH9K_HW_CAP_RAC_SUPPORTED) { |
140 | s5_s = REG_READ(ah, AR_ISR_S5_S); | ||
141 | } else { | ||
142 | s5_s = REG_READ(ah, AR_ISR_S5); | ||
143 | } | ||
144 | |||
124 | ah->intr_gen_timer_trigger = | 145 | ah->intr_gen_timer_trigger = |
125 | MS(s5_s, AR_ISR_S5_GENTIMER_TRIG); | 146 | MS(s5_s, AR_ISR_S5_GENTIMER_TRIG); |
126 | 147 | ||
@@ -133,8 +154,21 @@ static bool ar9002_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked) | |||
133 | if ((s5_s & AR_ISR_S5_TIM_TIMER) && | 154 | if ((s5_s & AR_ISR_S5_TIM_TIMER) && |
134 | !(pCap->hw_caps & ATH9K_HW_CAP_AUTOSLEEP)) | 155 | !(pCap->hw_caps & ATH9K_HW_CAP_AUTOSLEEP)) |
135 | *masked |= ATH9K_INT_TIM_TIMER; | 156 | *masked |= ATH9K_INT_TIM_TIMER; |
157 | |||
158 | if (!(pCap->hw_caps & ATH9K_HW_CAP_RAC_SUPPORTED)) { | ||
159 | REG_WRITE(ah, AR_ISR_S5, s5_s); | ||
160 | isr &= ~AR_ISR_GENTMR; | ||
161 | } | ||
136 | } | 162 | } |
137 | 163 | ||
164 | if (!(pCap->hw_caps & ATH9K_HW_CAP_RAC_SUPPORTED)) { | ||
165 | REG_WRITE(ah, AR_ISR, isr); | ||
166 | REG_READ(ah, AR_ISR); | ||
167 | } | ||
168 | |||
169 | if (AR_SREV_9100(ah)) | ||
170 | return true; | ||
171 | |||
138 | if (sync_cause) { | 172 | if (sync_cause) { |
139 | ath9k_debug_sync_cause(common, sync_cause); | 173 | ath9k_debug_sync_cause(common, sync_cause); |
140 | fatal_int = | 174 | fatal_int = |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index 9a2657fdd9cc..608d739d1378 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c | |||
@@ -127,21 +127,26 @@ static void ath9k_htc_bssid_iter(void *data, u8 *mac, struct ieee80211_vif *vif) | |||
127 | struct ath9k_vif_iter_data *iter_data = data; | 127 | struct ath9k_vif_iter_data *iter_data = data; |
128 | int i; | 128 | int i; |
129 | 129 | ||
130 | for (i = 0; i < ETH_ALEN; i++) | 130 | if (iter_data->hw_macaddr != NULL) { |
131 | iter_data->mask[i] &= ~(iter_data->hw_macaddr[i] ^ mac[i]); | 131 | for (i = 0; i < ETH_ALEN; i++) |
132 | iter_data->mask[i] &= ~(iter_data->hw_macaddr[i] ^ mac[i]); | ||
133 | } else { | ||
134 | iter_data->hw_macaddr = mac; | ||
135 | } | ||
132 | } | 136 | } |
133 | 137 | ||
134 | static void ath9k_htc_set_bssid_mask(struct ath9k_htc_priv *priv, | 138 | static void ath9k_htc_set_mac_bssid_mask(struct ath9k_htc_priv *priv, |
135 | struct ieee80211_vif *vif) | 139 | struct ieee80211_vif *vif) |
136 | { | 140 | { |
137 | struct ath_common *common = ath9k_hw_common(priv->ah); | 141 | struct ath_common *common = ath9k_hw_common(priv->ah); |
138 | struct ath9k_vif_iter_data iter_data; | 142 | struct ath9k_vif_iter_data iter_data; |
139 | 143 | ||
140 | /* | 144 | /* |
141 | * Use the hardware MAC address as reference, the hardware uses it | 145 | * Pick the MAC address of the first interface as the new hardware |
142 | * together with the BSSID mask when matching addresses. | 146 | * MAC address. The hardware will use it together with the BSSID mask |
147 | * when matching addresses. | ||
143 | */ | 148 | */ |
144 | iter_data.hw_macaddr = common->macaddr; | 149 | iter_data.hw_macaddr = NULL; |
145 | memset(&iter_data.mask, 0xff, ETH_ALEN); | 150 | memset(&iter_data.mask, 0xff, ETH_ALEN); |
146 | 151 | ||
147 | if (vif) | 152 | if (vif) |
@@ -153,6 +158,10 @@ static void ath9k_htc_set_bssid_mask(struct ath9k_htc_priv *priv, | |||
153 | ath9k_htc_bssid_iter, &iter_data); | 158 | ath9k_htc_bssid_iter, &iter_data); |
154 | 159 | ||
155 | memcpy(common->bssidmask, iter_data.mask, ETH_ALEN); | 160 | memcpy(common->bssidmask, iter_data.mask, ETH_ALEN); |
161 | |||
162 | if (iter_data.hw_macaddr) | ||
163 | memcpy(common->macaddr, iter_data.hw_macaddr, ETH_ALEN); | ||
164 | |||
156 | ath_hw_setbssidmask(common); | 165 | ath_hw_setbssidmask(common); |
157 | } | 166 | } |
158 | 167 | ||
@@ -1063,7 +1072,7 @@ static int ath9k_htc_add_interface(struct ieee80211_hw *hw, | |||
1063 | goto out; | 1072 | goto out; |
1064 | } | 1073 | } |
1065 | 1074 | ||
1066 | ath9k_htc_set_bssid_mask(priv, vif); | 1075 | ath9k_htc_set_mac_bssid_mask(priv, vif); |
1067 | 1076 | ||
1068 | priv->vif_slot |= (1 << avp->index); | 1077 | priv->vif_slot |= (1 << avp->index); |
1069 | priv->nvifs++; | 1078 | priv->nvifs++; |
@@ -1128,7 +1137,7 @@ static void ath9k_htc_remove_interface(struct ieee80211_hw *hw, | |||
1128 | 1137 | ||
1129 | ath9k_htc_set_opmode(priv); | 1138 | ath9k_htc_set_opmode(priv); |
1130 | 1139 | ||
1131 | ath9k_htc_set_bssid_mask(priv, vif); | 1140 | ath9k_htc_set_mac_bssid_mask(priv, vif); |
1132 | 1141 | ||
1133 | /* | 1142 | /* |
1134 | * Stop ANI only if there are no associated station interfaces. | 1143 | * Stop ANI only if there are no associated station interfaces. |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 74f452c7b166..21aa09e0e825 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -965,8 +965,9 @@ void ath9k_calculate_iter_data(struct ieee80211_hw *hw, | |||
965 | struct ath_common *common = ath9k_hw_common(ah); | 965 | struct ath_common *common = ath9k_hw_common(ah); |
966 | 966 | ||
967 | /* | 967 | /* |
968 | * Use the hardware MAC address as reference, the hardware uses it | 968 | * Pick the MAC address of the first interface as the new hardware |
969 | * together with the BSSID mask when matching addresses. | 969 | * MAC address. The hardware will use it together with the BSSID mask |
970 | * when matching addresses. | ||
970 | */ | 971 | */ |
971 | memset(iter_data, 0, sizeof(*iter_data)); | 972 | memset(iter_data, 0, sizeof(*iter_data)); |
972 | memset(&iter_data->mask, 0xff, ETH_ALEN); | 973 | memset(&iter_data->mask, 0xff, ETH_ALEN); |
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index 0f494444bcd1..5a53195d016b 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c | |||
@@ -740,6 +740,8 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) | |||
740 | }; | 740 | }; |
741 | int index = rtlpci->rx_ring[rx_queue_idx].idx; | 741 | int index = rtlpci->rx_ring[rx_queue_idx].idx; |
742 | 742 | ||
743 | if (rtlpci->driver_is_goingto_unload) | ||
744 | return; | ||
743 | /*RX NORMAL PKT */ | 745 | /*RX NORMAL PKT */ |
744 | while (count--) { | 746 | while (count--) { |
745 | /*rx descriptor */ | 747 | /*rx descriptor */ |
@@ -1636,6 +1638,7 @@ static void rtl_pci_stop(struct ieee80211_hw *hw) | |||
1636 | */ | 1638 | */ |
1637 | set_hal_stop(rtlhal); | 1639 | set_hal_stop(rtlhal); |
1638 | 1640 | ||
1641 | rtlpci->driver_is_goingto_unload = true; | ||
1639 | rtlpriv->cfg->ops->disable_interrupt(hw); | 1642 | rtlpriv->cfg->ops->disable_interrupt(hw); |
1640 | cancel_work_sync(&rtlpriv->works.lps_change_work); | 1643 | cancel_work_sync(&rtlpriv->works.lps_change_work); |
1641 | 1644 | ||
@@ -1653,7 +1656,6 @@ static void rtl_pci_stop(struct ieee80211_hw *hw) | |||
1653 | ppsc->rfchange_inprogress = true; | 1656 | ppsc->rfchange_inprogress = true; |
1654 | spin_unlock_irqrestore(&rtlpriv->locks.rf_ps_lock, flags); | 1657 | spin_unlock_irqrestore(&rtlpriv->locks.rf_ps_lock, flags); |
1655 | 1658 | ||
1656 | rtlpci->driver_is_goingto_unload = true; | ||
1657 | rtlpriv->cfg->ops->hw_disable(hw); | 1659 | rtlpriv->cfg->ops->hw_disable(hw); |
1658 | /* some things are not needed if firmware not available */ | 1660 | /* some things are not needed if firmware not available */ |
1659 | if (!rtlpriv->max_fw_size) | 1661 | if (!rtlpriv->max_fw_size) |
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index 6a6c8bb4fd72..7552f9e3089c 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c | |||
@@ -940,8 +940,22 @@ static int hci_sock_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
940 | bt_cb(skb)->pkt_type = *((unsigned char *) skb->data); | 940 | bt_cb(skb)->pkt_type = *((unsigned char *) skb->data); |
941 | skb_pull(skb, 1); | 941 | skb_pull(skb, 1); |
942 | 942 | ||
943 | if (hci_pi(sk)->channel == HCI_CHANNEL_RAW && | 943 | if (hci_pi(sk)->channel == HCI_CHANNEL_USER) { |
944 | bt_cb(skb)->pkt_type == HCI_COMMAND_PKT) { | 944 | /* No permission check is needed for user channel |
945 | * since that gets enforced when binding the socket. | ||
946 | * | ||
947 | * However check that the packet type is valid. | ||
948 | */ | ||
949 | if (bt_cb(skb)->pkt_type != HCI_COMMAND_PKT && | ||
950 | bt_cb(skb)->pkt_type != HCI_ACLDATA_PKT && | ||
951 | bt_cb(skb)->pkt_type != HCI_SCODATA_PKT) { | ||
952 | err = -EINVAL; | ||
953 | goto drop; | ||
954 | } | ||
955 | |||
956 | skb_queue_tail(&hdev->raw_q, skb); | ||
957 | queue_work(hdev->workqueue, &hdev->tx_work); | ||
958 | } else if (bt_cb(skb)->pkt_type == HCI_COMMAND_PKT) { | ||
945 | u16 opcode = get_unaligned_le16(skb->data); | 959 | u16 opcode = get_unaligned_le16(skb->data); |
946 | u16 ogf = hci_opcode_ogf(opcode); | 960 | u16 ogf = hci_opcode_ogf(opcode); |
947 | u16 ocf = hci_opcode_ocf(opcode); | 961 | u16 ocf = hci_opcode_ocf(opcode); |
@@ -972,14 +986,6 @@ static int hci_sock_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
972 | goto drop; | 986 | goto drop; |
973 | } | 987 | } |
974 | 988 | ||
975 | if (hci_pi(sk)->channel == HCI_CHANNEL_USER && | ||
976 | bt_cb(skb)->pkt_type != HCI_COMMAND_PKT && | ||
977 | bt_cb(skb)->pkt_type != HCI_ACLDATA_PKT && | ||
978 | bt_cb(skb)->pkt_type != HCI_SCODATA_PKT) { | ||
979 | err = -EINVAL; | ||
980 | goto drop; | ||
981 | } | ||
982 | |||
983 | skb_queue_tail(&hdev->raw_q, skb); | 989 | skb_queue_tail(&hdev->raw_q, skb); |
984 | queue_work(hdev->workqueue, &hdev->tx_work); | 990 | queue_work(hdev->workqueue, &hdev->tx_work); |
985 | } | 991 | } |
diff --git a/net/wireless/radiotap.c b/net/wireless/radiotap.c index a271c27fac77..722da616438c 100644 --- a/net/wireless/radiotap.c +++ b/net/wireless/radiotap.c | |||
@@ -124,6 +124,10 @@ int ieee80211_radiotap_iterator_init( | |||
124 | /* find payload start allowing for extended bitmap(s) */ | 124 | /* find payload start allowing for extended bitmap(s) */ |
125 | 125 | ||
126 | if (iterator->_bitmap_shifter & (1<<IEEE80211_RADIOTAP_EXT)) { | 126 | if (iterator->_bitmap_shifter & (1<<IEEE80211_RADIOTAP_EXT)) { |
127 | if ((unsigned long)iterator->_arg - | ||
128 | (unsigned long)iterator->_rtheader + sizeof(uint32_t) > | ||
129 | (unsigned long)iterator->_max_length) | ||
130 | return -EINVAL; | ||
127 | while (get_unaligned_le32(iterator->_arg) & | 131 | while (get_unaligned_le32(iterator->_arg) & |
128 | (1 << IEEE80211_RADIOTAP_EXT)) { | 132 | (1 << IEEE80211_RADIOTAP_EXT)) { |
129 | iterator->_arg += sizeof(uint32_t); | 133 | iterator->_arg += sizeof(uint32_t); |
diff --git a/net/wireless/sme.c b/net/wireless/sme.c index 65f800890d70..d3c5bd7c6b51 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c | |||
@@ -632,6 +632,16 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid, | |||
632 | } | 632 | } |
633 | #endif | 633 | #endif |
634 | 634 | ||
635 | if (!bss && (status == WLAN_STATUS_SUCCESS)) { | ||
636 | WARN_ON_ONCE(!wiphy_to_dev(wdev->wiphy)->ops->connect); | ||
637 | bss = cfg80211_get_bss(wdev->wiphy, NULL, bssid, | ||
638 | wdev->ssid, wdev->ssid_len, | ||
639 | WLAN_CAPABILITY_ESS, | ||
640 | WLAN_CAPABILITY_ESS); | ||
641 | if (bss) | ||
642 | cfg80211_hold_bss(bss_from_pub(bss)); | ||
643 | } | ||
644 | |||
635 | if (wdev->current_bss) { | 645 | if (wdev->current_bss) { |
636 | cfg80211_unhold_bss(wdev->current_bss); | 646 | cfg80211_unhold_bss(wdev->current_bss); |
637 | cfg80211_put_bss(wdev->wiphy, &wdev->current_bss->pub); | 647 | cfg80211_put_bss(wdev->wiphy, &wdev->current_bss->pub); |
@@ -649,16 +659,8 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid, | |||
649 | return; | 659 | return; |
650 | } | 660 | } |
651 | 661 | ||
652 | if (!bss) { | 662 | if (WARN_ON(!bss)) |
653 | WARN_ON_ONCE(!wiphy_to_dev(wdev->wiphy)->ops->connect); | 663 | return; |
654 | bss = cfg80211_get_bss(wdev->wiphy, NULL, bssid, | ||
655 | wdev->ssid, wdev->ssid_len, | ||
656 | WLAN_CAPABILITY_ESS, | ||
657 | WLAN_CAPABILITY_ESS); | ||
658 | if (WARN_ON(!bss)) | ||
659 | return; | ||
660 | cfg80211_hold_bss(bss_from_pub(bss)); | ||
661 | } | ||
662 | 664 | ||
663 | wdev->current_bss = bss_from_pub(bss); | 665 | wdev->current_bss = bss_from_pub(bss); |
664 | 666 | ||