mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-09-18 23:19:34 +02:00
wifi: nl80211/cfg80211: rename probe_client to probe_peer
Rename NL80211_CMD_PROBE_CLIENT to NL80211_CMD_PROBE_PEER in the UAPI enum and retain NL80211_CMD_PROBE_CLIENT as a compatibility alias. Rename the .probe_client cfg80211_ops callback to .probe_peer and update all in-tree users (wil6210, mwifiex) and mac80211 so the tree continues to build after this change. Signed-off-by: Priyansha Tiwari <priyansha.tiwari@oss.qualcomm.com> Link: https://patch.msgid.link/20260611062225.2144241-2-pritiwa@qti.qualcomm.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
committed by
Johannes Berg
parent
25bc29ba67
commit
4ab9b637b9
@@ -2379,9 +2379,9 @@ void wil_probe_client_flush(struct wil6210_vif *vif)
|
||||
mutex_unlock(&vif->probe_client_mutex);
|
||||
}
|
||||
|
||||
static int wil_cfg80211_probe_client(struct wiphy *wiphy,
|
||||
struct net_device *dev,
|
||||
const u8 *peer, u64 *cookie)
|
||||
static int wil_cfg80211_probe_peer(struct wiphy *wiphy,
|
||||
struct net_device *dev,
|
||||
const u8 *peer, u64 *cookie)
|
||||
{
|
||||
struct wil6210_priv *wil = wiphy_to_wil(wiphy);
|
||||
struct wil6210_vif *vif = ndev_to_vif(dev);
|
||||
@@ -2660,7 +2660,7 @@ static const struct cfg80211_ops wil_cfg80211_ops = {
|
||||
.add_station = wil_cfg80211_add_station,
|
||||
.del_station = wil_cfg80211_del_station,
|
||||
.change_station = wil_cfg80211_change_station,
|
||||
.probe_client = wil_cfg80211_probe_client,
|
||||
.probe_peer = wil_cfg80211_probe_peer,
|
||||
.change_bss = wil_cfg80211_change_bss,
|
||||
/* P2P device */
|
||||
.start_p2p_device = wil_cfg80211_start_p2p_device,
|
||||
|
||||
@@ -4558,9 +4558,9 @@ mwifiex_cfg80211_disassociate(struct wiphy *wiphy,
|
||||
}
|
||||
|
||||
static int
|
||||
mwifiex_cfg80211_probe_client(struct wiphy *wiphy,
|
||||
struct net_device *dev, const u8 *peer,
|
||||
u64 *cookie)
|
||||
mwifiex_cfg80211_probe_peer(struct wiphy *wiphy,
|
||||
struct net_device *dev, const u8 *peer,
|
||||
u64 *cookie)
|
||||
{
|
||||
/* hostapd looks for NL80211_CMD_PROBE_CLIENT support; otherwise,
|
||||
* it requires monitor-mode support (which mwifiex doesn't support).
|
||||
@@ -4726,7 +4726,7 @@ int mwifiex_register_cfg80211(struct mwifiex_adapter *adapter)
|
||||
ops->disassoc = mwifiex_cfg80211_disassociate;
|
||||
ops->disconnect = NULL;
|
||||
ops->connect = NULL;
|
||||
ops->probe_client = mwifiex_cfg80211_probe_client;
|
||||
ops->probe_peer = mwifiex_cfg80211_probe_peer;
|
||||
}
|
||||
wiphy->max_scan_ssids = MWIFIEX_MAX_SSID_LIST_LENGTH;
|
||||
wiphy->max_scan_ie_len = MWIFIEX_MAX_VSIE_LEN;
|
||||
|
||||
@@ -5086,7 +5086,7 @@ struct mgmt_frame_regs {
|
||||
* @tdls_mgmt: Transmit a TDLS management frame.
|
||||
* @tdls_oper: Perform a high-level TDLS operation (e.g. TDLS link setup).
|
||||
*
|
||||
* @probe_client: probe an associated client, must return a cookie that it
|
||||
* @probe_peer: probe an associated client, must return a cookie that it
|
||||
* later passes to cfg80211_probe_status().
|
||||
*
|
||||
* @set_noack_map: Set the NoAck Map for the TIDs.
|
||||
@@ -5488,8 +5488,8 @@ struct cfg80211_ops {
|
||||
int (*tdls_oper)(struct wiphy *wiphy, struct net_device *dev,
|
||||
const u8 *peer, enum nl80211_tdls_operation oper);
|
||||
|
||||
int (*probe_client)(struct wiphy *wiphy, struct net_device *dev,
|
||||
const u8 *peer, u64 *cookie);
|
||||
int (*probe_peer)(struct wiphy *wiphy, struct net_device *dev,
|
||||
const u8 *peer, u64 *cookie);
|
||||
|
||||
int (*set_noack_map)(struct wiphy *wiphy,
|
||||
struct net_device *dev,
|
||||
|
||||
@@ -922,7 +922,7 @@
|
||||
* and wasn't already in a 4-addr VLAN. The event will be sent similarly
|
||||
* to the %NL80211_CMD_UNEXPECTED_FRAME event, to the same listener.
|
||||
*
|
||||
* @NL80211_CMD_PROBE_CLIENT: Probe an associated station on an AP interface
|
||||
* @NL80211_CMD_PROBE_PEER: Probe an associated station on an AP interface
|
||||
* by sending a null data frame to it and reporting when the frame is
|
||||
* acknowledged. This is used to allow timing out inactive clients. Uses
|
||||
* %NL80211_ATTR_IFINDEX and %NL80211_ATTR_MAC. The command returns a
|
||||
@@ -1558,7 +1558,7 @@ enum nl80211_commands {
|
||||
|
||||
NL80211_CMD_UNEXPECTED_FRAME,
|
||||
|
||||
NL80211_CMD_PROBE_CLIENT,
|
||||
NL80211_CMD_PROBE_PEER,
|
||||
|
||||
NL80211_CMD_REGISTER_BEACONS,
|
||||
|
||||
@@ -1729,6 +1729,7 @@ enum nl80211_commands {
|
||||
#define NL80211_CMD_GET_MESH_PARAMS NL80211_CMD_GET_MESH_CONFIG
|
||||
#define NL80211_CMD_SET_MESH_PARAMS NL80211_CMD_SET_MESH_CONFIG
|
||||
#define NL80211_MESH_SETUP_VENDOR_PATH_SEL_IE NL80211_MESH_SETUP_IE
|
||||
#define NL80211_CMD_PROBE_CLIENT NL80211_CMD_PROBE_PEER
|
||||
|
||||
/**
|
||||
* enum nl80211_attrs - nl80211 netlink attributes
|
||||
|
||||
+3
-3
@@ -4949,8 +4949,8 @@ static int ieee80211_set_rekey_data(struct wiphy *wiphy,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ieee80211_probe_client(struct wiphy *wiphy, struct net_device *dev,
|
||||
const u8 *peer, u64 *cookie)
|
||||
static int ieee80211_probe_peer(struct wiphy *wiphy, struct net_device *dev,
|
||||
const u8 *peer, u64 *cookie)
|
||||
{
|
||||
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
|
||||
struct ieee80211_local *local = sdata->local;
|
||||
@@ -6060,7 +6060,7 @@ const struct cfg80211_ops mac80211_config_ops = {
|
||||
.tdls_mgmt = ieee80211_tdls_mgmt,
|
||||
.tdls_channel_switch = ieee80211_tdls_channel_switch,
|
||||
.tdls_cancel_channel_switch = ieee80211_tdls_cancel_channel_switch,
|
||||
.probe_client = ieee80211_probe_client,
|
||||
.probe_peer = ieee80211_probe_peer,
|
||||
.set_noack_map = ieee80211_set_noack_map,
|
||||
#ifdef CONFIG_PM
|
||||
.set_wakeup = ieee80211_set_wakeup,
|
||||
|
||||
@@ -2444,7 +2444,7 @@ static int nl80211_add_commands_unsplit(struct cfg80211_registered_device *rdev,
|
||||
}
|
||||
if (rdev->wiphy.max_sched_scan_reqs)
|
||||
CMD(sched_scan_start, START_SCHED_SCAN);
|
||||
CMD(probe_client, PROBE_CLIENT);
|
||||
CMD(probe_peer, PROBE_PEER);
|
||||
CMD(set_noack_map, SET_NOACK_MAP);
|
||||
if (rdev->wiphy.flags & WIPHY_FLAG_REPORTS_OBSS) {
|
||||
i++;
|
||||
@@ -16150,8 +16150,7 @@ static int nl80211_register_unexpected_frame(struct sk_buff *skb,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int nl80211_probe_client(struct sk_buff *skb,
|
||||
struct genl_info *info)
|
||||
static int nl80211_probe_peer(struct sk_buff *skb, struct genl_info *info)
|
||||
{
|
||||
struct cfg80211_registered_device *rdev = info->user_ptr[0];
|
||||
struct net_device *dev = info->user_ptr[1];
|
||||
@@ -16169,7 +16168,7 @@ static int nl80211_probe_client(struct sk_buff *skb,
|
||||
if (!info->attrs[NL80211_ATTR_MAC])
|
||||
return -EINVAL;
|
||||
|
||||
if (!rdev->ops->probe_client)
|
||||
if (!rdev->ops->probe_peer)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
|
||||
@@ -16177,7 +16176,7 @@ static int nl80211_probe_client(struct sk_buff *skb,
|
||||
return -ENOMEM;
|
||||
|
||||
hdr = nl80211hdr_put(msg, info->snd_portid, info->snd_seq, 0,
|
||||
NL80211_CMD_PROBE_CLIENT);
|
||||
NL80211_CMD_PROBE_PEER);
|
||||
if (!hdr) {
|
||||
err = -ENOBUFS;
|
||||
goto free_msg;
|
||||
@@ -16185,7 +16184,7 @@ static int nl80211_probe_client(struct sk_buff *skb,
|
||||
|
||||
addr = nla_data(info->attrs[NL80211_ATTR_MAC]);
|
||||
|
||||
err = rdev_probe_client(rdev, dev, addr, &cookie);
|
||||
err = rdev_probe_peer(rdev, dev, addr, &cookie);
|
||||
if (err)
|
||||
goto free_msg;
|
||||
|
||||
@@ -20042,9 +20041,9 @@ static const struct genl_small_ops nl80211_small_ops[] = {
|
||||
.internal_flags = IFLAGS(NL80211_FLAG_NEED_NETDEV),
|
||||
},
|
||||
{
|
||||
.cmd = NL80211_CMD_PROBE_CLIENT,
|
||||
.cmd = NL80211_CMD_PROBE_PEER,
|
||||
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
|
||||
.doit = nl80211_probe_client,
|
||||
.doit = nl80211_probe_peer,
|
||||
.flags = GENL_UNS_ADMIN_PERM,
|
||||
.internal_flags = IFLAGS(NL80211_FLAG_NEED_NETDEV_UP),
|
||||
},
|
||||
@@ -22614,7 +22613,7 @@ void cfg80211_probe_status(struct net_device *dev, const u8 *addr,
|
||||
if (!msg)
|
||||
return;
|
||||
|
||||
hdr = nl80211hdr_put(msg, 0, 0, 0, NL80211_CMD_PROBE_CLIENT);
|
||||
hdr = nl80211hdr_put(msg, 0, 0, 0, NL80211_CMD_PROBE_PEER);
|
||||
if (!hdr) {
|
||||
nlmsg_free(msg);
|
||||
return;
|
||||
|
||||
@@ -948,13 +948,13 @@ static inline int rdev_tdls_oper(struct cfg80211_registered_device *rdev,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline int rdev_probe_client(struct cfg80211_registered_device *rdev,
|
||||
struct net_device *dev, const u8 *peer,
|
||||
u64 *cookie)
|
||||
static inline int rdev_probe_peer(struct cfg80211_registered_device *rdev,
|
||||
struct net_device *dev, const u8 *peer,
|
||||
u64 *cookie)
|
||||
{
|
||||
int ret;
|
||||
trace_rdev_probe_client(&rdev->wiphy, dev, peer);
|
||||
ret = rdev->ops->probe_client(&rdev->wiphy, dev, peer, cookie);
|
||||
trace_rdev_probe_peer(&rdev->wiphy, dev, peer);
|
||||
ret = rdev->ops->probe_peer(&rdev->wiphy, dev, peer, cookie);
|
||||
trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -2132,7 +2132,7 @@ DECLARE_EVENT_CLASS(rdev_pmksa,
|
||||
WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->bssid)
|
||||
);
|
||||
|
||||
TRACE_EVENT(rdev_probe_client,
|
||||
TRACE_EVENT(rdev_probe_peer,
|
||||
TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
|
||||
const u8 *peer),
|
||||
TP_ARGS(wiphy, netdev, peer),
|
||||
|
||||
Reference in New Issue
Block a user