aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/cfg80211.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r--include/net/cfg80211.h65
1 files changed, 35 insertions, 30 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 1effe0682d28..86f777af79e8 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -306,6 +306,23 @@ struct key_params {
306}; 306};
307 307
308/** 308/**
309 * struct cfg80211_chan_def - channel definition
310 * @chan: the (control) channel
311 * @_type: the channel type, don't use this field,
312 * use cfg80211_get_chandef_type() if needed.
313 */
314struct cfg80211_chan_def {
315 struct ieee80211_channel *chan;
316 enum nl80211_channel_type _type;
317};
318
319static inline enum nl80211_channel_type
320cfg80211_get_chandef_type(const struct cfg80211_chan_def *chandef)
321{
322 return chandef->_type;
323}
324
325/**
309 * enum survey_info_flags - survey information flags 326 * enum survey_info_flags - survey information flags
310 * 327 *
311 * @SURVEY_INFO_NOISE_DBM: noise (in dBm) was filled in 328 * @SURVEY_INFO_NOISE_DBM: noise (in dBm) was filled in
@@ -426,8 +443,7 @@ struct cfg80211_beacon_data {
426 * 443 *
427 * Used to configure an AP interface. 444 * Used to configure an AP interface.
428 * 445 *
429 * @channel: the channel to start the AP on 446 * @chandef: defines the channel to use
430 * @channel_type: the channel type to use
431 * @beacon: beacon data 447 * @beacon: beacon data
432 * @beacon_interval: beacon interval 448 * @beacon_interval: beacon interval
433 * @dtim_period: DTIM period 449 * @dtim_period: DTIM period
@@ -441,8 +457,7 @@ struct cfg80211_beacon_data {
441 * @inactivity_timeout: time in seconds to determine station's inactivity. 457 * @inactivity_timeout: time in seconds to determine station's inactivity.
442 */ 458 */
443struct cfg80211_ap_settings { 459struct cfg80211_ap_settings {
444 struct ieee80211_channel *channel; 460 struct cfg80211_chan_def chandef;
445 enum nl80211_channel_type channel_type;
446 461
447 struct cfg80211_beacon_data beacon; 462 struct cfg80211_beacon_data beacon;
448 463
@@ -909,8 +924,7 @@ struct mesh_config {
909 924
910/** 925/**
911 * struct mesh_setup - 802.11s mesh setup configuration 926 * struct mesh_setup - 802.11s mesh setup configuration
912 * @channel: the channel to start the mesh network on 927 * @chandef: defines the channel to use
913 * @channel_type: the channel type to use
914 * @mesh_id: the mesh ID 928 * @mesh_id: the mesh ID
915 * @mesh_id_len: length of the mesh ID, at least 1 and at most 32 bytes 929 * @mesh_id_len: length of the mesh ID, at least 1 and at most 32 bytes
916 * @sync_method: which synchronization method to use 930 * @sync_method: which synchronization method to use
@@ -925,8 +939,7 @@ struct mesh_config {
925 * These parameters are fixed when the mesh is created. 939 * These parameters are fixed when the mesh is created.
926 */ 940 */
927struct mesh_setup { 941struct mesh_setup {
928 struct ieee80211_channel *channel; 942 struct cfg80211_chan_def chandef;
929 enum nl80211_channel_type channel_type;
930 const u8 *mesh_id; 943 const u8 *mesh_id;
931 u8 mesh_id_len; 944 u8 mesh_id_len;
932 u8 sync_method; 945 u8 sync_method;
@@ -1266,8 +1279,7 @@ struct cfg80211_disassoc_request {
1266 * @ssid_len: The length of the SSID, will always be non-zero. 1279 * @ssid_len: The length of the SSID, will always be non-zero.
1267 * @bssid: Fixed BSSID requested, maybe be %NULL, if set do not 1280 * @bssid: Fixed BSSID requested, maybe be %NULL, if set do not
1268 * search for IBSSs with a different BSSID. 1281 * search for IBSSs with a different BSSID.
1269 * @channel: The channel to use if no IBSS can be found to join. 1282 * @chandef: defines the channel to use if no other IBSS to join can be found
1270 * @channel_type: channel type (HT mode)
1271 * @channel_fixed: The channel should be fixed -- do not search for 1283 * @channel_fixed: The channel should be fixed -- do not search for
1272 * IBSSs to join on other channels. 1284 * IBSSs to join on other channels.
1273 * @ie: information element(s) to include in the beacon 1285 * @ie: information element(s) to include in the beacon
@@ -1285,8 +1297,7 @@ struct cfg80211_disassoc_request {
1285struct cfg80211_ibss_params { 1297struct cfg80211_ibss_params {
1286 u8 *ssid; 1298 u8 *ssid;
1287 u8 *bssid; 1299 u8 *bssid;
1288 struct ieee80211_channel *channel; 1300 struct cfg80211_chan_def chandef;
1289 enum nl80211_channel_type channel_type;
1290 u8 *ie; 1301 u8 *ie;
1291 u8 ssid_len, ie_len; 1302 u8 ssid_len, ie_len;
1292 u16 beacon_interval; 1303 u16 beacon_interval;
@@ -1728,8 +1739,7 @@ struct cfg80211_ops {
1728 struct ieee80211_channel *chan); 1739 struct ieee80211_channel *chan);
1729 1740
1730 int (*set_monitor_channel)(struct wiphy *wiphy, 1741 int (*set_monitor_channel)(struct wiphy *wiphy,
1731 struct ieee80211_channel *chan, 1742 struct cfg80211_chan_def *chandef);
1732 enum nl80211_channel_type channel_type);
1733 1743
1734 int (*scan)(struct wiphy *wiphy, 1744 int (*scan)(struct wiphy *wiphy,
1735 struct cfg80211_scan_request *request); 1745 struct cfg80211_scan_request *request);
@@ -1855,10 +1865,9 @@ struct cfg80211_ops {
1855 void (*get_et_strings)(struct wiphy *wiphy, struct net_device *dev, 1865 void (*get_et_strings)(struct wiphy *wiphy, struct net_device *dev,
1856 u32 sset, u8 *data); 1866 u32 sset, u8 *data);
1857 1867
1858 struct ieee80211_channel * 1868 int (*get_channel)(struct wiphy *wiphy,
1859 (*get_channel)(struct wiphy *wiphy,
1860 struct wireless_dev *wdev, 1869 struct wireless_dev *wdev,
1861 enum nl80211_channel_type *type); 1870 struct cfg80211_chan_def *chandef);
1862 1871
1863 int (*start_p2p_device)(struct wiphy *wiphy, 1872 int (*start_p2p_device)(struct wiphy *wiphy,
1864 struct wireless_dev *wdev); 1873 struct wireless_dev *wdev);
@@ -2466,8 +2475,7 @@ struct wireless_dev {
2466 spinlock_t event_lock; 2475 spinlock_t event_lock;
2467 2476
2468 struct cfg80211_internal_bss *current_bss; /* associated / joined */ 2477 struct cfg80211_internal_bss *current_bss; /* associated / joined */
2469 struct ieee80211_channel *preset_chan; 2478 struct cfg80211_chan_def preset_chandef;
2470 enum nl80211_channel_type preset_chantype;
2471 2479
2472 /* for AP and mesh channel tracking */ 2480 /* for AP and mesh channel tracking */
2473 struct ieee80211_channel *channel; 2481 struct ieee80211_channel *channel;
@@ -3563,28 +3571,25 @@ void cfg80211_report_obss_beacon(struct wiphy *wiphy,
3563 int freq, int sig_dbm); 3571 int freq, int sig_dbm);
3564 3572
3565/** 3573/**
3566 * cfg80211_can_beacon_sec_chan - test if ht40 on extension channel can be used 3574 * cfg80211_reg_can_beacon - check if beaconing is allowed
3567 * @wiphy: the wiphy 3575 * @wiphy: the wiphy
3568 * @chan: main channel 3576 * @chandef: the channel definition
3569 * @channel_type: HT mode
3570 * 3577 *
3571 * This function returns true if there is no secondary channel or the secondary 3578 * This function returns true if there is no secondary channel or the secondary
3572 * channel can be used for beaconing (i.e. is not a radar channel etc.) 3579 * channel(s) can be used for beaconing (i.e. is not a radar channel etc.)
3573 */ 3580 */
3574bool cfg80211_can_beacon_sec_chan(struct wiphy *wiphy, 3581bool cfg80211_reg_can_beacon(struct wiphy *wiphy,
3575 struct ieee80211_channel *chan, 3582 struct cfg80211_chan_def *chandef);
3576 enum nl80211_channel_type channel_type);
3577 3583
3578/* 3584/*
3579 * cfg80211_ch_switch_notify - update wdev channel and notify userspace 3585 * cfg80211_ch_switch_notify - update wdev channel and notify userspace
3580 * @dev: the device which switched channels 3586 * @dev: the device which switched channels
3581 * @freq: new channel frequency (in MHz) 3587 * @chandef: the new channel definition
3582 * @type: channel type
3583 * 3588 *
3584 * Acquires wdev_lock, so must only be called from sleepable driver context! 3589 * Acquires wdev_lock, so must only be called from sleepable driver context!
3585 */ 3590 */
3586void cfg80211_ch_switch_notify(struct net_device *dev, int freq, 3591void cfg80211_ch_switch_notify(struct net_device *dev,
3587 enum nl80211_channel_type type); 3592 struct cfg80211_chan_def *chandef);
3588 3593
3589/* 3594/*
3590 * cfg80211_tdls_oper_request - request userspace to perform TDLS operation 3595 * cfg80211_tdls_oper_request - request userspace to perform TDLS operation