mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
wifi: cfg80211: split struct cfg80211_ap_settings
Using the full struct cfg80211_ap_settings for an update is misleading, since most settings cannot be updated. Split the update case off into a new struct cfg80211_ap_update. Change-Id: I3ba4dd9280938ab41252f145227a7005edf327e4 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
6b348f6e34
commit
bb55441c57
@ -2954,7 +2954,7 @@ static int ath6kl_start_ap(struct wiphy *wiphy, struct net_device *dev,
|
||||
}
|
||||
|
||||
static int ath6kl_change_beacon(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct cfg80211_ap_settings *params)
|
||||
struct cfg80211_ap_update *params)
|
||||
{
|
||||
struct ath6kl_vif *vif = netdev_priv(dev);
|
||||
|
||||
|
@ -2082,7 +2082,7 @@ void wil_cfg80211_ap_recovery(struct wil6210_priv *wil)
|
||||
|
||||
static int wil_cfg80211_change_beacon(struct wiphy *wiphy,
|
||||
struct net_device *ndev,
|
||||
struct cfg80211_ap_settings *params)
|
||||
struct cfg80211_ap_update *params)
|
||||
{
|
||||
struct wil6210_priv *wil = wiphy_to_wil(wiphy);
|
||||
struct wireless_dev *wdev = ndev->ieee80211_ptr;
|
||||
|
@ -5415,7 +5415,7 @@ static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev,
|
||||
|
||||
static s32
|
||||
brcmf_cfg80211_change_beacon(struct wiphy *wiphy, struct net_device *ndev,
|
||||
struct cfg80211_ap_settings *info)
|
||||
struct cfg80211_ap_update *info)
|
||||
{
|
||||
struct brcmf_if *ifp = netdev_priv(ndev);
|
||||
|
||||
|
@ -1835,7 +1835,7 @@ static int mwifiex_cfg80211_set_cqm_rssi_config(struct wiphy *wiphy,
|
||||
*/
|
||||
static int mwifiex_cfg80211_change_beacon(struct wiphy *wiphy,
|
||||
struct net_device *dev,
|
||||
struct cfg80211_ap_settings *params)
|
||||
struct cfg80211_ap_update *params)
|
||||
{
|
||||
struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
|
||||
struct mwifiex_adapter *adapter = priv->adapter;
|
||||
|
@ -1441,7 +1441,7 @@ static int start_ap(struct wiphy *wiphy, struct net_device *dev,
|
||||
}
|
||||
|
||||
static int change_beacon(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct cfg80211_ap_settings *params)
|
||||
struct cfg80211_ap_update *params)
|
||||
{
|
||||
struct wilc_vif *vif = netdev_priv(dev);
|
||||
|
||||
|
@ -331,7 +331,7 @@ out:
|
||||
}
|
||||
|
||||
static int qtnf_change_beacon(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct cfg80211_ap_settings *info)
|
||||
struct cfg80211_ap_update *info)
|
||||
{
|
||||
struct qtnf_vif *vif = qtnf_netdev_get_priv(dev);
|
||||
|
||||
|
@ -2319,7 +2319,7 @@ static int cfg80211_rtw_start_ap(struct wiphy *wiphy, struct net_device *ndev,
|
||||
}
|
||||
|
||||
static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev,
|
||||
struct cfg80211_ap_settings *info)
|
||||
struct cfg80211_ap_update *info)
|
||||
{
|
||||
struct adapter *adapter = rtw_netdev_priv(ndev);
|
||||
|
||||
|
@ -1480,6 +1480,22 @@ struct cfg80211_ap_settings {
|
||||
u16 punct_bitmap;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* struct cfg80211_ap_update - AP configuration update
|
||||
*
|
||||
* Subset of &struct cfg80211_ap_settings, for updating a running AP.
|
||||
*
|
||||
* @beacon: beacon data
|
||||
* @fils_discovery: FILS discovery transmission parameters
|
||||
* @unsol_bcast_probe_resp: Unsolicited broadcast probe response parameters
|
||||
*/
|
||||
struct cfg80211_ap_update {
|
||||
struct cfg80211_beacon_data beacon;
|
||||
struct cfg80211_fils_discovery fils_discovery;
|
||||
struct cfg80211_unsol_bcast_probe_resp unsol_bcast_probe_resp;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct cfg80211_csa_settings - channel switch settings
|
||||
*
|
||||
@ -4523,7 +4539,7 @@ struct cfg80211_ops {
|
||||
int (*start_ap)(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct cfg80211_ap_settings *settings);
|
||||
int (*change_beacon)(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct cfg80211_ap_settings *info);
|
||||
struct cfg80211_ap_update *info);
|
||||
int (*stop_ap)(struct wiphy *wiphy, struct net_device *dev,
|
||||
unsigned int link_id);
|
||||
|
||||
|
@ -1477,7 +1477,7 @@ error:
|
||||
}
|
||||
|
||||
static int ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev,
|
||||
struct cfg80211_ap_settings *params)
|
||||
struct cfg80211_ap_update *params)
|
||||
|
||||
{
|
||||
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
||||
|
@ -5636,11 +5636,10 @@ static int nl80211_parse_he_obss_pd(struct nlattr *attrs,
|
||||
|
||||
static int nl80211_parse_fils_discovery(struct cfg80211_registered_device *rdev,
|
||||
struct nlattr *attrs,
|
||||
struct cfg80211_ap_settings *params)
|
||||
struct cfg80211_fils_discovery *fd)
|
||||
{
|
||||
struct nlattr *tb[NL80211_FILS_DISCOVERY_ATTR_MAX + 1];
|
||||
int ret;
|
||||
struct cfg80211_fils_discovery *fd = ¶ms->fils_discovery;
|
||||
|
||||
if (!wiphy_ext_feature_isset(&rdev->wiphy,
|
||||
NL80211_EXT_FEATURE_FILS_DISCOVERY))
|
||||
@ -5674,12 +5673,10 @@ static int nl80211_parse_fils_discovery(struct cfg80211_registered_device *rdev,
|
||||
static int
|
||||
nl80211_parse_unsol_bcast_probe_resp(struct cfg80211_registered_device *rdev,
|
||||
struct nlattr *attrs,
|
||||
struct cfg80211_ap_settings *params)
|
||||
struct cfg80211_unsol_bcast_probe_resp *presp)
|
||||
{
|
||||
struct nlattr *tb[NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_MAX + 1];
|
||||
int ret;
|
||||
struct cfg80211_unsol_bcast_probe_resp *presp =
|
||||
¶ms->unsol_bcast_probe_resp;
|
||||
|
||||
if (!wiphy_ext_feature_isset(&rdev->wiphy,
|
||||
NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP))
|
||||
@ -6122,7 +6119,7 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info)
|
||||
if (info->attrs[NL80211_ATTR_FILS_DISCOVERY]) {
|
||||
err = nl80211_parse_fils_discovery(rdev,
|
||||
info->attrs[NL80211_ATTR_FILS_DISCOVERY],
|
||||
params);
|
||||
¶ms->fils_discovery);
|
||||
if (err)
|
||||
goto out;
|
||||
}
|
||||
@ -6130,7 +6127,7 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info)
|
||||
if (info->attrs[NL80211_ATTR_UNSOL_BCAST_PROBE_RESP]) {
|
||||
err = nl80211_parse_unsol_bcast_probe_resp(
|
||||
rdev, info->attrs[NL80211_ATTR_UNSOL_BCAST_PROBE_RESP],
|
||||
params);
|
||||
¶ms->unsol_bcast_probe_resp);
|
||||
if (err)
|
||||
goto out;
|
||||
}
|
||||
@ -6202,7 +6199,7 @@ static int nl80211_set_beacon(struct sk_buff *skb, struct genl_info *info)
|
||||
unsigned int link_id = nl80211_link_id(info->attrs);
|
||||
struct net_device *dev = info->user_ptr[1];
|
||||
struct wireless_dev *wdev = dev->ieee80211_ptr;
|
||||
struct cfg80211_ap_settings *params;
|
||||
struct cfg80211_ap_update *params;
|
||||
struct nlattr *attr;
|
||||
int err;
|
||||
|
||||
@ -6227,14 +6224,16 @@ static int nl80211_set_beacon(struct sk_buff *skb, struct genl_info *info)
|
||||
|
||||
attr = info->attrs[NL80211_ATTR_FILS_DISCOVERY];
|
||||
if (attr) {
|
||||
err = nl80211_parse_fils_discovery(rdev, attr, params);
|
||||
err = nl80211_parse_fils_discovery(rdev, attr,
|
||||
¶ms->fils_discovery);
|
||||
if (err)
|
||||
goto out;
|
||||
}
|
||||
|
||||
attr = info->attrs[NL80211_ATTR_UNSOL_BCAST_PROBE_RESP];
|
||||
if (attr) {
|
||||
err = nl80211_parse_unsol_bcast_probe_resp(rdev, attr, params);
|
||||
err = nl80211_parse_unsol_bcast_probe_resp(rdev, attr,
|
||||
¶ms->unsol_bcast_probe_resp);
|
||||
if (err)
|
||||
goto out;
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ static inline int rdev_start_ap(struct cfg80211_registered_device *rdev,
|
||||
|
||||
static inline int rdev_change_beacon(struct cfg80211_registered_device *rdev,
|
||||
struct net_device *dev,
|
||||
struct cfg80211_ap_settings *info)
|
||||
struct cfg80211_ap_update *info)
|
||||
{
|
||||
int ret;
|
||||
trace_rdev_change_beacon(&rdev->wiphy, dev, info);
|
||||
|
@ -615,7 +615,7 @@ TRACE_EVENT(rdev_start_ap,
|
||||
|
||||
TRACE_EVENT(rdev_change_beacon,
|
||||
TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
|
||||
struct cfg80211_ap_settings *info),
|
||||
struct cfg80211_ap_update *info),
|
||||
TP_ARGS(wiphy, netdev, info),
|
||||
TP_STRUCT__entry(
|
||||
WIPHY_ENTRY
|
||||
|
Loading…
Reference in New Issue
Block a user