On 2021-05-03 22:54, jjohnson@xxxxxxxxxxxxxx wrote:
On 2021-04-29 04:47, Maharaja Kennadyrajan wrote:
[..snip..]
+/**
+ * enum nl80211_beacon_tx_mode - Beacon Tx Mode enum.
+ * Used to configure beacon staggered mode or beacon burst mode.
+ */
+enum nl80211_beacon_tx_mode {
+ NL80211_BEACON_STAGGERED_MODE = 1,
+ NL80211_BEACON_BURST_MODE = 2,
+};
+
[..snip..]
@@ -5330,6 +5331,10 @@ static int nl80211_start_ap(struct sk_buff
*skb,
struct genl_info *info)
params.dtim_period =
nla_get_u32(info->attrs[NL80211_ATTR_DTIM_PERIOD]);
+ if (info->attrs[NL80211_ATTR_BEACON_TX_MODE])
+ params.beacon_tx_mode =
+
nla_get_u32(info->attrs[NL80211_ATTR_BEACON_TX_MODE]);
+
Note that in the case where NL80211_ATTR_BEACON_TX_MODE is not
specified that
beacon_tx_mode will be zero, which is not a valid
nl80211_beacon_tx_mode enumeration.
Should you renumber the nl80211_beacon_tx_mode enumerations so that the
default
mode has a value of 0? Or add NL80211_BEACON_DEFAULT_MODE = 0 and
allow the driver
to select a default mode?
[Maha]: Yes, it will select the default mode as STAGGERED mode when the
user set
beacon_tx_mode as 0 in the hostapd conf file.
Also, it will select the default mode as STAGGERED mode when the user
didn't add
beacon_tx_mode config in the hostapd conf file.
This is how it is handled here already.
Regards,
Maha