Search Linux Wireless

Re: [PATCH 26/29] mac80211 : fix for iwconfig in ad-hoc mode

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

 



On Thu, 2008-06-12 at 09:47 +0800, Zhu Yi wrote:
> From: Abhijeet Kolekar <abhijeet.kolekar@xxxxxxxxx>
> 
> The patch checks interface status, if it is in IBSS_JOINED mode
> show cell id it is associated with.
> 
> Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@xxxxxxxxx>

Good catch.  This is actually a regression since 2.6.25.3 where the code
didn't care about the state but was just:

        if (sdata->vif.type == IEEE80211_IF_TYPE_STA ||
            sdata->vif.type == IEEE80211_IF_TYPE_IBSS) {
                ap_addr->sa_family = ARPHRD_ETHER;
                memcpy(&ap_addr->sa_data, sdata->u.sta.bssid, ETH_ALEN);
                return 0;

John, this is a good candidate for 2.6.26 as it's technically a
regression, even though impact is probably low.

Dan

>  net/mac80211/wext.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
> index 4806d96..5af3862 100644
> --- a/net/mac80211/wext.c
> +++ b/net/mac80211/wext.c
> @@ -508,7 +508,8 @@ static int ieee80211_ioctl_giwap(struct net_device *dev,
>  	sdata = IEEE80211_DEV_TO_SUB_IF(dev);
>  	if (sdata->vif.type == IEEE80211_IF_TYPE_STA ||
>  	    sdata->vif.type == IEEE80211_IF_TYPE_IBSS) {
> -		if (sdata->u.sta.state == IEEE80211_ASSOCIATED) {
> +		if (sdata->u.sta.state == IEEE80211_ASSOCIATED ||
> +		    sdata->u.sta.state == IEEE80211_IBSS_JOINED) {
>  			ap_addr->sa_family = ARPHRD_ETHER;
>  			memcpy(&ap_addr->sa_data, sdata->u.sta.bssid, ETH_ALEN);
>  			return 0;

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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