Search Linux Wireless

Re: [PATCH v2] wifi: mac80211: Prevent disconnect reports when no AP is associated

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2025-03-14 at 20:06 +0800, Zhongqiu Han wrote:
> 
> +++ b/net/mac80211/mlme.c
> @@ -4433,6 +4433,10 @@ static void ieee80211_report_disconnect(struct ieee80211_sub_if_data *sdata,
>  		.u.mlme.data = tx ? DEAUTH_TX_EVENT : DEAUTH_RX_EVENT,
>  		.u.mlme.reason = reason,
>  	};
> +	struct sta_info *ap_sta = sta_info_get(sdata, sdata->vif.cfg.ap_addr);
> +
> +	if (WARN_ON(!ap_sta))
> +		return;

You're adding a WARN_ON() that's now guaranteed to trigger, no?
Shouldn't the caller (also) be fixed?

> @@ -8090,7 +8094,7 @@ static void ieee80211_sta_timer(struct timer_list *t)
>  void ieee80211_sta_connection_lost(struct ieee80211_sub_if_data *sdata,
>  				   u8 reason, bool tx)
>  {
> -	u8 frame_buf[IEEE80211_DEAUTH_FRAME_LEN];
> +	u8 frame_buf[IEEE80211_DEAUTH_FRAME_LEN] = {0};
> 

And that's not needed then? And perhaps should be {} if it is.

johannes





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux