Commit e69dac88 authored by Johannes Berg's avatar Johannes Berg

wifi: cfg80211: adjust assoc comeback for MLO

We only report the BSSID to userspace, so change the
argument from BSS struct pointer to AP address, which
we'll use to carry either the BSSID or AP MLD address.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent afa2d659
...@@ -8592,13 +8592,13 @@ bool cfg80211_iftype_allowed(struct wiphy *wiphy, enum nl80211_iftype iftype, ...@@ -8592,13 +8592,13 @@ bool cfg80211_iftype_allowed(struct wiphy *wiphy, enum nl80211_iftype iftype,
* cfg80211_assoc_comeback - notification of association that was * cfg80211_assoc_comeback - notification of association that was
* temporarly rejected with a comeback * temporarly rejected with a comeback
* @netdev: network device * @netdev: network device
* @bss: the bss entry with which association is in progress. * @ap_addr: AP (MLD) address that rejected the assocation
* @timeout: timeout interval value TUs. * @timeout: timeout interval value TUs.
* *
* this function may sleep. the caller must hold the corresponding wdev's mutex. * this function may sleep. the caller must hold the corresponding wdev's mutex.
*/ */
void cfg80211_assoc_comeback(struct net_device *netdev, void cfg80211_assoc_comeback(struct net_device *netdev,
struct cfg80211_bss *bss, u32 timeout); const u8 *ap_addr, u32 timeout);
/* Logging, debugging and troubleshooting/diagnostic helpers. */ /* Logging, debugging and troubleshooting/diagnostic helpers. */
......
...@@ -3944,7 +3944,7 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, ...@@ -3944,7 +3944,7 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
elems->timeout_int->type == WLAN_TIMEOUT_ASSOC_COMEBACK) { elems->timeout_int->type == WLAN_TIMEOUT_ASSOC_COMEBACK) {
u32 tu, ms; u32 tu, ms;
cfg80211_assoc_comeback(sdata->dev, assoc_data->bss, cfg80211_assoc_comeback(sdata->dev, assoc_data->bss->bssid,
le32_to_cpu(elems->timeout_int->value)); le32_to_cpu(elems->timeout_int->value));
tu = le32_to_cpu(elems->timeout_int->value); tu = le32_to_cpu(elems->timeout_int->value);
......
...@@ -18036,7 +18036,7 @@ static void nl80211_send_remain_on_chan_event( ...@@ -18036,7 +18036,7 @@ static void nl80211_send_remain_on_chan_event(
} }
void cfg80211_assoc_comeback(struct net_device *netdev, void cfg80211_assoc_comeback(struct net_device *netdev,
struct cfg80211_bss *bss, u32 timeout) const u8 *ap_addr, u32 timeout)
{ {
struct wireless_dev *wdev = netdev->ieee80211_ptr; struct wireless_dev *wdev = netdev->ieee80211_ptr;
struct wiphy *wiphy = wdev->wiphy; struct wiphy *wiphy = wdev->wiphy;
...@@ -18044,7 +18044,7 @@ void cfg80211_assoc_comeback(struct net_device *netdev, ...@@ -18044,7 +18044,7 @@ void cfg80211_assoc_comeback(struct net_device *netdev,
struct sk_buff *msg; struct sk_buff *msg;
void *hdr; void *hdr;
trace_cfg80211_assoc_comeback(wdev, bss->bssid, timeout); trace_cfg80211_assoc_comeback(wdev, ap_addr, timeout);
msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
if (!msg) if (!msg)
...@@ -18058,7 +18058,7 @@ void cfg80211_assoc_comeback(struct net_device *netdev, ...@@ -18058,7 +18058,7 @@ void cfg80211_assoc_comeback(struct net_device *netdev,
if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) ||
nla_put_u32(msg, NL80211_ATTR_IFINDEX, netdev->ifindex) || nla_put_u32(msg, NL80211_ATTR_IFINDEX, netdev->ifindex) ||
nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, bss->bssid) || nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, ap_addr) ||
nla_put_u32(msg, NL80211_ATTR_TIMEOUT, timeout)) nla_put_u32(msg, NL80211_ATTR_TIMEOUT, timeout))
goto nla_put_failure; goto nla_put_failure;
......
...@@ -3764,20 +3764,20 @@ TRACE_EVENT(cfg80211_bss_color_notify, ...@@ -3764,20 +3764,20 @@ TRACE_EVENT(cfg80211_bss_color_notify,
); );
TRACE_EVENT(cfg80211_assoc_comeback, TRACE_EVENT(cfg80211_assoc_comeback,
TP_PROTO(struct wireless_dev *wdev, const u8 *bssid, u32 timeout), TP_PROTO(struct wireless_dev *wdev, const u8 *ap_addr, u32 timeout),
TP_ARGS(wdev, bssid, timeout), TP_ARGS(wdev, ap_addr, timeout),
TP_STRUCT__entry( TP_STRUCT__entry(
WDEV_ENTRY WDEV_ENTRY
MAC_ENTRY(bssid) MAC_ENTRY(ap_addr)
__field(u32, timeout) __field(u32, timeout)
), ),
TP_fast_assign( TP_fast_assign(
WDEV_ASSIGN; WDEV_ASSIGN;
MAC_ASSIGN(bssid, bssid); MAC_ASSIGN(ap_addr, ap_addr);
__entry->timeout = timeout; __entry->timeout = timeout;
), ),
TP_printk(WDEV_PR_FMT ", " MAC_PR_FMT ", timeout: %u TUs", TP_printk(WDEV_PR_FMT ", " MAC_PR_FMT ", timeout: %u TUs",
WDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->timeout) WDEV_PR_ARG, MAC_PR_ARG(ap_addr), __entry->timeout)
); );
DECLARE_EVENT_CLASS(link_station_add_mod, DECLARE_EVENT_CLASS(link_station_add_mod,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment