Message ID | 20240129052832.905113-2-quic_adisi@quicinc.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Johannes Berg |
Headers | show |
Series | wifi: cfg80211/mac80211: add link_id handling in AP channel switch during Multi-Link Operation | expand |
On 1/28/2024 9:28 PM, Aditya Kumar Singh wrote: > --- a/net/wireless/trace.h > +++ b/net/wireless/trace.h > @@ -2341,11 +2342,13 @@ TRACE_EVENT(rdev_channel_switch, > memcpy(__get_dynamic_array(pres_ofs), > params->counter_offsets_presp, > params->n_counter_offsets_presp * sizeof(u16)); > + __entry->link_id = params->link_id; > ), > TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT > - ", block_tx: %d, count: %u, radar_required: %d", > + ", block_tx: %d, count: %u, radar_required: %d link_id: %d", nit s/%d link_id/%d, link_id/ > WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG, > - __entry->block_tx, __entry->count, __entry->radar_required) > + __entry->block_tx, __entry->count, __entry->radar_required, > + __entry->link_id) > ); > > TRACE_EVENT(rdev_set_qos_map,
On 1/30/24 06:44, Jeff Johnson wrote: > On 1/28/2024 9:28 PM, Aditya Kumar Singh wrote: >> --- a/net/wireless/trace.h >> +++ b/net/wireless/trace.h >> @@ -2341,11 +2342,13 @@ TRACE_EVENT(rdev_channel_switch, >> memcpy(__get_dynamic_array(pres_ofs), >> params->counter_offsets_presp, >> params->n_counter_offsets_presp * sizeof(u16)); >> + __entry->link_id = params->link_id; >> ), >> TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT >> - ", block_tx: %d, count: %u, radar_required: %d", >> + ", block_tx: %d, count: %u, radar_required: %d link_id: %d", > > nit s/%d link_id/%d, link_id/ > Sure will add comma in next version. >> WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG, >> - __entry->block_tx, __entry->count, __entry->radar_required) >> + __entry->block_tx, __entry->count, __entry->radar_required, >> + __entry->link_id) >> ); >> >> TRACE_EVENT(rdev_set_qos_map, >
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 51b9e6fa12f8..2d6ff5ba5c03 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -1531,6 +1531,8 @@ struct cfg80211_ap_update { * @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. + * @link_id: defines the link on which channel switch is expected during + * MLO. 0 in case of non-MLO. */ struct cfg80211_csa_settings { struct cfg80211_chan_def chandef; @@ -1544,6 +1546,7 @@ struct cfg80211_csa_settings { bool block_tx; u8 count; u16 punct_bitmap; + u8 link_id; }; /** diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index e4f41f86e295..7f58e11eba58 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -10232,6 +10232,7 @@ static int nl80211_channel_switch(struct sk_buff *skb, struct genl_info *info) goto free; } + params.link_id = link_id; err = rdev_channel_switch(rdev, dev, ¶ms); free: diff --git a/net/wireless/trace.h b/net/wireless/trace.h index 1f374c8a17a5..2af58f5fbf51 100644 --- a/net/wireless/trace.h +++ b/net/wireless/trace.h @@ -2324,6 +2324,7 @@ TRACE_EVENT(rdev_channel_switch, __field(u8, count) __dynamic_array(u16, bcn_ofs, params->n_counter_offsets_beacon) __dynamic_array(u16, pres_ofs, params->n_counter_offsets_presp) + __field(u8, link_id) ), TP_fast_assign( WIPHY_ASSIGN; @@ -2341,11 +2342,13 @@ TRACE_EVENT(rdev_channel_switch, memcpy(__get_dynamic_array(pres_ofs), params->counter_offsets_presp, params->n_counter_offsets_presp * sizeof(u16)); + __entry->link_id = params->link_id; ), TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT - ", block_tx: %d, count: %u, radar_required: %d", + ", block_tx: %d, count: %u, radar_required: %d link_id: %d", WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG, - __entry->block_tx, __entry->count, __entry->radar_required) + __entry->block_tx, __entry->count, __entry->radar_required, + __entry->link_id) ); TRACE_EVENT(rdev_set_qos_map,
Currently, during channel switch, no link id information is passed down. In order to support channel switch during Multi Link Operation, it is required to pass link id as well. Add changes to pass link id in the channel_switch cfg80211_ops. Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com> --- include/net/cfg80211.h | 3 +++ net/wireless/nl80211.c | 1 + net/wireless/trace.h | 7 +++++-- 3 files changed, 9 insertions(+), 2 deletions(-)