2023-03-20 16:53:08

by Maharaja Kennadyrajan

[permalink] [raw]
Subject: [PATCH v2 0/4] Add AP power save support

AP power save feature is enabled when the driver and hardware
supports. If the driver suppots this feature then driver will
advertise this flag SUPPORTS_AP_PS to enable the AP power save
in mac80211.

AP goes into the power save mode, if no stations are connected
and it will come out of power save as and when any of the station
associate to it. Also, during the power save tx chain mask is
reduced to 1x1 until the any station connects with more than
1x1 chain mask.

Rename NL80211_CMD_SET_BEACON to NL80211_UPDATE_AP to make use
of this command to configure more AP parameters which can vary
at the run time of the BSS like AP power save config.

A new nl80211 attribute NL80211_ATTR_AP_PS is introduced for
this AP power save configuration from user space which is used
along with the NL80211_CMD_UPDATE_AP.

Venkateswara Naralasetty (4):
wifi: nl80211: rename NL80211_CMD_SET_BEACON to NL80211_CMD_UDPATE_AP
wifi: nl80211: add configuration support for ap power save
wifi: mac80211: notify BSS change upon AP power save change
wifi: ath11k: add AP power save support

v2: Updated the commit log in patch 4.

drivers/net/wireless/ath/ath11k/core.c | 8 +++
drivers/net/wireless/ath/ath11k/core.h | 8 +++
drivers/net/wireless/ath/ath11k/hw.h | 1 +
drivers/net/wireless/ath/ath11k/mac.c | 58 +++++++++++++++
drivers/net/wireless/ath/ath11k/wmi.c | 32 +++++++++
drivers/net/wireless/ath/ath11k/wmi.h | 8 +++
drivers/net/wireless/ath/ath6kl/cfg80211.c | 11 +--
drivers/net/wireless/ath/wil6210/cfg80211.c | 14 ++--
.../broadcom/brcm80211/brcmfmac/cfg80211.c | 11 +--
.../net/wireless/marvell/mwifiex/cfg80211.c | 15 ++--
.../wireless/microchip/wilc1000/cfg80211.c | 11 +--
.../net/wireless/quantenna/qtnfmac/cfg80211.c | 11 +--
.../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 12 +++-
include/net/cfg80211.h | 42 +++++++++--
include/net/mac80211.h | 7 +-
include/uapi/linux/nl80211.h | 28 +++++---
net/mac80211/cfg.c | 39 +++++++----
net/mac80211/debugfs.c | 1 +
net/wireless/nl80211.c | 32 ++++++---
net/wireless/rdev-ops.h | 10 +--
net/wireless/trace.h | 70 ++++++++++---------
21 files changed, 327 insertions(+), 102 deletions(-)

--
2.25.1



2023-03-20 16:53:13

by Maharaja Kennadyrajan

[permalink] [raw]
Subject: [PATCH v2 2/4] wifi: nl80211: add configuration support for ap power save

From: Venkateswara Naralasetty <[email protected]>

Add support to configure AP power save mode from the
user space using a new nl80211 attribute
NL80211_ATTR_AP_PS through the NL80211_CMD_UPDATE_AP
command.

This feature will be enabled when the driver advertise
the flag SUPPORTS_AP_PS to mac80211.

Signed-off-by: Venkateswara Naralasetty <[email protected]>
Signed-off-by: Maharaja Kennadyrajan <[email protected]>
---
include/net/cfg80211.h | 6 ++++++
include/uapi/linux/nl80211.h | 11 ++++++++++-
net/wireless/nl80211.c | 11 ++++++++++-
3 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 0d62b5853929..31ef11700bad 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1331,6 +1331,7 @@ struct cfg80211_unsol_bcast_probe_resp {
* @punct_bitmap: Preamble puncturing bitmap. Each bit represents
* a 20 MHz channel, lowest bit corresponding to the lowest channel.
* Bit set to 1 indicates that the channel is punctured.
+ * @ap_ps_enable: enable/disable ap power save.
*/
struct cfg80211_ap_settings {
struct cfg80211_chan_def chandef;
@@ -1366,6 +1367,7 @@ struct cfg80211_ap_settings {
struct cfg80211_unsol_bcast_probe_resp unsol_bcast_probe_resp;
struct cfg80211_mbssid_config mbssid_config;
u16 punct_bitmap;
+ bool ap_ps_enable;
};

/**
@@ -1376,9 +1378,13 @@ validation flags
* to indicate the valid settings in struct cfg80211_ap_settings.
*
* @BEACON_VALID: beacon setting is valid.
+ * @AP_PS_VALID: AP PS setting is valid.
*/
enum cfg80211_ap_settings_valid {
BEACON_VALID,
+ AP_PS_VALID,
+
+ /* keep last */
LAST_VALID,
};

diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index e7b7d8031582..e2b1e40d3f57 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -401,7 +401,8 @@
* attributes. For drivers that generate the beacon and probe responses
* internally, the following attributes must be provided for the
* beacon update: %NL80211_ATTR_IE, %NL80211_ATTR_IE_PROBE_RESP and
- * %NL80211_ATTR_IE_ASSOC_RESP.
+ * %NL80211_ATTR_IE_ASSOC_RESP. This following attribute must be
+ * provided for the ap power save: %NL80211_ATTR_AP_PS.
* @NL80211_CMD_START_AP: Start AP operation on an AP interface, parameters
* are like for %NL80211_CMD_UPDATE_AP, and additionally parameters that
* do not change are used, these include %NL80211_ATTR_BEACON_INTERVAL,
@@ -2745,6 +2746,12 @@ enum nl80211_commands {
* enumerated in &enum nl80211_ap_settings_flags. This attribute shall be
* used with %NL80211_CMD_START_AP request.
*
+ * @NL80211_ATTR_AP_PS: enable/disable AP power save.
+ * This attribute type is NLA_FLAG and valid input is 0 or 1.
+ * 0 for disable AP power save mode.
+ * 1 for enable AP power save mode.
+ * This attribute shall be used with %%NL80211_CMD_UPDATE_AP.
+ *
* @NL80211_ATTR_EHT_CAPABILITY: EHT Capability information element (from
* association request when used with NL80211_CMD_NEW_STATION). Can be set
* only if %NL80211_STA_FLAG_WME is set.
@@ -3331,6 +3338,8 @@ enum nl80211_attrs {
NL80211_ATTR_MAX_HW_TIMESTAMP_PEERS,
NL80211_ATTR_HW_TIMESTAMP_ENABLED,

+ NL80211_ATTR_AP_PS,
+
/* add attributes here, update the policy in nl80211.c */

__NL80211_ATTR_AFTER_LAST,
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index a45bda39d8ab..b3f6dc8e1543 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -809,6 +809,7 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {

[NL80211_ATTR_MAX_HW_TIMESTAMP_PEERS] = { .type = NLA_U16 },
[NL80211_ATTR_HW_TIMESTAMP_ENABLED] = { .type = NLA_FLAG },
+ [NL80211_ATTR_AP_PS] = { .type = NLA_FLAG },
};

/* policy for the key attributes */
@@ -6150,6 +6151,7 @@ static int nl80211_update_ap(struct sk_buff *skb, struct genl_info *info)
struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_ap_update params;
int err;
+ bool haveinfo = false;

if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP &&
dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO)
@@ -6163,9 +6165,16 @@ static int nl80211_update_ap(struct sk_buff *skb, struct genl_info *info)

memset(&params, 0, sizeof(params));

+ if (info->attrs[NL80211_ATTR_AP_PS]) {
+ params.settings.ap_ps_enable =
+ !!nla_get_flag(info->attrs[NL80211_ATTR_AP_PS]);
+ set_bit(AP_PS_VALID, params.valid);
+ haveinfo = true;
+ }
+
err = nl80211_parse_beacon(rdev, info->attrs,
&params.settings.beacon);
- if (err)
+ if (err && !haveinfo)
goto out;

set_bit(BEACON_VALID, params.valid);
--
2.25.1


2023-03-20 16:53:14

by Maharaja Kennadyrajan

[permalink] [raw]
Subject: [PATCH v2 3/4] wifi: mac80211: notify BSS change upon AP power save change

From: Venkateswara Naralasetty <[email protected]>

Notify BSS change to the drivers upon AP power save
changes through ieee80211_vif_cfg_change_notify().

BSS_CHANGED_PS is reused to notify the AP power save
change, which is currently used only for STA mode.

A new hw flag IEEE80211_HW_SUPPORTS_AP_PS is introduced
for backward compatibility and notify the AP power save
change to the drivers which support AP power save.

Signed-off-by: Venkateswara Naralasetty <[email protected]>
Signed-off-by: Maharaja Kennadyrajan <[email protected]>
---
include/net/mac80211.h | 7 ++++++-
net/mac80211/cfg.c | 23 +++++++++++++++++------
net/mac80211/debugfs.c | 1 +
3 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index f12edca660ba..963607b64226 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -318,7 +318,7 @@ struct ieee80211_vif_chanctx_switch {
* @BSS_CHANGED_IDLE: Idle changed for this BSS/interface.
* @BSS_CHANGED_SSID: SSID changed for this BSS (AP and IBSS mode)
* @BSS_CHANGED_AP_PROBE_RESP: Probe Response changed for this BSS (AP mode)
- * @BSS_CHANGED_PS: PS changed for this BSS (STA mode)
+ * @BSS_CHANGED_PS: PS changed for this BSS (AP and STA mode)
* @BSS_CHANGED_TXPOWER: TX power setting changed for this interface
* @BSS_CHANGED_P2P_PS: P2P powersave settings (CTWindow, opportunistic PS)
* changed
@@ -683,6 +683,7 @@ struct ieee80211_fils_discovery {
* beamformee
* @eht_mu_beamformer: in AP-mode, does this BSS enable operation as an EHT MU
* beamformer
+ * @ap_ps_enable: enable/disable ap power save.
*/
struct ieee80211_bss_conf {
struct ieee80211_vif *vif;
@@ -776,6 +777,7 @@ struct ieee80211_bss_conf {
bool eht_su_beamformer;
bool eht_su_beamformee;
bool eht_mu_beamformer;
+ bool ap_ps_enable;
};

/**
@@ -2646,6 +2648,8 @@ struct ieee80211_txq {
* @IEEE80211_HW_MLO_MCAST_MULTI_LINK_TX: Hardware/driver handles transmitting
* multicast frames on all links, mac80211 should not do that.
*
+ * @IEEE80211_HW_SUPPORTS_AP_PS: Hardware supports AP power save.
+ *
* @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays
*/
enum ieee80211_hw_flags {
@@ -2703,6 +2707,7 @@ enum ieee80211_hw_flags {
IEEE80211_HW_SUPPORTS_CONC_MON_RX_DECAP,
IEEE80211_HW_DETECTS_COLOR_COLLISION,
IEEE80211_HW_MLO_MCAST_MULTI_LINK_TX,
+ IEEE80211_HW_SUPPORTS_AP_PS,

/* keep last, obviously */
NUM_IEEE80211_HW_FLAGS
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 657be3d4dfcd..a9aec880721a 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1468,6 +1468,7 @@ static int ieee80211_update_ap(struct wiphy *wiphy, struct net_device *dev,
struct beacon_data *old;
int err;
struct ieee80211_bss_conf *link_conf;
+ u32 changed = 0;

sdata_assert_lock(sdata);

@@ -1488,20 +1489,30 @@ static int ieee80211_update_ap(struct wiphy *wiphy, struct net_device *dev,
if (!old)
return -ENOENT;

- err = ieee80211_assign_beacon(sdata, link, &params->settings.beacon,
- NULL, NULL);
- if (err < 0)
- return err;
+ if (test_bit(BEACON_VALID, params->valid)) {
+ err = ieee80211_assign_beacon(sdata, link, &params->settings.beacon,
+ NULL, NULL);
+ if (err < 0)
+ return err;
+
+ changed |= err;
+ }
+
+ if (ieee80211_hw_check(&sdata->local->hw, SUPPORTS_AP_PS) &&
+ test_bit(AP_PS_VALID, params->valid)) {
+ sdata->vif.bss_conf.ap_ps_enable = params->settings.ap_ps_enable;
+ changed |= BSS_CHANGED_PS;
+ }

if (params->settings.beacon.he_bss_color_valid &&
params->settings.beacon.he_bss_color.enabled !=
link_conf->he_bss_color.enabled) {
link_conf->he_bss_color.enabled =
params->settings.beacon.he_bss_color.enabled;
- err |= BSS_CHANGED_HE_BSS_COLOR;
+ changed |= BSS_CHANGED_HE_BSS_COLOR;
}

- ieee80211_link_info_change_notify(sdata, link, err);
+ ieee80211_vif_cfg_change_notify(sdata, changed);
return 0;
}

diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index dfb9f55e2685..9cf744917a5f 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -496,6 +496,7 @@ static const char *hw_flag_names[] = {
FLAG(SUPPORTS_CONC_MON_RX_DECAP),
FLAG(DETECTS_COLOR_COLLISION),
FLAG(MLO_MCAST_MULTI_LINK_TX),
+ FLAG(SUPPORTS_AP_PS),
#undef FLAG
};

--
2.25.1


2023-03-20 16:53:15

by Maharaja Kennadyrajan

[permalink] [raw]
Subject: [PATCH v2 4/4] wifi: ath11k: add AP power save support

From: Venkateswara Naralasetty <[email protected]>

AP goes into the power save mode if no stations
are connected and it will come out of power save
as and when any of the station associate to it.

Driver will advertise this flag SUPPORTS_AP_PS to
enable the AP power save in mac80211.

This AP power save capability can be used to save
power with the drawback of reduced range or delayed
discovery of the AP.

This feature is enabled in QCN9074, IPQ8074, IPQ5018, QCN6122.

Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1

Signed-off-by: Maharaja Kennadyrajan <[email protected]>
Signed-off-by: Venkateswara Naralasetty <[email protected]>
---
drivers/net/wireless/ath/ath11k/core.c | 8 ++++
drivers/net/wireless/ath/ath11k/core.h | 8 ++++
drivers/net/wireless/ath/ath11k/hw.h | 1 +
drivers/net/wireless/ath/ath11k/mac.c | 58 ++++++++++++++++++++++++++
drivers/net/wireless/ath/ath11k/wmi.c | 32 ++++++++++++++
drivers/net/wireless/ath/ath11k/wmi.h | 8 ++++
6 files changed, 115 insertions(+)

diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
index 75fdbe4ef83a..5cf9203b751e 100644
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -117,6 +117,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.tx_ring_size = DP_TCL_DATA_RING_SIZE,
.smp2p_wow_exit = false,
.ftm_responder = true,
+ .supports_ap_ps = true,
},
{
.hw_rev = ATH11K_HW_IPQ6018_HW10,
@@ -200,6 +201,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.smp2p_wow_exit = false,
.support_fw_mac_sequence = false,
.ftm_responder = true,
+ .supports_ap_ps = true,
},
{
.name = "qca6390 hw2.0",
@@ -285,6 +287,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.smp2p_wow_exit = false,
.support_fw_mac_sequence = true,
.ftm_responder = false,
+ .supports_ap_ps = false,
},
{
.name = "qcn9074 hw1.0",
@@ -367,6 +370,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.smp2p_wow_exit = false,
.support_fw_mac_sequence = false,
.ftm_responder = true,
+ .supports_ap_ps = true,
},
{
.name = "wcn6855 hw2.0",
@@ -452,6 +456,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.smp2p_wow_exit = false,
.support_fw_mac_sequence = true,
.ftm_responder = false,
+ .supports_ap_ps = false,
},
{
.name = "wcn6855 hw2.1",
@@ -535,6 +540,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.smp2p_wow_exit = false,
.support_fw_mac_sequence = true,
.ftm_responder = false,
+ .supports_ap_ps = false,
},
{
.name = "wcn6750 hw1.0",
@@ -616,6 +622,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.smp2p_wow_exit = true,
.support_fw_mac_sequence = true,
.ftm_responder = false,
+ .supports_ap_ps = false,
},
{
.hw_rev = ATH11K_HW_IPQ5018_HW10,
@@ -696,6 +703,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.smp2p_wow_exit = false,
.support_fw_mac_sequence = false,
.ftm_responder = true,
+ .supports_ap_ps = true,
},
};

diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h
index 0830276e5028..fefb1fb5220d 100644
--- a/drivers/net/wireless/ath/ath11k/core.h
+++ b/drivers/net/wireless/ath/ath11k/core.h
@@ -363,6 +363,7 @@ struct ath11k_vif {
struct ieee80211_chanctx_conf chanctx;
struct ath11k_arp_ns_offload arp_ns_offload;
struct ath11k_rekey_data rekey_data;
+ bool vif_ap_ps_enabled;

#ifdef CONFIG_ATH11K_DEBUGFS
struct dentry *debugfs_twt;
@@ -589,6 +590,11 @@ struct ath11k_per_peer_tx_stats {
#define ATH11K_FLUSH_TIMEOUT (5 * HZ)
#define ATH11K_VDEV_DELETE_TIMEOUT_HZ (5 * HZ)

+enum ath11k_ap_ps_state {
+ ATH11K_AP_PS_STATE_OFF,
+ ATH11K_AP_PS_STATE_ON,
+};
+
struct ath11k {
struct ath11k_base *ab;
struct ath11k_pdev *pdev;
@@ -732,6 +738,8 @@ struct ath11k {
/* protected by conf_mutex */
bool ps_state_enable;
bool ps_timekeeper_enable;
+ bool ap_ps_enabled;
+ enum ath11k_ap_ps_state ap_ps_state;
};

struct ath11k_band_cap {
diff --git a/drivers/net/wireless/ath/ath11k/hw.h b/drivers/net/wireless/ath/ath11k/hw.h
index 0be4e1232384..40953e117cc5 100644
--- a/drivers/net/wireless/ath/ath11k/hw.h
+++ b/drivers/net/wireless/ath/ath11k/hw.h
@@ -225,6 +225,7 @@ struct ath11k_hw_params {
bool smp2p_wow_exit;
bool support_fw_mac_sequence;
bool ftm_responder;
+ bool supports_ap_ps;
};

struct ath11k_hw_ops {
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index cad832e0e6b8..db0d772ff7c7 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -3215,6 +3215,43 @@ static int ath11k_mac_config_obss_pd(struct ath11k *ar,
return 0;
}

+void ath11k_mac_ap_ps_recalc(struct ath11k *ar)
+{
+ struct ath11k_vif *arvif;
+ enum ath11k_ap_ps_state state = ATH11K_AP_PS_STATE_OFF;
+ int ret;
+ bool allow_ap_ps = true;
+
+ lockdep_assert_held(&ar->conf_mutex);
+
+ list_for_each_entry(arvif, &ar->arvifs, list) {
+ if (arvif->vdev_type == WMI_VDEV_TYPE_STA ||
+ !arvif->vif_ap_ps_enabled) {
+ allow_ap_ps = false;
+ break;
+ }
+ }
+
+ if (!allow_ap_ps)
+ ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "ap ps is not allowed\n");
+
+ if (allow_ap_ps && !ar->num_stations && ar->ap_ps_enabled)
+ state = ATH11K_AP_PS_STATE_ON;
+
+ if (ar->ap_ps_state == state)
+ return;
+
+ ret = ath11k_wmi_pdev_ap_ps_cmd_send(ar, ar->pdev->pdev_id, state);
+ if (ret) {
+ ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
+ "failed to send ap ps command pdev_id %u state %u\n",
+ ar->pdev->pdev_id, state);
+ return;
+ }
+
+ ar->ap_ps_state = state;
+}
+
static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct ieee80211_bss_conf *info,
@@ -3567,6 +3604,16 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
vif->addr, arvif->arp_ns_offload.ipv4_addr);
}

+ if ((changed & BSS_CHANGED_PS) && vif->type == NL80211_IFTYPE_AP) {
+ if (!info->ap_ps_enable)
+ arvif->vif_ap_ps_enabled = false;
+ else
+ arvif->vif_ap_ps_enabled = true;
+
+ ar->ap_ps_enabled = info->ap_ps_enable;
+ ath11k_mac_ap_ps_recalc(ar);
+ }
+
mutex_unlock(&ar->conf_mutex);
}

@@ -4651,6 +4698,8 @@ static int ath11k_mac_station_add(struct ath11k *ar,
ath11k_dbg(ab, ATH11K_DBG_MAC, "Added peer: %pM for VDEV: %d\n",
sta->addr, arvif->vdev_id);

+ ath11k_mac_ap_ps_recalc(ar);
+
if (ath11k_debugfs_is_extd_tx_stats_enabled(ar)) {
arsta->tx_stats = kzalloc(sizeof(*arsta->tx_stats), GFP_KERNEL);
if (!arsta->tx_stats) {
@@ -4810,6 +4859,8 @@ static int ath11k_mac_op_sta_state(struct ieee80211_hw *hw,

kfree(arsta->rx_stats);
arsta->rx_stats = NULL;
+
+ ath11k_mac_ap_ps_recalc(ar);
} else if (old_state == IEEE80211_STA_AUTH &&
new_state == IEEE80211_STA_ASSOC &&
(vif->type == NL80211_IFTYPE_AP ||
@@ -6599,6 +6650,8 @@ static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw,
ret);
}

+ ath11k_mac_ap_ps_recalc(ar);
+
mutex_unlock(&ar->conf_mutex);

return 0;
@@ -6703,6 +6756,8 @@ static void ath11k_mac_op_remove_interface(struct ieee80211_hw *hw,

ath11k_debugfs_remove_interface(arvif);

+ ath11k_mac_ap_ps_recalc(ar);
+
/* TODO: recal traffic pause state based on the available vdevs */

mutex_unlock(&ar->conf_mutex);
@@ -9122,6 +9177,9 @@ static int __ath11k_mac_register(struct ath11k *ar)
ieee80211_hw_set(ar->hw, USES_RSS);
}

+ if (ar->ab->hw_params.supports_ap_ps)
+ ieee80211_hw_set(ar->hw, SUPPORTS_AP_PS);
+
ar->hw->wiphy->features |= NL80211_FEATURE_STATIC_SMPS;
ar->hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;

diff --git a/drivers/net/wireless/ath/ath11k/wmi.c b/drivers/net/wireless/ath/ath11k/wmi.c
index 27f3fceb33c5..02b14ba6ad45 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -1290,6 +1290,38 @@ ath11k_wmi_rx_reord_queue_remove(struct ath11k *ar,
return ret;
}

+int ath11k_wmi_pdev_ap_ps_cmd_send(struct ath11k *ar, u32 pdev_id,
+ u32 param_value)
+{
+ struct ath11k_pdev_wmi *wmi = ar->wmi;
+ struct wmi_pdev_ap_ps_cmd *cmd;
+ struct sk_buff *skb;
+ int ret;
+
+ skb = ath11k_wmi_alloc_skb(wmi->wmi_ab, sizeof(*cmd));
+ if (!skb)
+ return -ENOMEM;
+
+ cmd = (struct wmi_pdev_ap_ps_cmd *)skb->data;
+ cmd->tlv_header = FIELD_PREP(WMI_TLV_TAG,
+ WMI_TAG_PDEV_GREEN_AP_PS_ENABLE_CMD) |
+ FIELD_PREP(WMI_TLV_LEN, sizeof(*cmd) - TLV_HDR_SIZE);
+ cmd->pdev_id = pdev_id;
+ cmd->param_value = param_value;
+
+ ret = ath11k_wmi_cmd_send(wmi, skb, WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID);
+ if (ret) {
+ ath11k_warn(ar->ab, "failed to send ap ps enable/disable cmd\n");
+ dev_kfree_skb(skb);
+ }
+
+ ath11k_dbg(ar->ab, ATH11K_DBG_WMI,
+ "wmi pdev ap ps set pdev id %d value %d\n",
+ pdev_id, param_value);
+
+ return ret;
+}
+
int ath11k_wmi_pdev_set_param(struct ath11k *ar, u32 param_id,
u32 param_value, u8 pdev_id)
{
diff --git a/drivers/net/wireless/ath/ath11k/wmi.h b/drivers/net/wireless/ath/ath11k/wmi.h
index b23b7a22bc9a..8b37dd935a95 100644
--- a/drivers/net/wireless/ath/ath11k/wmi.h
+++ b/drivers/net/wireless/ath/ath11k/wmi.h
@@ -3037,6 +3037,12 @@ struct wmi_fwtest_set_param_cmd_param {
u32 param_value;
};

+struct wmi_pdev_ap_ps_cmd {
+ u32 tlv_header;
+ u32 pdev_id;
+ u32 param_value;
+} __packed;
+
struct wmi_pdev_set_param_cmd {
u32 tlv_header;
u32 pdev_id;
@@ -6445,5 +6451,7 @@ int ath11k_wmi_pdev_set_bios_sar_table_param(struct ath11k *ar, const u8 *sar_va
int ath11k_wmi_pdev_set_bios_geo_table_param(struct ath11k *ar);
int ath11k_wmi_sta_keepalive(struct ath11k *ar,
const struct wmi_sta_keepalive_arg *arg);
+int ath11k_wmi_pdev_ap_ps_cmd_send(struct ath11k *ar, u32 pdev_id,
+ u32 value);

#endif
--
2.25.1


2023-03-20 16:53:17

by Maharaja Kennadyrajan

[permalink] [raw]
Subject: [PATCH v2 1/4] wifi: nl80211: rename NL80211_CMD_SET_BEACON to NL80211_CMD_UDPATE_AP

From: Venkateswara Naralasetty <[email protected]>

Currently NL80211_CMD_SET_BEACON is limited to set only few AP
parameters. Renaming NL80211_CMD_SET_BEACON to NL80211_UPDATE_AP
would help users to configure more AP parameters which can vary
at the runtime of the BSS.

Replacing the argument 'struct cfg80211_beacon_data' parameter
with 'struct cfg80211_ap_settings' in the callback function for
this command, which has more information about AP parameters
along with the struct cfg80211_beacon_data.

Signed-off-by: Venkateswara Naralasetty <[email protected]>
Signed-off-by: Maharaja Kennadyrajan <[email protected]>
---
drivers/net/wireless/ath/ath6kl/cfg80211.c | 11 +--
drivers/net/wireless/ath/wil6210/cfg80211.c | 14 ++--
.../broadcom/brcm80211/brcmfmac/cfg80211.c | 11 +--
.../net/wireless/marvell/mwifiex/cfg80211.c | 15 ++--
.../wireless/microchip/wilc1000/cfg80211.c | 11 +--
.../net/wireless/quantenna/qtnfmac/cfg80211.c | 11 +--
.../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 12 +++-
include/net/cfg80211.h | 36 ++++++++--
include/uapi/linux/nl80211.h | 19 ++---
net/mac80211/cfg.c | 20 +++---
net/wireless/nl80211.c | 21 +++---
net/wireless/rdev-ops.h | 10 +--
net/wireless/trace.h | 70 ++++++++++---------
13 files changed, 165 insertions(+), 96 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 0c2b8b1a10d5..126c0c156e77 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -2953,8 +2953,8 @@ static int ath6kl_start_ap(struct wiphy *wiphy, struct net_device *dev,
return 0;
}

-static int ath6kl_change_beacon(struct wiphy *wiphy, struct net_device *dev,
- struct cfg80211_beacon_data *beacon)
+static int ath6kl_update_ap(struct wiphy *wiphy, struct net_device *dev,
+ struct cfg80211_ap_update *params)
{
struct ath6kl_vif *vif = netdev_priv(dev);

@@ -2964,7 +2964,10 @@ static int ath6kl_change_beacon(struct wiphy *wiphy, struct net_device *dev,
if (vif->next_mode != AP_NETWORK)
return -EOPNOTSUPP;

- return ath6kl_set_ies(vif, beacon);
+ if (!test_bit(BEACON_VALID, params->valid))
+ return 0;
+
+ return ath6kl_set_ies(vif, &params->settings.beacon);
}

static int ath6kl_stop_ap(struct wiphy *wiphy, struct net_device *dev,
@@ -3456,7 +3459,7 @@ static struct cfg80211_ops ath6kl_cfg80211_ops = {
.resume = __ath6kl_cfg80211_resume,
#endif
.start_ap = ath6kl_start_ap,
- .change_beacon = ath6kl_change_beacon,
+ .update_ap = ath6kl_update_ap,
.stop_ap = ath6kl_stop_ap,
.del_station = ath6kl_del_station,
.change_station = ath6kl_change_station,
diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c
index 40f9a7ef8980..01838d7ccfe6 100644
--- a/drivers/net/wireless/ath/wil6210/cfg80211.c
+++ b/drivers/net/wireless/ath/wil6210/cfg80211.c
@@ -2080,17 +2080,21 @@ void wil_cfg80211_ap_recovery(struct wil6210_priv *wil)
}
}

-static int wil_cfg80211_change_beacon(struct wiphy *wiphy,
- struct net_device *ndev,
- struct cfg80211_beacon_data *bcon)
+static int wil_cfg80211_update_ap(struct wiphy *wiphy,
+ struct net_device *ndev,
+ struct cfg80211_ap_update *params)
{
struct wil6210_priv *wil = wiphy_to_wil(wiphy);
struct wireless_dev *wdev = ndev->ieee80211_ptr;
struct wil6210_vif *vif = ndev_to_vif(ndev);
+ struct cfg80211_beacon_data *bcon = &params->settings.beacon;
int rc;
u32 privacy = 0;

- wil_dbg_misc(wil, "change_beacon, mid=%d\n", vif->mid);
+ if (!test_bit(BEACON_VALID, params->valid))
+ return 0;
+
+ wil_dbg_misc(wil, "update_ap, mid=%d\n", vif->mid);
wil_print_bcon_data(bcon);

if (bcon->tail &&
@@ -2654,7 +2658,7 @@ static const struct cfg80211_ops wil_cfg80211_ops = {
.del_key = wil_cfg80211_del_key,
.set_default_key = wil_cfg80211_set_default_key,
/* AP mode */
- .change_beacon = wil_cfg80211_change_beacon,
+ .update_ap = wil_cfg80211_update_ap,
.start_ap = wil_cfg80211_start_ap,
.stop_ap = wil_cfg80211_stop_ap,
.add_station = wil_cfg80211_add_station,
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index e0a70a671550..6375f188a879 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -5410,14 +5410,17 @@ 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_beacon_data *info)
+brcmf_cfg80211_update_ap(struct wiphy *wiphy, struct net_device *ndev,
+ struct cfg80211_ap_update *params)
{
struct brcmf_if *ifp = netdev_priv(ndev);

+ if (!test_bit(BEACON_VALID, params->valid))
+ return 0;
+
brcmf_dbg(TRACE, "Enter\n");

- return brcmf_config_ap_mgmt_ie(ifp->vif, info);
+ return brcmf_config_ap_mgmt_ie(ifp->vif, &params->settings.beacon);
}

static int
@@ -5945,7 +5948,7 @@ static struct cfg80211_ops brcmf_cfg80211_ops = {
.flush_pmksa = brcmf_cfg80211_flush_pmksa,
.start_ap = brcmf_cfg80211_start_ap,
.stop_ap = brcmf_cfg80211_stop_ap,
- .change_beacon = brcmf_cfg80211_change_beacon,
+ .update_ap = brcmf_cfg80211_update_ap,
.del_station = brcmf_cfg80211_del_station,
.change_station = brcmf_cfg80211_change_station,
.sched_scan_start = brcmf_cfg80211_sched_scan_start,
diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
index bcd564dc3554..1d70c5c5ee6a 100644
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
@@ -1830,12 +1830,12 @@ static int mwifiex_cfg80211_set_cqm_rssi_config(struct wiphy *wiphy,
return 0;
}

-/* cfg80211 operation handler for change_beacon.
+/* cfg80211 operation handler for update_ap.
* Function retrieves and sets modified management IEs to FW.
*/
-static int mwifiex_cfg80211_change_beacon(struct wiphy *wiphy,
- struct net_device *dev,
- struct cfg80211_beacon_data *data)
+static int mwifiex_cfg80211_update_ap(struct wiphy *wiphy,
+ struct net_device *dev,
+ struct cfg80211_ap_update *params)
{
struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
struct mwifiex_adapter *adapter = priv->adapter;
@@ -1854,7 +1854,10 @@ static int mwifiex_cfg80211_change_beacon(struct wiphy *wiphy,
return -EINVAL;
}

- if (mwifiex_set_mgmt_ies(priv, data)) {
+ if (!test_bit(BEACON_VALID, params->valid))
+ return 0;
+
+ if (mwifiex_set_mgmt_ies(priv, &params->settings.beacon)) {
mwifiex_dbg(priv->adapter, ERROR,
"%s: setting mgmt ies failed\n", __func__);
return -EFAULT;
@@ -4230,7 +4233,7 @@ static struct cfg80211_ops mwifiex_cfg80211_ops = {
.set_bitrate_mask = mwifiex_cfg80211_set_bitrate_mask,
.start_ap = mwifiex_cfg80211_start_ap,
.stop_ap = mwifiex_cfg80211_stop_ap,
- .change_beacon = mwifiex_cfg80211_change_beacon,
+ .update_ap = mwifiex_cfg80211_update_ap,
.set_cqm_rssi_config = mwifiex_cfg80211_set_cqm_rssi_config,
.set_antenna = mwifiex_cfg80211_set_antenna,
.get_antenna = mwifiex_cfg80211_get_antenna,
diff --git a/drivers/net/wireless/microchip/wilc1000/cfg80211.c b/drivers/net/wireless/microchip/wilc1000/cfg80211.c
index b545d93c6e37..c475e874c200 100644
--- a/drivers/net/wireless/microchip/wilc1000/cfg80211.c
+++ b/drivers/net/wireless/microchip/wilc1000/cfg80211.c
@@ -1440,12 +1440,15 @@ static int start_ap(struct wiphy *wiphy, struct net_device *dev,
settings->dtim_period, &settings->beacon);
}

-static int change_beacon(struct wiphy *wiphy, struct net_device *dev,
- struct cfg80211_beacon_data *beacon)
+static int update_ap(struct wiphy *wiphy, struct net_device *dev,
+ struct cfg80211_ap_update *params)
{
struct wilc_vif *vif = netdev_priv(dev);

- return wilc_add_beacon(vif, 0, 0, beacon);
+ if (!test_bit(BEACON_VALID, params->valid))
+ return 0;
+
+ return wilc_add_beacon(vif, 0, 0, &params->settings.beacon);
}

static int stop_ap(struct wiphy *wiphy, struct net_device *dev,
@@ -1724,7 +1727,7 @@ static const struct cfg80211_ops wilc_cfg80211_ops = {
.change_virtual_intf = change_virtual_intf,

.start_ap = start_ap,
- .change_beacon = change_beacon,
+ .update_ap = update_ap,
.stop_ap = stop_ap,
.add_station = add_station,
.del_station = del_station,
diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
index 73e6f9408b51..ad2140849c12 100644
--- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
+++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
@@ -330,12 +330,15 @@ static int qtnf_mgmt_set_appie(struct qtnf_vif *vif,
return ret;
}

-static int qtnf_change_beacon(struct wiphy *wiphy, struct net_device *dev,
- struct cfg80211_beacon_data *info)
+static int qtnf_update_ap(struct wiphy *wiphy, struct net_device *dev,
+ struct cfg80211_ap_update *params)
{
struct qtnf_vif *vif = qtnf_netdev_get_priv(dev);

- return qtnf_mgmt_set_appie(vif, info);
+ if (!test_bit(BEACON_VALID, params->valid))
+ return 0;
+
+ return qtnf_mgmt_set_appie(vif, &params->settings.beacon);
}

static int qtnf_start_ap(struct wiphy *wiphy, struct net_device *dev,
@@ -1003,7 +1006,7 @@ static struct cfg80211_ops qtn_cfg80211_ops = {
.change_virtual_intf = qtnf_change_virtual_intf,
.del_virtual_intf = qtnf_del_virtual_intf,
.start_ap = qtnf_start_ap,
- .change_beacon = qtnf_change_beacon,
+ .update_ap = qtnf_update_ap,
.stop_ap = qtnf_stop_ap,
.set_wiphy_params = qtnf_set_wiphy_params,
.update_mgmt_frame_registrations =
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index 54004f846cf0..0b76063bd399 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -2350,10 +2350,16 @@ static int cfg80211_rtw_start_ap(struct wiphy *wiphy, struct net_device *ndev,
return ret;
}

-static int cfg80211_rtw_change_beacon(struct wiphy *wiphy, struct net_device *ndev,
- struct cfg80211_beacon_data *info)
+static int cfg80211_rtw_update_ap(struct wiphy *wiphy,
+ struct net_device *ndev,
+ struct cfg80211_ap_update *params)
+
{
struct adapter *adapter = rtw_netdev_priv(ndev);
+ struct cfg80211_beacon_data *info = &params->settings.beacon;
+
+ if (!test_bit(BEACON_VALID, params->valid))
+ return 0;

return rtw_add_beacon(adapter, info->head, info->head_len, info->tail, info->tail_len);
}
@@ -2759,7 +2765,7 @@ static struct cfg80211_ops rtw_cfg80211_ops = {
.del_virtual_intf = cfg80211_rtw_del_virtual_intf,

.start_ap = cfg80211_rtw_start_ap,
- .change_beacon = cfg80211_rtw_change_beacon,
+ .update_ap = cfg80211_rtw_update_ap,
.stop_ap = cfg80211_rtw_stop_ap,

.add_station = cfg80211_rtw_add_station,
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 7cebba1c4135..0d62b5853929 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1368,6 +1368,34 @@ struct cfg80211_ap_settings {
u16 punct_bitmap;
};

+/**
+ * enum cfg80211_ap_settings_valid - struct cfg80211_ap_settings
+validation flags
+ *
+ * These flags are used with the nl80211_update_ap() callback
+ * to indicate the valid settings in struct cfg80211_ap_settings.
+ *
+ * @BEACON_VALID: beacon setting is valid.
+ */
+enum cfg80211_ap_settings_valid {
+ BEACON_VALID,
+ LAST_VALID,
+};
+
+/**
+ * struct cfg80211_ap_update - updated AP configuration
+ *
+ * Used to update the AP parameters in run time.
+ *
+ * @changed: Indicate the valid parameters in struct
+cfg80211_ap_settings
+ * @settings: updated AP settings
+ */
+struct cfg80211_ap_update {
+ DECLARE_BITMAP(valid, LAST_VALID);
+ struct cfg80211_ap_settings settings;
+};
+
/**
* struct cfg80211_csa_settings - channel switch settings
*
@@ -4024,8 +4052,8 @@ struct mgmt_frame_regs {
* @set_rekey_data: give the data necessary for GTK rekeying to the driver
*
* @start_ap: Start acting in AP mode defined by the parameters.
- * @change_beacon: Change the beacon parameters for an access point mode
- * interface. This should reject the call when AP mode wasn't started.
+ * @update_ap: Update parameters for an access point mode interface.
+ * This should reject the call when AP mode wasn't started.
* @stop_ap: Stop being an AP, including stopping beaconing.
*
* @add_station: Add a new station.
@@ -4392,8 +4420,8 @@ 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_beacon_data *info);
+ int (*update_ap)(struct wiphy *wiphy, struct net_device *dev,
+ struct cfg80211_ap_update *params);
int (*stop_ap)(struct wiphy *wiphy, struct net_device *dev,
unsigned int link_id);

diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 9a0ac0363f1f..e7b7d8031582 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -395,13 +395,15 @@
* %NL80211_ATTR_MLO_LINK_ID.
*
* @NL80211_CMD_GET_BEACON: (not used)
- * @NL80211_CMD_SET_BEACON: change the beacon on an access point interface
+ * @NL80211_CMD_UPDATE_AP: Update AP parameters which can vary at the
+ * runtime of BSS. change the beacon on an access point interface
* using the %NL80211_ATTR_BEACON_HEAD and %NL80211_ATTR_BEACON_TAIL
* attributes. For drivers that generate the beacon and probe responses
- * internally, the following attributes must be provided: %NL80211_ATTR_IE,
- * %NL80211_ATTR_IE_PROBE_RESP and %NL80211_ATTR_IE_ASSOC_RESP.
+ * internally, the following attributes must be provided for the
+ * beacon update: %NL80211_ATTR_IE, %NL80211_ATTR_IE_PROBE_RESP and
+ * %NL80211_ATTR_IE_ASSOC_RESP.
* @NL80211_CMD_START_AP: Start AP operation on an AP interface, parameters
- * are like for %NL80211_CMD_SET_BEACON, and additionally parameters that
+ * are like for %NL80211_CMD_UPDATE_AP, and additionally parameters that
* do not change are used, these include %NL80211_ATTR_BEACON_INTERVAL,
* %NL80211_ATTR_DTIM_PERIOD, %NL80211_ATTR_SSID,
* %NL80211_ATTR_HIDDEN_SSID, %NL80211_ATTR_CIPHERS_PAIRWISE,
@@ -1332,7 +1334,8 @@ enum nl80211_commands {
NL80211_CMD_DEL_KEY,

NL80211_CMD_GET_BEACON,
- NL80211_CMD_SET_BEACON,
+ NL80211_CMD_UPDATE_AP,
+ NL80211_CMD_SET_BEACON = NL80211_CMD_UPDATE_AP,
NL80211_CMD_START_AP,
NL80211_CMD_NEW_BEACON = NL80211_CMD_START_AP,
NL80211_CMD_STOP_AP,
@@ -2050,12 +2053,12 @@ enum nl80211_commands {
* &enum nl80211_hidden_ssid, represented as a u32
*
* @NL80211_ATTR_IE_PROBE_RESP: Information element(s) for Probe Response frame.
- * This is used with %NL80211_CMD_NEW_BEACON and %NL80211_CMD_SET_BEACON to
+ * This is used with %NL80211_CMD_NEW_BEACON and %NL80211_CMD_UPDATE_AP to
* provide extra IEs (e.g., WPS/P2P IE) into Probe Response frames when the
* driver (or firmware) replies to Probe Request frames.
* @NL80211_ATTR_IE_ASSOC_RESP: Information element(s) for (Re)Association
* Response frames. This is used with %NL80211_CMD_NEW_BEACON and
- * %NL80211_CMD_SET_BEACON to provide extra IEs (e.g., WPS/P2P IE) into
+ * %NL80211_CMD_UPDATE_AP to provide extra IEs (e.g., WPS/P2P IE) into
* (Re)Association Response frames when the driver (or firmware) replies to
* (Re)Association Request frames.
*
@@ -2581,7 +2584,7 @@ enum nl80211_commands {
* only if %NL80211_STA_FLAG_WME is set.
*
* @NL80211_ATTR_FTM_RESPONDER: nested attribute which user-space can include
- * in %NL80211_CMD_START_AP or %NL80211_CMD_SET_BEACON for fine timing
+ * in %NL80211_CMD_START_AP or %NL80211_CMD_UPDATE_AP for fine timing
* measurement (FTM) responder functionality and containing parameters as
* possible, see &enum nl80211_ftm_responder_attr
*
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 760ad934f9e1..657be3d4dfcd 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1460,8 +1460,8 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
return err;
}

-static int ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev,
- struct cfg80211_beacon_data *params)
+static int ieee80211_update_ap(struct wiphy *wiphy, struct net_device *dev,
+ struct cfg80211_ap_update *params)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_link_data *link;
@@ -1471,7 +1471,8 @@ static int ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev,

sdata_assert_lock(sdata);

- link = sdata_dereference(sdata->link[params->link_id], sdata);
+ link = sdata_dereference(sdata->link[params->settings.beacon.link_id],
+ sdata);
if (!link)
return -ENOLINK;

@@ -1487,13 +1488,16 @@ static int ieee80211_change_beacon(struct wiphy *wiphy, struct net_device *dev,
if (!old)
return -ENOENT;

- err = ieee80211_assign_beacon(sdata, link, params, NULL, NULL);
+ err = ieee80211_assign_beacon(sdata, link, &params->settings.beacon,
+ NULL, NULL);
if (err < 0)
return err;

- if (params->he_bss_color_valid &&
- params->he_bss_color.enabled != link_conf->he_bss_color.enabled) {
- link_conf->he_bss_color.enabled = params->he_bss_color.enabled;
+ if (params->settings.beacon.he_bss_color_valid &&
+ params->settings.beacon.he_bss_color.enabled !=
+ link_conf->he_bss_color.enabled) {
+ link_conf->he_bss_color.enabled =
+ params->settings.beacon.he_bss_color.enabled;
err |= BSS_CHANGED_HE_BSS_COLOR;
}

@@ -4960,7 +4964,7 @@ const struct cfg80211_ops mac80211_config_ops = {
.set_default_mgmt_key = ieee80211_config_default_mgmt_key,
.set_default_beacon_key = ieee80211_config_default_beacon_key,
.start_ap = ieee80211_start_ap,
- .change_beacon = ieee80211_change_beacon,
+ .update_ap = ieee80211_update_ap,
.stop_ap = ieee80211_stop_ap,
.add_station = ieee80211_add_station,
.del_station = ieee80211_del_station,
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 0a31b1d2845d..a45bda39d8ab 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -6142,35 +6142,40 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info)
return err;
}

-static int nl80211_set_beacon(struct sk_buff *skb, struct genl_info *info)
+static int nl80211_update_ap(struct sk_buff *skb, struct genl_info *info)
{
struct cfg80211_registered_device *rdev = info->user_ptr[0];
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_beacon_data params;
+ struct cfg80211_ap_update params;
int err;

if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP &&
dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO)
return -EOPNOTSUPP;

- if (!rdev->ops->change_beacon)
+ if (!rdev->ops->update_ap)
return -EOPNOTSUPP;

if (!wdev->links[link_id].ap.beacon_interval)
return -EINVAL;

- err = nl80211_parse_beacon(rdev, info->attrs, &params);
+ memset(&params, 0, sizeof(params));
+
+ err = nl80211_parse_beacon(rdev, info->attrs,
+ &params.settings.beacon);
if (err)
goto out;

+ set_bit(BEACON_VALID, params.valid);
+
wdev_lock(wdev);
- err = rdev_change_beacon(rdev, dev, &params);
+ err = rdev_update_ap(rdev, dev, &params);
wdev_unlock(wdev);

out:
- kfree(params.mbssid_ies);
+ kfree(params.settings.beacon.mbssid_ies);
return err;
}

@@ -16619,10 +16624,10 @@ static const struct genl_small_ops nl80211_small_ops[] = {
.internal_flags = IFLAGS(NL80211_FLAG_NEED_NETDEV_UP),
},
{
- .cmd = NL80211_CMD_SET_BEACON,
+ .cmd = NL80211_CMD_UPDATE_AP,
.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
.flags = GENL_UNS_ADMIN_PERM,
- .doit = nl80211_set_beacon,
+ .doit = nl80211_update_ap,
.internal_flags = IFLAGS(NL80211_FLAG_NEED_NETDEV_UP |
NL80211_FLAG_MLO_VALID_LINK_ID),
},
diff --git a/net/wireless/rdev-ops.h b/net/wireless/rdev-ops.h
index 2e497cf26ef2..ac6bdf3434a1 100644
--- a/net/wireless/rdev-ops.h
+++ b/net/wireless/rdev-ops.h
@@ -171,13 +171,13 @@ static inline int rdev_start_ap(struct cfg80211_registered_device *rdev,
return ret;
}

-static inline int rdev_change_beacon(struct cfg80211_registered_device *rdev,
- struct net_device *dev,
- struct cfg80211_beacon_data *info)
+static inline int rdev_update_ap(struct cfg80211_registered_device *rdev,
+ struct net_device *dev,
+ struct cfg80211_ap_update *info)
{
int ret;
- trace_rdev_change_beacon(&rdev->wiphy, dev, info);
- ret = rdev->ops->change_beacon(&rdev->wiphy, dev, info);
+ trace_rdev_update_ap(&rdev->wiphy, dev, &info->settings);
+ ret = rdev->ops->update_ap(&rdev->wiphy, dev, info);
trace_rdev_return_int(&rdev->wiphy, ret);
return ret;
}
diff --git a/net/wireless/trace.h b/net/wireless/trace.h
index 716a1fa70069..34f517ab2068 100644
--- a/net/wireless/trace.h
+++ b/net/wireless/trace.h
@@ -613,54 +613,58 @@ TRACE_EVENT(rdev_start_ap,
__entry->inactivity_timeout, __entry->link_id)
);

-TRACE_EVENT(rdev_change_beacon,
- TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
- struct cfg80211_beacon_data *info),
- TP_ARGS(wiphy, netdev, info),
- TP_STRUCT__entry(
+TRACE_EVENT(rdev_update_ap,
+ TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
+ struct cfg80211_ap_settings *info),
+ TP_ARGS(wiphy, netdev, info),
+ TP_STRUCT__entry(
WIPHY_ENTRY
NETDEV_ENTRY
__field(int, link_id)
- __dynamic_array(u8, head, info ? info->head_len : 0)
- __dynamic_array(u8, tail, info ? info->tail_len : 0)
- __dynamic_array(u8, beacon_ies, info ? info->beacon_ies_len : 0)
+ __dynamic_array(u8, head, info ? info->beacon.head_len : 0)
+ __dynamic_array(u8, tail, info ? info->beacon.tail_len : 0)
+ __dynamic_array(u8, beacon_ies,
+ info ? info->beacon.beacon_ies_len : 0)
__dynamic_array(u8, proberesp_ies,
- info ? info->proberesp_ies_len : 0)
+ info ? info->beacon.proberesp_ies_len : 0)
__dynamic_array(u8, assocresp_ies,
- info ? info->assocresp_ies_len : 0)
- __dynamic_array(u8, probe_resp, info ? info->probe_resp_len : 0)
- ),
- TP_fast_assign(
+ info ? info->beacon.assocresp_ies_len : 0)
+ __dynamic_array(u8, probe_resp,
+ info ? info->beacon.probe_resp_len : 0)
+ ),
+ TP_fast_assign(
WIPHY_ASSIGN;
NETDEV_ASSIGN;
if (info) {
- __entry->link_id = info->link_id;
- if (info->head)
- memcpy(__get_dynamic_array(head), info->head,
- info->head_len);
- if (info->tail)
- memcpy(__get_dynamic_array(tail), info->tail,
- info->tail_len);
- if (info->beacon_ies)
+ __entry->link_id = info->beacon.link_id;
+ if (info->beacon.head)
+ memcpy(__get_dynamic_array(head), info->beacon.head,
+ info->beacon.head_len);
+ if (info->beacon.tail)
+ memcpy(__get_dynamic_array(tail), info->beacon.tail,
+ info->beacon.tail_len);
+ if (info->beacon.beacon_ies)
memcpy(__get_dynamic_array(beacon_ies),
- info->beacon_ies, info->beacon_ies_len);
- if (info->proberesp_ies)
+ info->beacon.beacon_ies,
+ info->beacon.beacon_ies_len);
+ if (info->beacon.proberesp_ies)
memcpy(__get_dynamic_array(proberesp_ies),
- info->proberesp_ies,
- info->proberesp_ies_len);
- if (info->assocresp_ies)
+ info->beacon.proberesp_ies,
+ info->beacon.proberesp_ies_len);
+ if (info->beacon.assocresp_ies)
memcpy(__get_dynamic_array(assocresp_ies),
- info->assocresp_ies,
- info->assocresp_ies_len);
- if (info->probe_resp)
+ info->beacon.assocresp_ies,
+ info->beacon.assocresp_ies_len);
+ if (info->beacon.probe_resp)
memcpy(__get_dynamic_array(probe_resp),
- info->probe_resp, info->probe_resp_len);
+ info->beacon.probe_resp,
+ info->beacon.probe_resp_len);
} else {
__entry->link_id = -1;
}
- ),
- TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", link_id:%d",
- WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->link_id)
+ ),
+ TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", link_id:%d",
+ WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->link_id)
);

TRACE_EVENT(rdev_stop_ap,
--
2.25.1


2023-03-20 17:10:55

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH v2 0/4] Add AP power save support

On Mon, 2023-03-20 at 22:13 +0530, Maharaja Kennadyrajan wrote:
> AP power save feature is enabled when the driver and hardware
> supports. If the driver suppots this feature then driver will
> advertise this flag SUPPORTS_AP_PS to enable the AP power save
> in mac80211.
>
> AP goes into the power save mode, if no stations are connected
> and it will come out of power save as and when any of the station
> associate to it. Also, during the power save tx chain mask is
> reduced to 1x1 until the any station connects with more than
> 1x1 chain mask.
>

All of that seems entirely transparent, similar to how mac80211 today
reduces bandwidth of the AP interface (min_def in a chandef) - what's
the point of doing all this infrastructure to make it configurable then?
Why not always have it, and perhaps make some debugfs to turn it off for
debugging/experiments?

johannes

2023-03-21 00:32:26

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH v2 4/4] wifi: ath11k: add AP power save support

Hi Maharaja,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on wireless-next/main]
[also build test WARNING on kvalo-ath/ath-next next-20230320]
[cannot apply to wireless/main linus/master v6.3-rc3]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Maharaja-Kennadyrajan/wifi-nl80211-rename-NL80211_CMD_SET_BEACON-to-NL80211_CMD_UDPATE_AP/20230321-005501
base: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
patch link: https://lore.kernel.org/r/20230320164334.3325886-5-quic_mkenna%40quicinc.com
patch subject: [PATCH v2 4/4] wifi: ath11k: add AP power save support
config: i386-buildonly-randconfig-r006-20230320 (https://download.01.org/0day-ci/archive/20230321/[email protected]/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/289c49facf48da5a221a3c8072f97c4641eca9f0
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Maharaja-Kennadyrajan/wifi-nl80211-rename-NL80211_CMD_SET_BEACON-to-NL80211_CMD_UDPATE_AP/20230321-005501
git checkout 289c49facf48da5a221a3c8072f97c4641eca9f0
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/net/wireless/ath/ath11k/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

>> drivers/net/wireless/ath/ath11k/mac.c:3218:6: warning: no previous prototype for function 'ath11k_mac_ap_ps_recalc' [-Wmissing-prototypes]
void ath11k_mac_ap_ps_recalc(struct ath11k *ar)
^
drivers/net/wireless/ath/ath11k/mac.c:3218:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void ath11k_mac_ap_ps_recalc(struct ath11k *ar)
^
static
1 warning generated.


vim +/ath11k_mac_ap_ps_recalc +3218 drivers/net/wireless/ath/ath11k/mac.c

3217
> 3218 void ath11k_mac_ap_ps_recalc(struct ath11k *ar)
3219 {
3220 struct ath11k_vif *arvif;
3221 enum ath11k_ap_ps_state state = ATH11K_AP_PS_STATE_OFF;
3222 int ret;
3223 bool allow_ap_ps = true;
3224
3225 lockdep_assert_held(&ar->conf_mutex);
3226
3227 list_for_each_entry(arvif, &ar->arvifs, list) {
3228 if (arvif->vdev_type == WMI_VDEV_TYPE_STA ||
3229 !arvif->vif_ap_ps_enabled) {
3230 allow_ap_ps = false;
3231 break;
3232 }
3233 }
3234
3235 if (!allow_ap_ps)
3236 ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "ap ps is not allowed\n");
3237
3238 if (allow_ap_ps && !ar->num_stations && ar->ap_ps_enabled)
3239 state = ATH11K_AP_PS_STATE_ON;
3240
3241 if (ar->ap_ps_state == state)
3242 return;
3243
3244 ret = ath11k_wmi_pdev_ap_ps_cmd_send(ar, ar->pdev->pdev_id, state);
3245 if (ret) {
3246 ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
3247 "failed to send ap ps command pdev_id %u state %u\n",
3248 ar->pdev->pdev_id, state);
3249 return;
3250 }
3251
3252 ar->ap_ps_state = state;
3253 }
3254

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

2023-03-21 01:57:40

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH v2 4/4] wifi: ath11k: add AP power save support

Hi Maharaja,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on wireless-next/main]
[also build test WARNING on kvalo-ath/ath-next next-20230320]
[cannot apply to wireless/main linus/master v6.3-rc3]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Maharaja-Kennadyrajan/wifi-nl80211-rename-NL80211_CMD_SET_BEACON-to-NL80211_CMD_UDPATE_AP/20230321-005501
base: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
patch link: https://lore.kernel.org/r/20230320164334.3325886-5-quic_mkenna%40quicinc.com
patch subject: [PATCH v2 4/4] wifi: ath11k: add AP power save support
config: i386-randconfig-a005 (https://download.01.org/0day-ci/archive/20230321/[email protected]/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/289c49facf48da5a221a3c8072f97c4641eca9f0
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Maharaja-Kennadyrajan/wifi-nl80211-rename-NL80211_CMD_SET_BEACON-to-NL80211_CMD_UDPATE_AP/20230321-005501
git checkout 289c49facf48da5a221a3c8072f97c4641eca9f0
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 olddefconfig
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/net/wireless/ath/ath11k/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

>> drivers/net/wireless/ath/ath11k/mac.c:3218:6: warning: no previous prototype for 'ath11k_mac_ap_ps_recalc' [-Wmissing-prototypes]
3218 | void ath11k_mac_ap_ps_recalc(struct ath11k *ar)
| ^~~~~~~~~~~~~~~~~~~~~~~


vim +/ath11k_mac_ap_ps_recalc +3218 drivers/net/wireless/ath/ath11k/mac.c

3217
> 3218 void ath11k_mac_ap_ps_recalc(struct ath11k *ar)
3219 {
3220 struct ath11k_vif *arvif;
3221 enum ath11k_ap_ps_state state = ATH11K_AP_PS_STATE_OFF;
3222 int ret;
3223 bool allow_ap_ps = true;
3224
3225 lockdep_assert_held(&ar->conf_mutex);
3226
3227 list_for_each_entry(arvif, &ar->arvifs, list) {
3228 if (arvif->vdev_type == WMI_VDEV_TYPE_STA ||
3229 !arvif->vif_ap_ps_enabled) {
3230 allow_ap_ps = false;
3231 break;
3232 }
3233 }
3234
3235 if (!allow_ap_ps)
3236 ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "ap ps is not allowed\n");
3237
3238 if (allow_ap_ps && !ar->num_stations && ar->ap_ps_enabled)
3239 state = ATH11K_AP_PS_STATE_ON;
3240
3241 if (ar->ap_ps_state == state)
3242 return;
3243
3244 ret = ath11k_wmi_pdev_ap_ps_cmd_send(ar, ar->pdev->pdev_id, state);
3245 if (ret) {
3246 ath11k_dbg(ar->ab, ATH11K_DBG_MAC,
3247 "failed to send ap ps command pdev_id %u state %u\n",
3248 ar->pdev->pdev_id, state);
3249 return;
3250 }
3251
3252 ar->ap_ps_state = state;
3253 }
3254

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

2023-03-24 02:32:53

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH v2 3/4] wifi: mac80211: notify BSS change upon AP power save change


Greeting,

FYI, we noticed WARNING:at_net/mac80211/main.c:#ieee80211_vif_cfg_change_notify[mac80211] due to commit (built with gcc-11):

commit: 33c0818ac663229217c2de4b85fe7e1cd3759f4e ("[PATCH v2 3/4] wifi: mac80211: notify BSS change upon AP power save change")
url: https://github.com/intel-lab-lkp/linux/commits/Maharaja-Kennadyrajan/wifi-nl80211-rename-NL80211_CMD_SET_BEACON-to-NL80211_CMD_UDPATE_AP/20230321-005501
base: https://git.kernel.org/cgit/linux/kernel/git/wireless/wireless-next.git main
patch link: https://lore.kernel.org/all/[email protected]/
patch subject: [PATCH v2 3/4] wifi: mac80211: notify BSS change upon AP power save change

in testcase: hwsim
version: hwsim-i386-717e5d7-1_20220926
with following parameters:

test: group-28



on test machine: 8 threads 1 sockets Intel(R) Core(TM) i7-4790T CPU @ 2.70GHz (Haswell) with 16G memory

caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):


If you fix the issue, kindly add following tag
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-lkp/[email protected]


[ 91.021435][ T4322] ------------[ cut here ]------------
[ 91.026759][ T4322] WARNING: CPU: 2 PID: 4322 at net/mac80211/main.c:268 ieee80211_vif_cfg_change_notify+0x15c/0x1a8 [mac80211]
[ 91.038283][ T4322] Modules linked in: ctr(E) ccm(E) mac80211_hwsim(E) mac80211(E) cfg80211(E) virtio(E) virtio_ring(E) libarc4(E) netconsole(E) intel_rapl_msr(E) intel_rapl_common(E) btrfs(E) x86_pkg_temp_thermal(E) blake2b_generic(E) intel_powerclamp(E) xor(E) coretemp(E) ipmi_devintf(E) kvm_intel(E) ipmi_msghandler(E) raid6_pq(E) kvm(E) irqbypass(E) libcrc32c(E) crc32_pclmul(E) crc32c_generic(E) crc32c_intel(E) aesni_intel(E) crypto_simd(E) sd_mod(E) cryptd(E) t10_pi(E) i915(E) rapl(E) drm_buddy(E) crc64_rocksoft_generic(E) crc64_rocksoft(E) drm_display_helper(E) crc64(E) cec(E) at24(E) intel_cstate(E) regmap_i2c(E) xhci_pci(E) ttm(E) i2c_i801(E) ehci_pci(E) mei_me(E) ahci(E) lpc_ich(E) xhci_hcd(E) libahci(E) ehci_hcd(E) drm_kms_helper(E) intel_uncore(E) evdev(E) mxm_wmi(E) i2c_smbus(E) mfd_core(E) syscopyarea(E) sysfillrect(E) usbcore(E) video(E) mei(E) thermal(E) libata(E) fan(E) usb_common(E) sysimgblt(E) acpi_pad(E) wmi(E) button(E) fuse(E) drm(E) configfs(E) autofs4(E)
[ 91.122477][ T244] wlan0: associate with 02:00:00:00:03:00 (try 2/3)
[ 91.124715][ T4322] CPU: 2 PID: 4322 Comm: hostapd Tainted: G S E 6.3.0-rc1-00495-g33c0818ac663 #1
[ 91.141343][ T4322] Hardware name: Gigabyte Technology Co., Ltd. Z97X-UD5H/Z97X-UD5H, BIOS F9 04/21/2015
[ 91.150817][ T4322] EIP: ieee80211_vif_cfg_change_notify+0x15c/0x1a8 [mac80211]
[ 91.158166][ T4322] Code: c0 0f 84 4d ff ff ff 57 8b 45 f0 8d 93 44 0d 00 00 8d 8b 90 0d 00 00 56 8b 7d ec ff d7 58 5a e9 30 ff ff ff 8d b6 00 00 00 00 <0f> 0b e9 d0 fe ff ff 8d b4 26 00 00 00 00 66 90 80 3d df f4 6a f9
[ 91.177616][ T4322] EAX: 00000100 EBX: f4a40600 ECX: 00000000 EDX: 00000100
[ 91.184600][ T4322] ESI: 00000100 EDI: 00000000 EBP: f4add8cc ESP: f4add8b8
[ 91.191574][ T4322] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 EFLAGS: 00210206
[ 91.199052][ T4322] CR0: 80050033 CR2: b7e7dc45 CR3: 34ace000 CR4: 001506f0
[ 91.206010][ T4322] Call Trace:
[ 91.209176][ T4322] ieee80211_update_ap+0xa6/0x120 [mac80211]
[ 91.215070][ T4322] nl80211_update_ap+0x109/0x22c [cfg80211]
[ 91.220879][ T4322] genl_family_rcv_msg+0x20f/0x35c
[ 91.225855][ T4322] ? poll_schedule_timeout+0x6c/0x6c
[ 91.232044][ T4322] ? __cfg80211_rdev_from_attrs+0x1a8/0x1a8 [cfg80211]
[ 91.234481][ T243] wlan0: associate with 02:00:00:00:03:00 (try 3/3)
[ 91.238796][ T4322] ? cfg80211_net_detect_results+0x1ac/0x1ac [cfg80211]
[ 91.252650][ T4322] ? nl80211_add_commands_unsplit+0x720/0x720 [cfg80211]
[ 91.259556][ T4322] genl_rcv_msg+0x3d/0x80
[ 91.263739][ T4322] ? genl_family_rcv_msg+0x35c/0x35c
[ 91.268887][ T4322] netlink_rcv_skb+0x47/0xe0
[ 91.273352][ T4322] genl_rcv+0x21/0x30
[ 91.277188][ T4322] netlink_unicast+0x1f0/0x2f0
[ 91.281829][ T4322] netlink_sendmsg+0x26b/0x474
[ 91.286458][ T4322] sock_sendmsg+0x31/0x70
[ 91.290668][ T4322] ____sys_sendmsg+0x1c2/0x250
[ 91.295296][ T4322] ___sys_sendmsg+0x5e/0x94
[ 91.299665][ T4322] ? folio_mark_dirty+0x26/0x54
[ 91.304398][ T4322] ? unlock_page+0x19/0x1c
[ 91.308678][ T4322] ? simple_write_end+0x76/0xfc
[ 91.313393][ T4322] ? balance_dirty_pages_ratelimited_flags+0x1c/0x37c
[ 91.320003][ T4322] ? balance_dirty_pages_ratelimited+0xf/0x14
[ 91.325943][ T4322] ? generic_perform_write+0x125/0x1c0
[ 91.331264][ T4322] ? __might_sleep+0x33/0x7c
[ 91.335734][ T4322] __sys_sendmsg+0x3e/0x78
[ 91.340017][ T4322] ? netlink_setsockopt+0x1/0x3ac
[ 91.344903][ T4322] __do_sys_socketcall+0x15a/0x2e4
[ 91.346483][ T244] wlan0: association with 02:00:00:00:03:00 timed out
[ 91.349866][ T4322] __ia32_sys_socketcall+0x12/0x14
[ 91.361460][ T4322] __do_fast_syscall_32+0x56/0xc0
[ 91.366355][ T4322] do_fast_syscall_32+0x29/0x60
[ 91.371068][ T4322] do_SYSENTER_32+0x15/0x18
[ 91.375437][ T4322] entry_SYSENTER_32+0x98/0xf1
[ 91.380065][ T4322] EIP: 0xb7fcf589
[ 91.383566][ T4322] Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d 76 00 58 b8 77 00 00 00 cd 80 90 8d 76
[ 91.403017][ T4322] EAX: ffffffda EBX: 00000010 ECX: bfb587a0 EDX: 00000000
[ 91.409973][ T4322] ESI: 00000000 EDI: 023986d0 EBP: 0239a2f0 ESP: bfb58790
[ 91.416950][ T4322] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b EFLAGS: 00200282
[ 91.424441][ T4322] ---[ end trace 0000000000000000 ]---



To reproduce:

git clone https://github.com/intel/lkp-tests.git
cd lkp-tests
sudo bin/lkp install job.yaml # job file is attached in this email
bin/lkp split-job --compatible job.yaml # generate the yaml file for lkp run
sudo bin/lkp run generated-yaml-file

# if come across any failure that blocks the test,
# please remove ~/.lkp and /lkp dir to run from a clean state.



--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests



Attachments:
(No filename) (6.26 kB)
config-6.3.0-rc1-00495-g33c0818ac663 (157.49 kB)
job-script (5.59 kB)
dmesg.xz (92.43 kB)
hwsim (39.87 kB)
job.yaml (4.70 kB)
reproduce (3.31 kB)
Download all attachments