Search Linux Wireless

Re: [PATCH] mac80211: Allow scan to be requested in AP mode

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

 



On Thu, 2009-04-16 at 18:44 +0300, Jouni Malinen wrote:
> We can allow scan requests in AP mode as long as the interface has not
> yet been configured to send out Beacon frames (or if beaconing has
> been disabled prior to the scan request). This makes it easier to scan
> for neighboring BSSes during AP initialization and makes it possible
> to run a scan without setting the interface down, if needed. Without
> this change, the only available option would be to set the interface
> down, move into station mode, and set the interface up, prior to
> requesting the scan.
> 
> Signed-off-by: Jouni Malinen <jouni.malinen@xxxxxxxxxxx>
> 
> ---
>  net/mac80211/cfg.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> --- uml.orig/net/mac80211/cfg.c	2009-04-16 18:20:19.000000000 +0300
> +++ uml/net/mac80211/cfg.c	2009-04-16 18:33:44.000000000 +0300
> @@ -1167,7 +1167,8 @@ static int ieee80211_scan(struct wiphy *
>  
>  	if (sdata->vif.type != NL80211_IFTYPE_STATION &&
>  	    sdata->vif.type != NL80211_IFTYPE_ADHOC &&
> -	    sdata->vif.type != NL80211_IFTYPE_MESH_POINT)
> +	    sdata->vif.type != NL80211_IFTYPE_MESH_POINT &&
> +	    (sdata->vif.type != NL80211_IFTYPE_AP || sdata->u.ap.beacon))
>  		return -EOPNOTSUPP;

Should this return a different error code for AP then? Maybe -EBUSY for
AP && beacon? Then again, EBUSY is already returned for "already
scanning". hmm.

johannes

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