cfg80211: add start / stop NAN commands
This allows user space to start/stop NAN interface. A NAN interface is like P2P device in a few aspects: it doesn't have a netdev associated to it. Add the new interface type and prevent operations that can't be executed on NAN interface like scan. Define several attributes that may be configured by user space when starting NAN functionality (master preference and dual band operation) Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:

committed by
Johannes Berg

parent
b8676221f0
commit
cb3b7d8765
@@ -2313,6 +2313,19 @@ struct cfg80211_qos_map {
|
||||
struct cfg80211_dscp_range up[8];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct cfg80211_nan_conf - NAN configuration
|
||||
*
|
||||
* This struct defines NAN configuration parameters
|
||||
*
|
||||
* @master_pref: master preference (1 - 255)
|
||||
* @dual: dual band operation mode, see &enum nl80211_nan_dual_band_conf
|
||||
*/
|
||||
struct cfg80211_nan_conf {
|
||||
u8 master_pref;
|
||||
u8 dual;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct cfg80211_ops - backend description for wireless configuration
|
||||
*
|
||||
@@ -2601,6 +2614,8 @@ struct cfg80211_qos_map {
|
||||
* and returning to the base channel for communication with the AP.
|
||||
* @tdls_cancel_channel_switch: Stop channel-switching with a TDLS peer. Both
|
||||
* peers must be on the base channel when the call completes.
|
||||
* @start_nan: Start the NAN interface.
|
||||
* @stop_nan: Stop the NAN interface.
|
||||
*/
|
||||
struct cfg80211_ops {
|
||||
int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow);
|
||||
@@ -2866,6 +2881,9 @@ struct cfg80211_ops {
|
||||
void (*tdls_cancel_channel_switch)(struct wiphy *wiphy,
|
||||
struct net_device *dev,
|
||||
const u8 *addr);
|
||||
int (*start_nan)(struct wiphy *wiphy, struct wireless_dev *wdev,
|
||||
struct cfg80211_nan_conf *conf);
|
||||
void (*stop_nan)(struct wiphy *wiphy, struct wireless_dev *wdev);
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -3626,6 +3644,7 @@ struct cfg80211_cached_keys;
|
||||
* beacons, 0 when not valid
|
||||
* @address: The address for this device, valid only if @netdev is %NULL
|
||||
* @p2p_started: true if this is a P2P Device that has been started
|
||||
* @nan_started: true if this is a NAN interface that has been started
|
||||
* @cac_started: true if DFS channel availability check has been started
|
||||
* @cac_start_time: timestamp (jiffies) when the dfs state was entered.
|
||||
* @cac_time_ms: CAC time in ms
|
||||
@@ -3657,7 +3676,7 @@ struct wireless_dev {
|
||||
|
||||
struct mutex mtx;
|
||||
|
||||
bool use_4addr, p2p_started;
|
||||
bool use_4addr, p2p_started, nan_started;
|
||||
|
||||
u8 address[ETH_ALEN] __aligned(sizeof(u16));
|
||||
|
||||
|
Reference in New Issue
Block a user