Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+36 -21
+1 -1
drivers/net/wireless/ath/ath6kl/cfg80211.c
··· 2954 2954 } 2955 2955 2956 2956 static int ath6kl_change_beacon(struct wiphy *wiphy, struct net_device *dev, 2957 - struct cfg80211_ap_settings *params) 2957 + struct cfg80211_ap_update *params) 2958 2958 { 2959 2959 struct ath6kl_vif *vif = netdev_priv(dev); 2960 2960
+1 -1
drivers/net/wireless/ath/wil6210/cfg80211.c
··· 2082 2082 2083 2083 static int wil_cfg80211_change_beacon(struct wiphy *wiphy, 2084 2084 struct net_device *ndev, 2085 - struct cfg80211_ap_settings *params) 2085 + struct cfg80211_ap_update *params) 2086 2086 { 2087 2087 struct wil6210_priv *wil = wiphy_to_wil(wiphy); 2088 2088 struct wireless_dev *wdev = ndev->ieee80211_ptr;
+1 -1
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
··· 5415 5415 5416 5416 static s32 5417 5417 brcmf_cfg80211_change_beacon(struct wiphy *wiphy, struct net_device *ndev, 5418 - struct cfg80211_ap_settings *info) 5418 + struct cfg80211_ap_update *info) 5419 5419 { 5420 5420 struct brcmf_if *ifp = netdev_priv(ndev); 5421 5421
+1 -1
drivers/net/wireless/marvell/mwifiex/cfg80211.c
··· 1835 1835 */ 1836 1836 static int mwifiex_cfg80211_change_beacon(struct wiphy *wiphy, 1837 1837 struct net_device *dev, 1838 - struct cfg80211_ap_settings *params) 1838 + struct cfg80211_ap_update *params) 1839 1839 { 1840 1840 struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev); 1841 1841 struct mwifiex_adapter *adapter = priv->adapter;
+1 -1
drivers/net/wireless/microchip/wilc1000/cfg80211.c
··· 1441 1441 } 1442 1442 1443 1443 static int change_beacon(struct wiphy *wiphy, struct net_device *dev, 1444 - struct cfg80211_ap_settings *params) 1444 + struct cfg80211_ap_update *params) 1445 1445 { 1446 1446 struct wilc_vif *vif = netdev_priv(dev); 1447 1447
+1 -1
drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
··· 331 331 } 332 332 333 333 static int qtnf_change_beacon(struct wiphy *wiphy, struct net_device *dev, 334 - struct cfg80211_ap_settings *info) 334 + struct cfg80211_ap_update *info) 335 335 { 336 336 struct qtnf_vif *vif = qtnf_netdev_get_priv(dev); 337 337
+1 -1
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
··· 2319 2319 } 2320 2320 2321 2321 static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev, 2322 - struct cfg80211_ap_settings *info) 2322 + struct cfg80211_ap_update *info) 2323 2323 { 2324 2324 struct adapter *adapter = rtw_netdev_priv(ndev); 2325 2325
+17 -1
include/net/cfg80211.h
··· 1480 1480 u16 punct_bitmap; 1481 1481 }; 1482 1482 1483 + 1484 + /** 1485 + * struct cfg80211_ap_update - AP configuration update 1486 + * 1487 + * Subset of &struct cfg80211_ap_settings, for updating a running AP. 1488 + * 1489 + * @beacon: beacon data 1490 + * @fils_discovery: FILS discovery transmission parameters 1491 + * @unsol_bcast_probe_resp: Unsolicited broadcast probe response parameters 1492 + */ 1493 + struct cfg80211_ap_update { 1494 + struct cfg80211_beacon_data beacon; 1495 + struct cfg80211_fils_discovery fils_discovery; 1496 + struct cfg80211_unsol_bcast_probe_resp unsol_bcast_probe_resp; 1497 + }; 1498 + 1483 1499 /** 1484 1500 * struct cfg80211_csa_settings - channel switch settings 1485 1501 * ··· 4539 4523 int (*start_ap)(struct wiphy *wiphy, struct net_device *dev, 4540 4524 struct cfg80211_ap_settings *settings); 4541 4525 int (*change_beacon)(struct wiphy *wiphy, struct net_device *dev, 4542 - struct cfg80211_ap_settings *info); 4526 + struct cfg80211_ap_update *info); 4543 4527 int (*stop_ap)(struct wiphy *wiphy, struct net_device *dev, 4544 4528 unsigned int link_id); 4545 4529
+1 -1
net/mac80211/cfg.c
··· 1477 1477 } 1478 1478 1479 1479 static int ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev, 1480 - struct cfg80211_ap_settings *params) 1480 + struct cfg80211_ap_update *params) 1481 1481 1482 1482 { 1483 1483 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+9 -10
net/wireless/nl80211.c
··· 5636 5636 5637 5637 static int nl80211_parse_fils_discovery(struct cfg80211_registered_device *rdev, 5638 5638 struct nlattr *attrs, 5639 - struct cfg80211_ap_settings *params) 5639 + struct cfg80211_fils_discovery *fd) 5640 5640 { 5641 5641 struct nlattr *tb[NL80211_FILS_DISCOVERY_ATTR_MAX + 1]; 5642 5642 int ret; 5643 - struct cfg80211_fils_discovery *fd = &params->fils_discovery; 5644 5643 5645 5644 if (!wiphy_ext_feature_isset(&rdev->wiphy, 5646 5645 NL80211_EXT_FEATURE_FILS_DISCOVERY)) ··· 5673 5674 static int 5674 5675 nl80211_parse_unsol_bcast_probe_resp(struct cfg80211_registered_device *rdev, 5675 5676 struct nlattr *attrs, 5676 - struct cfg80211_ap_settings *params) 5677 + struct cfg80211_unsol_bcast_probe_resp *presp) 5677 5678 { 5678 5679 struct nlattr *tb[NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_MAX + 1]; 5679 5680 int ret; 5680 - struct cfg80211_unsol_bcast_probe_resp *presp = 5681 - &params->unsol_bcast_probe_resp; 5682 5681 5683 5682 if (!wiphy_ext_feature_isset(&rdev->wiphy, 5684 5683 NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP)) ··· 6119 6122 if (info->attrs[NL80211_ATTR_FILS_DISCOVERY]) { 6120 6123 err = nl80211_parse_fils_discovery(rdev, 6121 6124 info->attrs[NL80211_ATTR_FILS_DISCOVERY], 6122 - params); 6125 + &params->fils_discovery); 6123 6126 if (err) 6124 6127 goto out; 6125 6128 } ··· 6127 6130 if (info->attrs[NL80211_ATTR_UNSOL_BCAST_PROBE_RESP]) { 6128 6131 err = nl80211_parse_unsol_bcast_probe_resp( 6129 6132 rdev, info->attrs[NL80211_ATTR_UNSOL_BCAST_PROBE_RESP], 6130 - params); 6133 + &params->unsol_bcast_probe_resp); 6131 6134 if (err) 6132 6135 goto out; 6133 6136 } ··· 6199 6202 unsigned int link_id = nl80211_link_id(info->attrs); 6200 6203 struct net_device *dev = info->user_ptr[1]; 6201 6204 struct wireless_dev *wdev = dev->ieee80211_ptr; 6202 - struct cfg80211_ap_settings *params; 6205 + struct cfg80211_ap_update *params; 6203 6206 struct nlattr *attr; 6204 6207 int err; 6205 6208 ··· 6224 6227 6225 6228 attr = info->attrs[NL80211_ATTR_FILS_DISCOVERY]; 6226 6229 if (attr) { 6227 - err = nl80211_parse_fils_discovery(rdev, attr, params); 6230 + err = nl80211_parse_fils_discovery(rdev, attr, 6231 + &params->fils_discovery); 6228 6232 if (err) 6229 6233 goto out; 6230 6234 } 6231 6235 6232 6236 attr = info->attrs[NL80211_ATTR_UNSOL_BCAST_PROBE_RESP]; 6233 6237 if (attr) { 6234 - err = nl80211_parse_unsol_bcast_probe_resp(rdev, attr, params); 6238 + err = nl80211_parse_unsol_bcast_probe_resp(rdev, attr, 6239 + &params->unsol_bcast_probe_resp); 6235 6240 if (err) 6236 6241 goto out; 6237 6242 }
+1 -1
net/wireless/rdev-ops.h
··· 173 173 174 174 static inline int rdev_change_beacon(struct cfg80211_registered_device *rdev, 175 175 struct net_device *dev, 176 - struct cfg80211_ap_settings *info) 176 + struct cfg80211_ap_update *info) 177 177 { 178 178 int ret; 179 179 trace_rdev_change_beacon(&rdev->wiphy, dev, info);
+1 -1
net/wireless/trace.h
··· 615 615 616 616 TRACE_EVENT(rdev_change_beacon, 617 617 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 618 - struct cfg80211_ap_settings *info), 618 + struct cfg80211_ap_update *info), 619 619 TP_ARGS(wiphy, netdev, info), 620 620 TP_STRUCT__entry( 621 621 WIPHY_ENTRY