| .. | .. |
|---|
| 3 | 3 | * Wireless configuration interface internals. |
|---|
| 4 | 4 | * |
|---|
| 5 | 5 | * Copyright 2006-2010 Johannes Berg <johannes@sipsolutions.net> |
|---|
| 6 | | - * Copyright (C) 2018-2019 Intel Corporation |
|---|
| 6 | + * Copyright (C) 2018-2020 Intel Corporation |
|---|
| 7 | 7 | */ |
|---|
| 8 | 8 | #ifndef __NET_WIRELESS_CORE_H |
|---|
| 9 | 9 | #define __NET_WIRELESS_CORE_H |
|---|
| .. | .. |
|---|
| 28 | 28 | /* rfkill support */ |
|---|
| 29 | 29 | struct rfkill_ops rfkill_ops; |
|---|
| 30 | 30 | struct rfkill *rfkill; |
|---|
| 31 | | - struct work_struct rfkill_sync; |
|---|
| 31 | + struct work_struct rfkill_block; |
|---|
| 32 | 32 | |
|---|
| 33 | 33 | /* ISO / IEC 3166 alpha2 for which this device is receiving |
|---|
| 34 | 34 | * country IEs on, this can help disregard country IEs from APs |
|---|
| .. | .. |
|---|
| 60 | 60 | struct list_head beacon_registrations; |
|---|
| 61 | 61 | spinlock_t beacon_registrations_lock; |
|---|
| 62 | 62 | |
|---|
| 63 | | - struct list_head mlme_unreg; |
|---|
| 64 | | - spinlock_t mlme_unreg_lock; |
|---|
| 65 | | - struct work_struct mlme_unreg_wk; |
|---|
| 66 | | - |
|---|
| 67 | 63 | /* protected by RTNL only */ |
|---|
| 68 | 64 | int num_running_ifaces; |
|---|
| 69 | 65 | int num_running_monitor_ifaces; |
|---|
| 66 | + u64 cookie_counter; |
|---|
| 70 | 67 | |
|---|
| 71 | 68 | /* BSSes/scanning */ |
|---|
| 72 | 69 | spinlock_t bss_lock; |
|---|
| .. | .. |
|---|
| 75 | 72 | u32 bss_generation; |
|---|
| 76 | 73 | u32 bss_entries; |
|---|
| 77 | 74 | struct cfg80211_scan_request *scan_req; /* protected by RTNL */ |
|---|
| 75 | + struct cfg80211_scan_request *int_scan_req; |
|---|
| 78 | 76 | struct sk_buff *scan_msg; |
|---|
| 79 | 77 | struct list_head sched_scan_req_list; |
|---|
| 80 | 78 | time64_t suspend_at; |
|---|
| .. | .. |
|---|
| 101 | 99 | |
|---|
| 102 | 100 | struct cfg80211_chan_def cac_done_chandef; |
|---|
| 103 | 101 | 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; |
|---|
| 104 | 106 | |
|---|
| 105 | 107 | /* must be last because of the way we do wiphy_priv(), |
|---|
| 106 | 108 | * and it should at least be aligned to NETDEV_ALIGN */ |
|---|
| .. | .. |
|---|
| 132 | 134 | kfree(rdev->wiphy.wowlan_config->nd_config); |
|---|
| 133 | 135 | kfree(rdev->wiphy.wowlan_config); |
|---|
| 134 | 136 | #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; |
|---|
| 135 | 147 | } |
|---|
| 136 | 148 | |
|---|
| 137 | 149 | extern struct workqueue_struct *cfg80211_wq; |
|---|
| .. | .. |
|---|
| 198 | 210 | |
|---|
| 199 | 211 | int cfg80211_switch_netns(struct cfg80211_registered_device *rdev, |
|---|
| 200 | 212 | 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); |
|---|
| 201 | 217 | |
|---|
| 202 | 218 | static inline void wdev_lock(struct wireless_dev *wdev) |
|---|
| 203 | 219 | __acquires(wdev) |
|---|
| .. | .. |
|---|
| 276 | 292 | u32 rssi_hyst; |
|---|
| 277 | 293 | s32 last_rssi_event_value; |
|---|
| 278 | 294 | int n_rssi_thresholds; |
|---|
| 279 | | - s32 rssi_thresholds[0]; |
|---|
| 295 | + s32 rssi_thresholds[]; |
|---|
| 280 | 296 | }; |
|---|
| 281 | 297 | |
|---|
| 282 | 298 | void cfg80211_destroy_ifaces(struct cfg80211_registered_device *rdev); |
|---|
| .. | .. |
|---|
| 292 | 308 | void cfg80211_bss_expire(struct cfg80211_registered_device *rdev); |
|---|
| 293 | 309 | void cfg80211_bss_age(struct cfg80211_registered_device *rdev, |
|---|
| 294 | 310 | unsigned long age_secs); |
|---|
| 311 | +void cfg80211_update_assoc_bss_entry(struct wireless_dev *wdev, |
|---|
| 312 | + struct ieee80211_channel *channel); |
|---|
| 295 | 313 | |
|---|
| 296 | 314 | /* IBSS */ |
|---|
| 297 | 315 | int __cfg80211_join_ibss(struct cfg80211_registered_device *rdev, |
|---|
| .. | .. |
|---|
| 369 | 387 | struct net_device *dev); |
|---|
| 370 | 388 | int cfg80211_mlme_register_mgmt(struct wireless_dev *wdev, u32 snd_pid, |
|---|
| 371 | 389 | 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); |
|---|
| 374 | 393 | void cfg80211_mlme_unregister_socket(struct wireless_dev *wdev, u32 nlpid); |
|---|
| 375 | 394 | void cfg80211_mlme_purge_registrations(struct wireless_dev *wdev); |
|---|
| 376 | 395 | int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev, |
|---|
| .. | .. |
|---|
| 444 | 463 | bool cfg80211_does_bw_fit_range(const struct ieee80211_freq_range *freq_range, |
|---|
| 445 | 464 | u32 center_freq_khz, u32 bw_khz); |
|---|
| 446 | 465 | |
|---|
| 466 | +int cfg80211_scan(struct cfg80211_registered_device *rdev); |
|---|
| 467 | + |
|---|
| 447 | 468 | extern struct work_struct cfg80211_disconnect_work; |
|---|
| 448 | 469 | |
|---|
| 449 | 470 | /** |
|---|
| .. | .. |
|---|
| 453 | 474 | * |
|---|
| 454 | 475 | * Checks if chandef is usable and we can/need start CAC on such channel. |
|---|
| 455 | 476 | * |
|---|
| 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) |
|---|
| 458 | 479 | */ |
|---|
| 459 | 480 | bool cfg80211_chandef_dfs_usable(struct wiphy *wiphy, |
|---|
| 460 | 481 | const struct cfg80211_chan_def *chandef); |
|---|
| .. | .. |
|---|
| 536 | 557 | |
|---|
| 537 | 558 | void cfg80211_cqm_config_free(struct wireless_dev *wdev); |
|---|
| 538 | 559 | |
|---|
| 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 | + |
|---|
| 539 | 564 | #endif /* __NET_WIRELESS_CORE_H */ |
|---|