Search Linux Wireless

Re: [PATCH] chan.c: fix chan.c to return channel number when in monitor mode and on a fixed channel.

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

 



On Thu, 2011-06-23 at 16:49 -0400, Nicholas Hockey wrote:
> (sorry if this is not right, its been nearly 10 years since i
> submitted a kernel patch)

Listing cfg80211 isntead of "chan.c" would have been useful :-)

> Fixes: When monitoring a fixed channel, chan.c does not report what
> channel it is on.
> 
> Signed-off-by: Nicholas Hockey <nhockey@xxxxxxxxx>
> ---
> diff --git a/net/wireless/chan.c b/net/wireless/chan.c
> index 17cd0c0..261ee32 100644
> --- a/net/wireless/chan.c
> +++ b/net/wireless/chan.c
> @@ -82,10 +82,12 @@ int cfg80211_set_freq(struct
> cfg80211_registered_device *rdev,
>  {
>         struct ieee80211_channel *chan;
>         int result;
> +    struct wireless_dev *mon_dev = NULL;
> 
> -       if (wdev && wdev->iftype == NL80211_IFTYPE_MONITOR)
> +       if (wdev && wdev->iftype == NL80211_IFTYPE_MONITOR) {
> +        mon_dev = wdev;
>                 wdev = NULL;
> -
> +    }
>         if (wdev) {
>                 ASSERT_WDEV_LOCK(wdev);
> 
> @@ -131,5 +133,8 @@ int cfg80211_set_freq(struct
> cfg80211_registered_device *rdev,
>         if (wdev)
>                 wdev->channel = chan;
> 
> +    if (mon_dev)
> +        mon_dev->channel = chan;
> +

This has been discussed numerous times, this change still isn't right
because monitors are slaved to others.

johannes

--
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