History

Merge tag 'wireless-2022-05-11' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless

Kalle Valo says: ==================== wireless fixes for v5.18 Second set of fixes for v5.18 and hopefully the last one. We have a new iwlwifi maintainer, a fix to rfkill ioctl interface and important fixes to both stack and two drivers. * tag 'wireless-2022-05-11' of git://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: rfkill: uapi: fix RFKILL_IOCTL_MAX_SIZE ioctl request definition nl80211: fix locking in nl80211_set_tx_bitrate_mask() mac80211_hwsim: call ieee80211_tx_prepare_skb under RCU protection mac80211_hwsim: fix RCU protected chanctx access mailmap: update Kalle Valo's email mac80211: Reset MBSSID parameters upon connection cfg80211: retrieve S1G operating channel number nl80211: validate S1G channel width mac80211: fix rx reordering with non explicit / psmp ack policy ath11k: reduce the wait time of 11d scan and hw scan while add interface MAINTAINERS: update iwlwifi driver maintainer iwlwifi: iwl-dbg: Use del_timer_sync() before freeing ====================

Jakub Kicinski committed 4 years ago

Commit 8bf60082 parents 3f95a74 a36e07d16 files · +120 −74Browse files

Unified · Split

16 files
  1. .mailmap +1 −0
  2. MAINTAINERS +1 −1
  3. drivers/net/wireless/ath/ath11k/core.c +1 −0
  4. drivers/net/wireless/ath/ath11k/core.h +10 −3
  5. drivers/net/wireless/ath/ath11k/mac.c +29 −42
  6. drivers/net/wireless/ath/ath11k/mac.h +1 −1
  7. drivers/net/wireless/ath/ath11k/reg.c +28 −15
  8. drivers/net/wireless/ath/ath11k/reg.h +1 −1
  9. drivers/net/wireless/ath/ath11k/wmi.c +14 −2
  10. drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c +1 −1
  11. drivers/net/wireless/mac80211_hwsim.c +8 −2
  12. include/uapi/linux/rfkill.h +1 −1
  13. net/mac80211/mlme.c +6 −0
  14. net/mac80211/rx.c +1 −2
  15. net/wireless/nl80211.c +16 −2
  16. net/wireless/scan.c +1 −1
.mailmap+1−0
@@ -204,6 +204,7 @@ Juha Yrjola <at solidboot.com> · 203 unmodified lines
204204 Juha Yrjola <juha.yrjola@nokia.com>
205205 Juha Yrjola <juha.yrjola@solidboot.com>
206206 Julien Thierry <julien.thierry.kdev@gmail.com> <julien.thierry@arm.com>
207+Kalle Valo <kvalo@kernel.org> <kvalo@codeaurora.org>
207208 Kalyan Thota <quic_kalyant@quicinc.com> <kalyan_t@codeaurora.org>
208209 Kay Sievers <kay.sievers@vrfy.org>
209210 Kees Cook <keescook@chromium.org> <kees.cook@canonical.com>
MAINTAINERS+1−1
@@ -10132,7 +10132,7 @@ S: Supported · 10131 unmodified lines
1013210132 F: drivers/net/wireless/intel/iwlegacy/
1013310133
1013410134 INTEL WIRELESS WIFI LINK (iwlwifi)
10135−M: Luca Coelho <luciano.coelho@intel.com>
10135+M: Gregory Greenman <gregory.greenman@intel.com>
1013610136 L: linux-wireless@vger.kernel.org
1013710137 S: Supported
1013810138 W: https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi
drivers/net/wireless/ath/ath11k/core.c+1−0
@@ -1288,6 +1288,7 @@ static void ath11k_core_restart(struct work_struct *work) · 1287 unmodified lines
12881288
12891289 ieee80211_stop_queues(ar->hw);
12901290 ath11k_mac_drain_tx(ar);
1291+ complete(&ar->completed_11d_scan);
12911292 complete(&ar->scan.started);
12921293 complete(&ar->scan.completed);
12931294 complete(&ar->peer_assoc_done);
drivers/net/wireless/ath/ath11k/core.h+10−3
@@ -38,6 +38,8 @@ · 37 unmodified lines
3838
3939 extern unsigned int ath11k_frame_mode;
4040
41+#define ATH11K_SCAN_TIMEOUT_HZ (20 * HZ)
42+
4143 #define ATH11K_MON_TIMER_INTERVAL 10
4244
4345 enum ath11k_supported_bw {
@@ -189,6 +191,12 @@ enum ath11k_scan_state { · 145 unmodified lines
189191 ATH11K_SCAN_ABORTING,
190192 };
191193
194+enum ath11k_11d_state {
195+ ATH11K_11D_IDLE,
196+ ATH11K_11D_PREPARING,
197+ ATH11K_11D_RUNNING,
198+};
199+
192200 enum ath11k_dev_flags {
193201 ATH11K_CAC_RUNNING,
194202 ATH11K_FLAG_CORE_REGISTERED,
@@ -607,9 +615,8 @@ struct ath11k { · 412 unmodified lines
607615 bool dfs_block_radar_events;
608616 struct ath11k_thermal thermal;
609617 u32 vdev_id_11d_scan;
610− struct completion finish_11d_scan;
611− struct completion finish_11d_ch_list;
612− bool pending_11d;
618+ struct completion completed_11d_scan;
619+ enum ath11k_11d_state state_11d;
613620 bool regdom_set_by_user;
614621 int hw_rate_code;
615622 u8 twt_enabled;
drivers/net/wireless/ath/ath11k/mac.c+29−42
@@ -3601,26 +3601,6 @@ static int ath11k_mac_op_hw_scan(struct ieee80211_hw *hw, · 3600 unmodified lines
36013601 if (ret)
36023602 goto exit;
36033603
3604− /* Currently the pending_11d=true only happened 1 time while
3605− * wlan interface up in ath11k_mac_11d_scan_start(), it is called by
3606− * ath11k_mac_op_add_interface(), after wlan interface up,
3607− * pending_11d=false always.
3608− * If remove below wait, it always happened scan fail and lead connect
3609− * fail while wlan interface up, because it has a 11d scan which is running
3610− * in firmware, and lead this scan failed.
3611− */
3612− if (ar->pending_11d) {
3613− long time_left;
3614− unsigned long timeout = 5 * HZ;
3615−
3616− if (ar->supports_6ghz)
3617− timeout += 5 * HZ;
3618−
3619− time_left = wait_for_completion_timeout(&ar->finish_11d_ch_list, timeout);
3620− ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
3621− "mac wait 11d channel list time left %ld\n", time_left);
3622− }
3623−
36243604 memset(&arg, 0, sizeof(arg));
36253605 ath11k_wmi_start_scan_init(ar, &arg);
36263606 arg.vdev_id = arvif->vdev_id;
@@ -3686,6 +3666,10 @@ exit: · 59 unmodified lines
36863666 kfree(arg.extraie.ptr);
36873667
36883668 mutex_unlock(&ar->conf_mutex);
3669+
3670+ if (ar->state_11d == ATH11K_11D_PREPARING)
3671+ ath11k_mac_11d_scan_start(ar, arvif->vdev_id);
3672+
36893673 return ret;
36903674 }
36913675
@@ -5814,7 +5798,7 @@ static int ath11k_mac_op_start(struct ieee80211_hw *hw) · 2122 unmodified lines
58145798
58155799 /* TODO: Do we need to enable ANI? */
58165800
5817− ath11k_reg_update_chan_list(ar);
5801+ ath11k_reg_update_chan_list(ar, false);
58185802
58195803 ar->num_started_vdevs = 0;
58205804 ar->num_created_vdevs = 0;
@@ -5881,6 +5865,11 @@ static void ath11k_mac_op_stop(struct ieee80211_hw *hw) · 60 unmodified lines
58815865 cancel_work_sync(&ar->ab->update_11d_work);
58825866 cancel_work_sync(&ar->ab->rfkill_work);
58835867
5868+ if (ar->state_11d == ATH11K_11D_PREPARING) {
5869+ ar->state_11d = ATH11K_11D_IDLE;
5870+ complete(&ar->completed_11d_scan);
5871+ }
5872+
58845873 spin_lock_bh(&ar->data_lock);
58855874 list_for_each_entry_safe(ppdu_stats, tmp, &ar->ppdu_stats_info, list) {
58865875 list_del(&ppdu_stats->list);
@@ -6051,7 +6040,7 @@ static bool ath11k_mac_vif_ap_active_any(struct ath11k_base *ab) · 164 unmodified lines
60516040 return false;
60526041 }
60536042
6054−void ath11k_mac_11d_scan_start(struct ath11k *ar, u32 vdev_id, bool wait)
6043+void ath11k_mac_11d_scan_start(struct ath11k *ar, u32 vdev_id)
60556044 {
60566045 struct wmi_11d_scan_start_params param;
60576046 int ret;
@@ -6079,28 +6068,22 @@ void ath11k_mac_11d_scan_start(struct ath11k *ar, u32 vdev_id, bool wait) · 21 unmodified lines
60796068
60806069 ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac start 11d scan\n");
60816070
6082− if (wait)
6083− reinit_completion(&ar->finish_11d_scan);
6084−
60856071 ret = ath11k_wmi_send_11d_scan_start_cmd(ar, &param);
60866072 if (ret) {
60876073 ath11k_warn(ar->ab, "failed to start 11d scan vdev %d ret: %d\n",
60886074 vdev_id, ret);
60896075 } else {
60906076 ar->vdev_id_11d_scan = vdev_id;
6091− if (wait) {
6092− ar->pending_11d = true;
6093− ret = wait_for_completion_timeout(&ar->finish_11d_scan,
6094− 5 * HZ);
6095− ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
6096− "mac 11d scan left time %d\n", ret);
6097−
6098− if (!ret)
6099− ar->pending_11d = false;
6100− }
6077+ if (ar->state_11d == ATH11K_11D_PREPARING)
6078+ ar->state_11d = ATH11K_11D_RUNNING;
61016079 }
61026080
61036081 fin:
6082+ if (ar->state_11d == ATH11K_11D_PREPARING) {
6083+ ar->state_11d = ATH11K_11D_IDLE;
6084+ complete(&ar->completed_11d_scan);
6085+ }
6086+
61046087 mutex_unlock(&ar->ab->vdev_id_11d_lock);
61056088 }
61066089
@@ -6123,12 +6106,15 @@ void ath11k_mac_11d_scan_stop(struct ath11k *ar) · 16 unmodified lines
61236106 vdev_id = ar->vdev_id_11d_scan;
61246107
61256108 ret = ath11k_wmi_send_11d_scan_stop_cmd(ar, vdev_id);
6126− if (ret)
6109+ if (ret) {
61276110 ath11k_warn(ar->ab,
61286111 "failed to stopt 11d scan vdev %d ret: %d\n",
61296112 vdev_id, ret);
6130− else
6113+ } else {
61316114 ar->vdev_id_11d_scan = ATH11K_11D_INVALID_VDEV_ID;
6115+ ar->state_11d = ATH11K_11D_IDLE;
6116+ complete(&ar->completed_11d_scan);
6117+ }
61326118 }
61336119 mutex_unlock(&ar->ab->vdev_id_11d_lock);
61346120 }
@@ -6324,8 +6310,10 @@ static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw, · 189 unmodified lines
63246310 goto err_peer_del;
63256311 }
63266312
6327− ath11k_mac_11d_scan_start(ar, arvif->vdev_id, true);
6328−
6313+ if (test_bit(WMI_TLV_SERVICE_11D_OFFLOAD, ab->wmi_ab.svc_map)) {
6314+ reinit_completion(&ar->completed_11d_scan);
6315+ ar->state_11d = ATH11K_11D_PREPARING;
6316+ }
63296317 break;
63306318 case WMI_VDEV_TYPE_MONITOR:
63316319 set_bit(ATH11K_FLAG_MONITOR_VDEV_CREATED, &ar->monitor_flags);
@@ -7190,7 +7178,7 @@ ath11k_mac_op_unassign_vif_chanctx(struct ieee80211_hw *hw, · 858 unmodified lines
71907178 }
71917179
71927180 if (arvif->vdev_type == WMI_VDEV_TYPE_STA)
7193− ath11k_mac_11d_scan_start(ar, arvif->vdev_id, false);
7181+ ath11k_mac_11d_scan_start(ar, arvif->vdev_id);
71947182
71957183 mutex_unlock(&ar->conf_mutex);
71967184 }
@@ -8671,8 +8659,7 @@ int ath11k_mac_allocate(struct ath11k_base *ab) · 1474 unmodified lines
86718659 ar->monitor_vdev_id = -1;
86728660 clear_bit(ATH11K_FLAG_MONITOR_VDEV_CREATED, &ar->monitor_flags);
86738661 ar->vdev_id_11d_scan = ATH11K_11D_INVALID_VDEV_ID;
8674− init_completion(&ar->finish_11d_scan);
8675− init_completion(&ar->finish_11d_ch_list);
8662+ init_completion(&ar->completed_11d_scan);
86768663 }
86778664
86788665 return 0;
drivers/net/wireless/ath/ath11k/mac.h+1−1
@@ -130,7 +130,7 @@ extern const struct htt_rx_ring_tlv_filter ath11k_mac_mon_status_filter_default; · 129 unmodified lines
130130 #define ATH11K_SCAN_11D_INTERVAL 600000
131131 #define ATH11K_11D_INVALID_VDEV_ID 0xFFFF
132132
133−void ath11k_mac_11d_scan_start(struct ath11k *ar, u32 vdev_id, bool wait);
133+void ath11k_mac_11d_scan_start(struct ath11k *ar, u32 vdev_id);
134134 void ath11k_mac_11d_scan_stop(struct ath11k *ar);
135135 void ath11k_mac_11d_scan_stop_all(struct ath11k_base *ab);
136136
drivers/net/wireless/ath/ath11k/reg.c+28−15
@@ -102,7 +102,7 @@ ath11k_reg_notifier(struct wiphy *wiphy, struct regulatory_request *request) · 101 unmodified lines
102102 ar->regdom_set_by_user = true;
103103 }
104104
105−int ath11k_reg_update_chan_list(struct ath11k *ar)
105+int ath11k_reg_update_chan_list(struct ath11k *ar, bool wait)
106106 {
107107 struct ieee80211_supported_band **bands;
108108 struct scan_chan_list_params *params;
@@ -111,7 +111,32 @@ int ath11k_reg_update_chan_list(struct ath11k *ar) · 2 unmodified lines
111111 struct channel_param *ch;
112112 enum nl80211_band band;
113113 int num_channels = 0;
114− int i, ret;
114+ int i, ret, left;
115+
116+ if (wait && ar->state_11d != ATH11K_11D_IDLE) {
117+ left = wait_for_completion_timeout(&ar->completed_11d_scan,
118+ ATH11K_SCAN_TIMEOUT_HZ);
119+ if (!left) {
120+ ath11k_dbg(ar->ab, ATH11K_DBG_REG,
121+ "failed to receive 11d scan complete: timed out\n");
122+ ar->state_11d = ATH11K_11D_IDLE;
123+ }
124+ ath11k_dbg(ar->ab, ATH11K_DBG_REG,
125+ "reg 11d scan wait left time %d\n", left);
126+ }
127+
128+ if (wait &&
129+ (ar->scan.state == ATH11K_SCAN_STARTING ||
130+ ar->scan.state == ATH11K_SCAN_RUNNING)) {
131+ left = wait_for_completion_timeout(&ar->scan.completed,
132+ ATH11K_SCAN_TIMEOUT_HZ);
133+ if (!left)
134+ ath11k_dbg(ar->ab, ATH11K_DBG_REG,
135+ "failed to receive hw scan complete: timed out\n");
136+
137+ ath11k_dbg(ar->ab, ATH11K_DBG_REG,
138+ "reg hw scan wait left time %d\n", left);
139+ }
115140
116141 bands = hw->wiphy->bands;
117142 for (band = 0; band < NUM_NL80211_BANDS; band++) {
@@ -193,11 +218,6 @@ int ath11k_reg_update_chan_list(struct ath11k *ar) · 75 unmodified lines
193218 ret = ath11k_wmi_send_scan_chan_list_cmd(ar, params);
194219 kfree(params);
195220
196− if (ar->pending_11d) {
197− complete(&ar->finish_11d_ch_list);
198− ar->pending_11d = false;
199− }
200−
201221 return ret;
202222 }
203223
@@ -263,15 +283,8 @@ int ath11k_regd_update(struct ath11k *ar) · 59 unmodified lines
263283 goto err;
264284 }
265285
266− if (ar->pending_11d)
267− complete(&ar->finish_11d_scan);
268−
269286 rtnl_lock();
270287 wiphy_lock(ar->hw->wiphy);
271−
272− if (ar->pending_11d)
273− reinit_completion(&ar->finish_11d_ch_list);
274−
275288 ret = regulatory_set_wiphy_regd_sync(ar->hw->wiphy, regd_copy);
276289 wiphy_unlock(ar->hw->wiphy);
277290 rtnl_unlock();
@@ -282,7 +295,7 @@ int ath11k_regd_update(struct ath11k *ar) · 4 unmodified lines
282295 goto err;
283296
284297 if (ar->state == ATH11K_STATE_ON) {
285− ret = ath11k_reg_update_chan_list(ar);
298+ ret = ath11k_reg_update_chan_list(ar, true);
286299 if (ret)
287300 goto err;
288301 }
drivers/net/wireless/ath/ath11k/reg.h+1−1
@@ -32,5 +32,5 @@ struct ieee80211_regdomain * · 31 unmodified lines
3232 ath11k_reg_build_regd(struct ath11k_base *ab,
3333 struct cur_regulatory_info *reg_info, bool intersect);
3434 int ath11k_regd_update(struct ath11k *ar);
35−int ath11k_reg_update_chan_list(struct ath11k *ar);
35+int ath11k_reg_update_chan_list(struct ath11k *ar, bool wait);
3636 #endif
drivers/net/wireless/ath/ath11k/wmi.c+14−2
@@ -2015,7 +2015,10 @@ void ath11k_wmi_start_scan_init(struct ath11k *ar, · 2014 unmodified lines
20152015 {
20162016 /* setup commonly used values */
20172017 arg->scan_req_id = 1;
2018− arg->scan_priority = WMI_SCAN_PRIORITY_LOW;
2018+ if (ar->state_11d == ATH11K_11D_PREPARING)
2019+ arg->scan_priority = WMI_SCAN_PRIORITY_MEDIUM;
2020+ else
2021+ arg->scan_priority = WMI_SCAN_PRIORITY_LOW;
20192022 arg->dwell_time_active = 50;
20202023 arg->dwell_time_active_2g = 0;
20212024 arg->dwell_time_passive = 150;
@@ -6350,8 +6353,10 @@ static void ath11k_wmi_op_ep_tx_credits(struct ath11k_base *ab) · 4328 unmodified lines
63506353 static int ath11k_reg_11d_new_cc_event(struct ath11k_base *ab, struct sk_buff *skb)
63516354 {
63526355 const struct wmi_11d_new_cc_ev *ev;
6356+ struct ath11k *ar;
6357+ struct ath11k_pdev *pdev;
63536358 const void **tb;
6354− int ret;
6359+ int ret, i;
63556360
63566361 tb = ath11k_wmi_tlv_parse_alloc(ab, skb->data, skb->len, GFP_ATOMIC);
63576362 if (IS_ERR(tb)) {
@@ -6377,6 +6382,13 @@ static int ath11k_reg_11d_new_cc_event(struct ath11k_base *ab, struct sk_buff *s · 19 unmodified lines
63776382
63786383 kfree(tb);
63796384
6385+ for (i = 0; i < ab->num_radios; i++) {
6386+ pdev = &ab->pdevs[i];
6387+ ar = pdev->ar;
6388+ ar->state_11d = ATH11K_11D_IDLE;
6389+ complete(&ar->completed_11d_scan);
6390+ }
6391+
63806392 queue_work(ab->workqueue, &ab->update_11d_work);
63816393
63826394 return 0;
drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c+1−1
@@ -371,7 +371,7 @@ void iwl_dbg_tlv_del_timers(struct iwl_trans *trans) · 370 unmodified lines
371371 struct iwl_dbg_tlv_timer_node *node, *tmp;
372372
373373 list_for_each_entry_safe(node, tmp, timer_list, list) {
374− del_timer(&node->timer);
374+ del_timer_sync(&node->timer);
375375 list_del(&node->list);
376376 kfree(node);
377377 }
drivers/net/wireless/mac80211_hwsim.c+8−2
@@ -2202,11 +2202,14 @@ mac80211_hwsim_sta_rc_update(struct ieee80211_hw *hw, · 2201 unmodified lines
22022202 if (!data->use_chanctx) {
22032203 confbw = data->bw;
22042204 } else {
2205− struct ieee80211_chanctx_conf *chanctx_conf =
2206− rcu_dereference(vif->chanctx_conf);
2205+ struct ieee80211_chanctx_conf *chanctx_conf;
2206+
2207+ rcu_read_lock();
2208+ chanctx_conf = rcu_dereference(vif->chanctx_conf);
22072209
22082210 if (!WARN_ON(!chanctx_conf))
22092211 confbw = chanctx_conf->def.width;
2212+ rcu_read_unlock();
22102213 }
22112214
22122215 WARN(bw > hwsim_get_chanwidth(confbw),
@@ -2475,11 +2478,13 @@ static void hw_scan_work(struct work_struct *work) · 262 unmodified lines
24752478 if (req->ie_len)
24762479 skb_put_data(probe, req->ie, req->ie_len);
24772480
2481+ rcu_read_lock();
24782482 if (!ieee80211_tx_prepare_skb(hwsim->hw,
24792483 hwsim->hw_scan_vif,
24802484 probe,
24812485 hwsim->tmp_chan->band,
24822486 NULL)) {
2487+ rcu_read_unlock();
24832488 kfree_skb(probe);
24842489 continue;
24852490 }
@@ -2487,6 +2492,7 @@ static void hw_scan_work(struct work_struct *work) · 1 unmodified line
24872492 local_bh_disable();
24882493 mac80211_hwsim_tx_frame(hwsim->hw, probe,
24892494 hwsim->tmp_chan);
2495+ rcu_read_unlock();
24902496 local_bh_enable();
24912497 }
24922498 }
include/uapi/linux/rfkill.h+1−1
@@ -184,7 +184,7 @@ struct rfkill_event_ext { · 183 unmodified lines
184184 #define RFKILL_IOC_NOINPUT 1
185185 #define RFKILL_IOCTL_NOINPUT _IO(RFKILL_IOC_MAGIC, RFKILL_IOC_NOINPUT)
186186 #define RFKILL_IOC_MAX_SIZE 2
187−#define RFKILL_IOCTL_MAX_SIZE _IOW(RFKILL_IOC_MAGIC, RFKILL_IOC_EXT_SIZE, __u32)
187+#define RFKILL_IOCTL_MAX_SIZE _IOW(RFKILL_IOC_MAGIC, RFKILL_IOC_MAX_SIZE, __u32)
188188
189189 /* and that's all userspace gets */
190190
net/mac80211/mlme.c+6−0
@@ -3657,6 +3657,12 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata, · 3656 unmodified lines
36573657 cbss->transmitted_bss->bssid);
36583658 bss_conf->bssid_indicator = cbss->max_bssid_indicator;
36593659 bss_conf->bssid_index = cbss->bssid_index;
3660+ } else {
3661+ bss_conf->nontransmitted = false;
3662+ memset(bss_conf->transmitter_bssid, 0,
3663+ sizeof(bss_conf->transmitter_bssid));
3664+ bss_conf->bssid_indicator = 0;
3665+ bss_conf->bssid_index = 0;
36603666 }
36613667
36623668 /*
net/mac80211/rx.c+1−2
@@ -1405,8 +1405,7 @@ static void ieee80211_rx_reorder_ampdu(struct ieee80211_rx_data *rx, · 1404 unmodified lines
14051405 goto dont_reorder;
14061406
14071407 /* not part of a BA session */
1408− if (ack_policy != IEEE80211_QOS_CTL_ACK_POLICY_BLOCKACK &&
1409− ack_policy != IEEE80211_QOS_CTL_ACK_POLICY_NORMAL)
1408+ if (ack_policy == IEEE80211_QOS_CTL_ACK_POLICY_NOACK)
14101409 goto dont_reorder;
14111410
14121411 /* new, potentially un-ordered, ampdu frame - process it */
net/wireless/nl80211.c+16−2
@@ -3173,6 +3173,15 @@ int nl80211_parse_chandef(struct cfg80211_registered_device *rdev, · 3172 unmodified lines
31733173 } else if (attrs[NL80211_ATTR_CHANNEL_WIDTH]) {
31743174 chandef->width =
31753175 nla_get_u32(attrs[NL80211_ATTR_CHANNEL_WIDTH]);
3176+ if (chandef->chan->band == NL80211_BAND_S1GHZ) {
3177+ /* User input error for channel width doesn't match channel */
3178+ if (chandef->width != ieee80211_s1g_channel_width(chandef->chan)) {
3179+ NL_SET_ERR_MSG_ATTR(extack,
3180+ attrs[NL80211_ATTR_CHANNEL_WIDTH],
3181+ "bad channel width");
3182+ return -EINVAL;
3183+ }
3184+ }
31763185 if (attrs[NL80211_ATTR_CENTER_FREQ1]) {
31773186 chandef->center_freq1 =
31783187 nla_get_u32(attrs[NL80211_ATTR_CENTER_FREQ1]);
@@ -11657,18 +11666,23 @@ static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb, · 8478 unmodified lines
1165711666 struct cfg80211_bitrate_mask mask;
1165811667 struct cfg80211_registered_device *rdev = info->user_ptr[0];
1165911668 struct net_device *dev = info->user_ptr[1];
11669+ struct wireless_dev *wdev = dev->ieee80211_ptr;
1166011670 int err;
1166111671
1166211672 if (!rdev->ops->set_bitrate_mask)
1166311673 return -EOPNOTSUPP;
1166411674
11675+ wdev_lock(wdev);
1166511676 err = nl80211_parse_tx_bitrate_mask(info, info->attrs,
1166611677 NL80211_ATTR_TX_RATES, &mask,
1166711678 dev, true);
1166811679 if (err)
11669− return err;
11680+ goto out;
1167011681
11671− return rdev_set_bitrate_mask(rdev, dev, NULL, &mask);
11682+ err = rdev_set_bitrate_mask(rdev, dev, NULL, &mask);
11683+out:
11684+ wdev_unlock(wdev);
11685+ return err;
1167211686 }
1167311687
1167411688 static int nl80211_register_mgmt(struct sk_buff *skb, struct genl_info *info)
net/wireless/scan.c+1−1
@@ -1829,7 +1829,7 @@ int cfg80211_get_ies_channel_number(const u8 *ie, size_t ielen, · 1828 unmodified lines
18291829 if (tmp && tmp->datalen >= sizeof(struct ieee80211_s1g_oper_ie)) {
18301830 struct ieee80211_s1g_oper_ie *s1gop = (void *)tmp->data;
18311831
1832− return s1gop->primary_ch;
1832+ return s1gop->oper_ch;
18331833 }
18341834 } else {
18351835 tmp = cfg80211_find_elem(WLAN_EID_DS_PARAMS, ie, ielen);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t