Search Linux Wireless

Re: [RFC 14/14] cfg80211: respect iface combinations when starting operation

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

 



hi Michal,

On Mon, May 28, 2012 at 2:19 PM, Michal Kazior <michal.kazior@xxxxxxxxx> wrote:
> Use cfg80211_can_change_interface before starting
> up any operation modes such as .start_ap or .auth
> to verify whether we comply with
> num_different_channels within at least one
> interface combination.
>
> Change-Id: I270c18855e28e3b7d63013f66fae5146bfd0826e
> Signed-off-by: Michal Kazior <michal.kazior@xxxxxxxxx>
> ---
[...]

> @@ -168,7 +173,9 @@ int cfg80211_join_mesh(struct cfg80211_registered_device *rdev,
>        int err;
>
>        wdev_lock(wdev);
> +       mutex_lock(&rdev->devlist_mtx);
>        err = __cfg80211_join_mesh(rdev, dev, setup, conf);

the locking order should be the other way around.

> diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
> index 83155ee..9e5cab6 100644
> --- a/net/wireless/mlme.c
> +++ b/net/wireless/mlme.c
> @@ -302,8 +302,14 @@ int __cfg80211_mlme_auth(struct cfg80211_registered_device *rdev,
>        if (!req.bss)
>                return -ENOENT;
>
> +       err = cfg80211_can_change_interface(rdev, wdev, wdev->iftype,
> +                                           req.bss->channel);

i'm not sure whether it's intended, but cfg80211_mlme_auth() doesn't
take devlist_mtx, so it's missing.

Eliad.
--
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 Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux