hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/net/wireless/core.h
....@@ -3,7 +3,7 @@
33 * Wireless configuration interface internals.
44 *
55 * Copyright 2006-2010 Johannes Berg <johannes@sipsolutions.net>
6
- * Copyright (C) 2018-2019 Intel Corporation
6
+ * Copyright (C) 2018-2020 Intel Corporation
77 */
88 #ifndef __NET_WIRELESS_CORE_H
99 #define __NET_WIRELESS_CORE_H
....@@ -28,7 +28,7 @@
2828 /* rfkill support */
2929 struct rfkill_ops rfkill_ops;
3030 struct rfkill *rfkill;
31
- struct work_struct rfkill_sync;
31
+ struct work_struct rfkill_block;
3232
3333 /* ISO / IEC 3166 alpha2 for which this device is receiving
3434 * country IEs on, this can help disregard country IEs from APs
....@@ -60,13 +60,10 @@
6060 struct list_head beacon_registrations;
6161 spinlock_t beacon_registrations_lock;
6262
63
- struct list_head mlme_unreg;
64
- spinlock_t mlme_unreg_lock;
65
- struct work_struct mlme_unreg_wk;
66
-
6763 /* protected by RTNL only */
6864 int num_running_ifaces;
6965 int num_running_monitor_ifaces;
66
+ u64 cookie_counter;
7067
7168 /* BSSes/scanning */
7269 spinlock_t bss_lock;
....@@ -75,6 +72,7 @@
7572 u32 bss_generation;
7673 u32 bss_entries;
7774 struct cfg80211_scan_request *scan_req; /* protected by RTNL */
75
+ struct cfg80211_scan_request *int_scan_req;
7876 struct sk_buff *scan_msg;
7977 struct list_head sched_scan_req_list;
8078 time64_t suspend_at;
....@@ -101,6 +99,10 @@
10199
102100 struct cfg80211_chan_def cac_done_chandef;
103101 struct work_struct propagate_cac_done_wk;
102
+
103
+ struct work_struct mgmt_registrations_update_wk;
104
+ /* lock for all wdev lists */
105
+ spinlock_t mgmt_registrations_lock;
104106
105107 /* must be last because of the way we do wiphy_priv(),
106108 * and it should at least be aligned to NETDEV_ALIGN */
....@@ -132,6 +134,16 @@
132134 kfree(rdev->wiphy.wowlan_config->nd_config);
133135 kfree(rdev->wiphy.wowlan_config);
134136 #endif
137
+}
138
+
139
+static inline u64 cfg80211_assign_cookie(struct cfg80211_registered_device *rdev)
140
+{
141
+ u64 r = ++rdev->cookie_counter;
142
+
143
+ if (WARN_ON(r == 0))
144
+ r = ++rdev->cookie_counter;
145
+
146
+ return r;
135147 }
136148
137149 extern struct workqueue_struct *cfg80211_wq;
....@@ -198,6 +210,10 @@
198210
199211 int cfg80211_switch_netns(struct cfg80211_registered_device *rdev,
200212 struct net *net);
213
+
214
+void cfg80211_init_wdev(struct wireless_dev *wdev);
215
+void cfg80211_register_wdev(struct cfg80211_registered_device *rdev,
216
+ struct wireless_dev *wdev);
201217
202218 static inline void wdev_lock(struct wireless_dev *wdev)
203219 __acquires(wdev)
....@@ -276,7 +292,7 @@
276292 u32 rssi_hyst;
277293 s32 last_rssi_event_value;
278294 int n_rssi_thresholds;
279
- s32 rssi_thresholds[0];
295
+ s32 rssi_thresholds[];
280296 };
281297
282298 void cfg80211_destroy_ifaces(struct cfg80211_registered_device *rdev);
....@@ -292,6 +308,8 @@
292308 void cfg80211_bss_expire(struct cfg80211_registered_device *rdev);
293309 void cfg80211_bss_age(struct cfg80211_registered_device *rdev,
294310 unsigned long age_secs);
311
+void cfg80211_update_assoc_bss_entry(struct wireless_dev *wdev,
312
+ struct ieee80211_channel *channel);
295313
296314 /* IBSS */
297315 int __cfg80211_join_ibss(struct cfg80211_registered_device *rdev,
....@@ -369,8 +387,9 @@
369387 struct net_device *dev);
370388 int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_pid,
371389 u16 frame_type, const u8 *match_data,
372
- int match_len);
373
-void cfg80211_mlme_unreg_wk(struct work_struct *wk);
390
+ int match_len, bool multicast_rx,
391
+ struct netlink_ext_ack *extack);
392
+void cfg80211_mgmt_registrations_update_wk(struct work_struct *wk);
374393 void cfg80211_mlme_unregister_socket(struct wireless_dev *wdev, u32 nlpid);
375394 void cfg80211_mlme_purge_registrations(struct wireless_dev *wdev);
376395 int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev,
....@@ -444,6 +463,8 @@
444463 bool cfg80211_does_bw_fit_range(const struct ieee80211_freq_range *freq_range,
445464 u32 center_freq_khz, u32 bw_khz);
446465
466
+int cfg80211_scan(struct cfg80211_registered_device *rdev);
467
+
447468 extern struct work_struct cfg80211_disconnect_work;
448469
449470 /**
....@@ -453,8 +474,8 @@
453474 *
454475 * Checks if chandef is usable and we can/need start CAC on such channel.
455476 *
456
- * Return: Return true if all channels available and at least
457
- * one channel require CAC (NL80211_DFS_USABLE)
477
+ * Return: true if all channels available and at least
478
+ * one channel requires CAC (NL80211_DFS_USABLE)
458479 */
459480 bool cfg80211_chandef_dfs_usable(struct wiphy *wiphy,
460481 const struct cfg80211_chan_def *chandef);
....@@ -519,6 +540,10 @@
519540 void cfg80211_stop_nan(struct cfg80211_registered_device *rdev,
520541 struct wireless_dev *wdev);
521542
543
+struct cfg80211_internal_bss *
544
+cfg80211_bss_update(struct cfg80211_registered_device *rdev,
545
+ struct cfg80211_internal_bss *tmp,
546
+ bool signal_valid, unsigned long ts);
522547 #ifdef CONFIG_CFG80211_DEVELOPER_WARNINGS
523548 #define CFG80211_DEV_WARN_ON(cond) WARN_ON(cond)
524549 #else
....@@ -532,4 +557,8 @@
532557
533558 void cfg80211_cqm_config_free(struct wireless_dev *wdev);
534559
560
+void cfg80211_release_pmsr(struct wireless_dev *wdev, u32 portid);
561
+void cfg80211_pmsr_wdev_down(struct wireless_dev *wdev);
562
+void cfg80211_pmsr_free_wk(struct work_struct *work);
563
+
535564 #endif /* __NET_WIRELESS_CORE_H */