hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/drivers/net/wireless/ath/ath6kl/cfg80211.c
....@@ -291,7 +291,7 @@
291291 }
292292
293293 if (!test_bit(WLAN_ENABLED, &vif->flags)) {
294
- ath6kl_err("wlan disabled\n");
294
+ ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "wlan disabled\n");
295295 return false;
296296 }
297297
....@@ -1322,7 +1322,7 @@
13221322 struct ath6kl_vif *vif = netdev_priv(ndev);
13231323 struct ath6kl_key *key = NULL;
13241324 u8 key_usage;
1325
- enum crypto_type key_type = NONE_CRYPT;
1325
+ enum ath6kl_crypto_type key_type = NONE_CRYPT;
13261326
13271327 ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: index %d\n", __func__, key_index);
13281328
....@@ -2194,13 +2194,13 @@
21942194 if (!in_dev)
21952195 return 0;
21962196
2197
- ifa = in_dev->ifa_list;
2197
+ ifa = rtnl_dereference(in_dev->ifa_list);
21982198 memset(&ips, 0, sizeof(ips));
21992199
22002200 /* Configure IP addr only if IP address count < MAX_IP_ADDRS */
22012201 while (index < MAX_IP_ADDRS && ifa) {
22022202 ips[index] = ifa->ifa_local;
2203
- ifa = ifa->ifa_next;
2203
+ ifa = rtnl_dereference(ifa->ifa_next);
22042204 index++;
22052205 }
22062206
....@@ -3249,22 +3249,19 @@
32493249 return 0;
32503250 }
32513251
3252
-static void ath6kl_mgmt_frame_register(struct wiphy *wiphy,
3253
- struct wireless_dev *wdev,
3254
- u16 frame_type, bool reg)
3252
+static void ath6kl_update_mgmt_frame_registrations(struct wiphy *wiphy,
3253
+ struct wireless_dev *wdev,
3254
+ struct mgmt_frame_regs *upd)
32553255 {
32563256 struct ath6kl_vif *vif = ath6kl_vif_from_wdev(wdev);
32573257
3258
- ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: frame_type=0x%x reg=%d\n",
3259
- __func__, frame_type, reg);
3260
- if (frame_type == IEEE80211_STYPE_PROBE_REQ) {
3261
- /*
3262
- * Note: This notification callback is not allowed to sleep, so
3263
- * we cannot send WMI_PROBE_REQ_REPORT_CMD here. Instead, we
3264
- * hardcode target to report Probe Request frames all the time.
3265
- */
3266
- vif->probe_req_report = reg;
3267
- }
3258
+ /*
3259
+ * FIXME: send WMI_PROBE_REQ_REPORT_CMD here instead of hardcoding
3260
+ * the reporting in the target all the time, this callback
3261
+ * *is* allowed to sleep after all.
3262
+ */
3263
+ vif->probe_req_report =
3264
+ upd->interface_stypes & BIT(IEEE80211_STYPE_PROBE_REQ >> 4);
32683265 }
32693266
32703267 static int ath6kl_cfg80211_sscan_start(struct wiphy *wiphy,
....@@ -3464,7 +3461,8 @@
34643461 .remain_on_channel = ath6kl_remain_on_channel,
34653462 .cancel_remain_on_channel = ath6kl_cancel_remain_on_channel,
34663463 .mgmt_tx = ath6kl_mgmt_tx,
3467
- .mgmt_frame_register = ath6kl_mgmt_frame_register,
3464
+ .update_mgmt_frame_registrations =
3465
+ ath6kl_update_mgmt_frame_registrations,
34683466 .get_antenna = ath6kl_get_antenna,
34693467 .sched_scan_start = ath6kl_cfg80211_sscan_start,
34703468 .sched_scan_stop = ath6kl_cfg80211_sscan_stop,
....@@ -3899,19 +3897,19 @@
38993897 switch (ar->hw.cap) {
39003898 case WMI_11AN_CAP:
39013899 ht = true;
3902
- /* fall through */
3900
+ fallthrough;
39033901 case WMI_11A_CAP:
39043902 band_5gig = true;
39053903 break;
39063904 case WMI_11GN_CAP:
39073905 ht = true;
3908
- /* fall through */
3906
+ fallthrough;
39093907 case WMI_11G_CAP:
39103908 band_2gig = true;
39113909 break;
39123910 case WMI_11AGN_CAP:
39133911 ht = true;
3914
- /* fall through */
3912
+ fallthrough;
39153913 case WMI_11AG_CAP:
39163914 band_2gig = true;
39173915 band_5gig = true;