Search Linux Wireless

Re: [PATCH] cfg80211: check for current_bss from giwrate

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

 



On Fri, 2009-07-03 at 02:00 +0200, Samuel Ortiz wrote:
> When connecting to an ESSID manually, we may not set the BSSID, and thus
> wdev->wext.connect.bssid will be NULL.
> wdev->current_bss is always updated when a connection is established so we
> should check it first.

Indeed, good catch

Acked-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>

> Signed-off-by: Samuel Ortiz <samuel.ortiz@xxxxxxxxx>
> ---
>  net/wireless/wext-compat.c |    7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> Index: iwm-2.6/net/wireless/wext-compat.c
> ===================================================================
> --- iwm-2.6.orig/net/wireless/wext-compat.c	2009-07-03 01:40:09.000000000 +0200
> +++ iwm-2.6/net/wireless/wext-compat.c	2009-07-03 01:40:18.000000000 +0200
> @@ -1137,8 +1137,11 @@ int cfg80211_wext_giwrate(struct net_dev
>  	if (!rdev->ops->get_station)
>  		return -EOPNOTSUPP;
>  
> -	addr = wdev->wext.connect.bssid;
> -	if (!addr)
> +	if (wdev->current_bss)
> +		addr = wdev->current_bss->bssid;
> +	else if (wdev->wext.connect.bssid)
> +		addr = wdev->wext.connect.bssid;
> +	else
>  		return -ENOTSUPP;
>  
>  	err = rdev->ops->get_station(&rdev->wiphy, dev, addr, &sinfo);

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