mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
cfg80211: pass struct to interface combination check/iter
Move the growing parameter list to a structure for the interface combination check and iteration functions in cfg80211 and mac80211 to make the code easier to understand. Signed-off-by: Purushottam Kushwaha <pkushwah@qti.qualcomm.com> [edit commit message] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
32910bb951
commit
e227300c83
4 changed files with 68 additions and 72 deletions
|
|
@ -771,6 +771,26 @@ struct cfg80211_csa_settings {
|
|||
u8 count;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct iface_combination_params - input parameters for interface combinations
|
||||
*
|
||||
* Used to pass interface combination parameters
|
||||
*
|
||||
* @num_different_channels: the number of different channels we want
|
||||
* to use for verification
|
||||
* @radar_detect: a bitmap where each bit corresponds to a channel
|
||||
* width where radar detection is needed, as in the definition of
|
||||
* &struct ieee80211_iface_combination.@radar_detect_widths
|
||||
* @iftype_num: array with the number of interfaces of each interface
|
||||
* type. The index is the interface type as specified in &enum
|
||||
* nl80211_iftype.
|
||||
*/
|
||||
struct iface_combination_params {
|
||||
int num_different_channels;
|
||||
u8 radar_detect;
|
||||
int iftype_num[NUM_NL80211_IFTYPES];
|
||||
};
|
||||
|
||||
/**
|
||||
* enum station_parameters_apply_mask - station parameter values to apply
|
||||
* @STATION_PARAM_APPLY_UAPSD: apply new uAPSD parameters (uapsd_queues, max_sp)
|
||||
|
|
@ -5575,36 +5595,20 @@ unsigned int ieee80211_get_num_supported_channels(struct wiphy *wiphy);
|
|||
* cfg80211_check_combinations - check interface combinations
|
||||
*
|
||||
* @wiphy: the wiphy
|
||||
* @num_different_channels: the number of different channels we want
|
||||
* to use for verification
|
||||
* @radar_detect: a bitmap where each bit corresponds to a channel
|
||||
* width where radar detection is needed, as in the definition of
|
||||
* &struct ieee80211_iface_combination.@radar_detect_widths
|
||||
* @iftype_num: array with the numbers of interfaces of each interface
|
||||
* type. The index is the interface type as specified in &enum
|
||||
* nl80211_iftype.
|
||||
* @params: the interface combinations parameter
|
||||
*
|
||||
* This function can be called by the driver to check whether a
|
||||
* combination of interfaces and their types are allowed according to
|
||||
* the interface combinations.
|
||||
*/
|
||||
int cfg80211_check_combinations(struct wiphy *wiphy,
|
||||
const int num_different_channels,
|
||||
const u8 radar_detect,
|
||||
const int iftype_num[NUM_NL80211_IFTYPES]);
|
||||
struct iface_combination_params *params);
|
||||
|
||||
/**
|
||||
* cfg80211_iter_combinations - iterate over matching combinations
|
||||
*
|
||||
* @wiphy: the wiphy
|
||||
* @num_different_channels: the number of different channels we want
|
||||
* to use for verification
|
||||
* @radar_detect: a bitmap where each bit corresponds to a channel
|
||||
* width where radar detection is needed, as in the definition of
|
||||
* &struct ieee80211_iface_combination.@radar_detect_widths
|
||||
* @iftype_num: array with the numbers of interfaces of each interface
|
||||
* type. The index is the interface type as specified in &enum
|
||||
* nl80211_iftype.
|
||||
* @params: the interface combinations parameter
|
||||
* @iter: function to call for each matching combination
|
||||
* @data: pointer to pass to iter function
|
||||
*
|
||||
|
|
@ -5613,9 +5617,7 @@ int cfg80211_check_combinations(struct wiphy *wiphy,
|
|||
* purposes.
|
||||
*/
|
||||
int cfg80211_iter_combinations(struct wiphy *wiphy,
|
||||
const int num_different_channels,
|
||||
const u8 radar_detect,
|
||||
const int iftype_num[NUM_NL80211_IFTYPES],
|
||||
struct iface_combination_params *params,
|
||||
void (*iter)(const struct ieee80211_iface_combination *c,
|
||||
void *data),
|
||||
void *data);
|
||||
|
|
|
|||
Loading…
Reference in a new issue