]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: cfg80211: send link id in channel_switch ops
authorAditya Kumar Singh <quic_adisi@quicinc.com>
Tue, 30 Jan 2024 14:09:14 +0000 (19:39 +0530)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 8 Feb 2024 14:00:45 +0000 (15:00 +0100)
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>
Link: https://msgid.link/20240130140918.1172387-2-quic_adisi@quicinc.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/cfg80211.h
net/wireless/nl80211.c
net/wireless/trace.h

index e27ed2307cdbc80baf28e7d7e83fd4eed5038d8d..d4c83ea3213d4f424f738f93f1e9dbb23100b1f3 100644 (file)
@@ -1543,6 +1543,8 @@ struct cfg80211_ap_update {
  * @radar_required: whether radar detection is required on the new channel
  * @block_tx: whether transmissions should be blocked while changing
  * @count: number of beacons until switch
+ * @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;
@@ -1555,6 +1557,7 @@ struct cfg80211_csa_settings {
        bool radar_required;
        bool block_tx;
        u8 count;
+       u8 link_id;
 };
 
 /**
index b533412ad1e031ad943ff797d47826234522f308..e1106ae35e21dc57d90d4d2fee4396682a6d0473 100644 (file)
@@ -10222,6 +10222,7 @@ skip_beacons:
        if (info->attrs[NL80211_ATTR_CH_SWITCH_BLOCK_TX])
                params.block_tx = true;
 
+       params.link_id = link_id;
        err = rdev_channel_switch(rdev, dev, &params);
 
 free:
index ae5e585b6863d2664fc8a73b8f46a364556c838d..194ea2471717779ae4b616a29efaac5fad95a2be 100644 (file)
@@ -2332,6 +2332,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;
@@ -2349,11 +2350,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,