diff mbox series

wifi: mac80211_hwsim: set link ID information during Rx

Message ID 20240313145402.456514-1-quic_adisi@quicinc.com (mailing list archive)
State Accepted
Delegated to: Johannes Berg
Headers show
Series wifi: mac80211_hwsim: set link ID information during Rx | expand

Commit Message

Aditya Kumar Singh March 13, 2024, 2:54 p.m. UTC
Currently link ID information is not passed to mac80211 via Rx status by
mac80211_hwsim. This leads to packet getting dropped in function
__ieee80211_rx_handle_packet since it expects the link ID if packet is
intended for a MLO station and the station is not directly passed via
pubsta function argument.

Add changes to pass the link ID information in Rx status.

Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
---
 drivers/net/wireless/virtual/mac80211_hwsim.c | 3 +++
 1 file changed, 3 insertions(+)


base-commit: e27b02e23a701e5761f1d6028643e1203a1c56de

Comments

Jeff Johnson March 13, 2024, 5:25 p.m. UTC | #1
On 3/13/2024 7:54 AM, Aditya Kumar Singh wrote:
> Currently link ID information is not passed to mac80211 via Rx status by
> mac80211_hwsim. This leads to packet getting dropped in function
> __ieee80211_rx_handle_packet since it expects the link ID if packet is
> intended for a MLO station and the station is not directly passed via
> pubsta function argument.
> 
> Add changes to pass the link ID information in Rx status.
> 
> Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>

Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>

> ---
>  drivers/net/wireless/virtual/mac80211_hwsim.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/wireless/virtual/mac80211_hwsim.c b/drivers/net/wireless/virtual/mac80211_hwsim.c
> index b55fe320633c..783114ccb5b8 100644
> --- a/drivers/net/wireless/virtual/mac80211_hwsim.c
> +++ b/drivers/net/wireless/virtual/mac80211_hwsim.c
> @@ -1721,6 +1721,9 @@ static void mac80211_hwsim_rx(struct mac80211_hwsim_data *data,
>  				sp->active_links_rx &= ~BIT(link_id);
>  			else
>  				sp->active_links_rx |= BIT(link_id);
> +
> +			rx_status->link_valid = true;
> +			rx_status->link_id = link_id;
>  		}
>  		rcu_read_unlock();
>  	}
> 
> base-commit: e27b02e23a701e5761f1d6028643e1203a1c56de
diff mbox series

Patch

diff --git a/drivers/net/wireless/virtual/mac80211_hwsim.c b/drivers/net/wireless/virtual/mac80211_hwsim.c
index b55fe320633c..783114ccb5b8 100644
--- a/drivers/net/wireless/virtual/mac80211_hwsim.c
+++ b/drivers/net/wireless/virtual/mac80211_hwsim.c
@@ -1721,6 +1721,9 @@  static void mac80211_hwsim_rx(struct mac80211_hwsim_data *data,
 				sp->active_links_rx &= ~BIT(link_id);
 			else
 				sp->active_links_rx |= BIT(link_id);
+
+			rx_status->link_valid = true;
+			rx_status->link_id = link_id;
 		}
 		rcu_read_unlock();
 	}