Search Linux Wireless

Re: [PATCH] mac80211: print reason code for deauth/dissoc frames

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

 



On Tue, 2008-10-28 at 15:58 +0800, Zhu Yi wrote:
> The patch prints reason code for deauth/dissoc frames to give users
> more ideas what's happened for the disconnection.

Indeed, that seems useful.

> Signed-off-by: Zhu Yi <yi.zhu@xxxxxxxxx>

Acked-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>

> ---
>  net/mac80211/mlme.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
> index d5006b2..0752e09 100644
> --- a/net/mac80211/mlme.c
> +++ b/net/mac80211/mlme.c
> @@ -1134,7 +1134,8 @@ static void ieee80211_rx_mgmt_deauth(struct ieee80211_sub_if_data *sdata,
>  	reason_code = le16_to_cpu(mgmt->u.deauth.reason_code);
>  
>  	if (ifsta->flags & IEEE80211_STA_AUTHENTICATED)
> -		printk(KERN_DEBUG "%s: deauthenticated\n", sdata->dev->name);
> +		printk(KERN_DEBUG "%s: deauthenticated (Reason: %u)\n",
> +				sdata->dev->name, reason_code);
>  
>  	if (ifsta->state == IEEE80211_STA_MLME_AUTHENTICATE ||
>  	    ifsta->state == IEEE80211_STA_MLME_ASSOCIATE ||
> @@ -1166,7 +1167,8 @@ static void ieee80211_rx_mgmt_disassoc(struct ieee80211_sub_if_data *sdata,
>  	reason_code = le16_to_cpu(mgmt->u.disassoc.reason_code);
>  
>  	if (ifsta->flags & IEEE80211_STA_ASSOCIATED)
> -		printk(KERN_DEBUG "%s: disassociated\n", sdata->dev->name);
> +		printk(KERN_DEBUG "%s: disassociated (Reason: %u)\n",
> +				sdata->dev->name, reason_code);
>  
>  	if (ifsta->state == IEEE80211_STA_MLME_ASSOCIATED) {
>  		ifsta->state = IEEE80211_STA_MLME_ASSOCIATE;

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux