Search Linux Wireless

Re: [PATCH 1/2] mac80211: Support iwconfig enc restricted with WEP

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

 



On Mon, 2008-09-15 at 17:47 +0200, Ortwin Glück wrote:
> The mac80211 code doesn't handle WEP with shared keys correctly. Using the ath9k 
> driver on my MacBook I am unable to put the driver into restricted mode (shared 
> key). It stays in open mode. That is the following command has no effect: 
> iwconfig wlan0 enc restricted. I can also confirm this when looking at the 
> authentication packets that go over the air: they are sent with the open flag, 
> and not the shared key flag.
> 
> Signed-off-by: Ortwin Glueck <odi@xxxxxx>
> ---
>   net/mac80211/wext.c |   12 ++++++++++++
>   1 files changed, 12 insertions(+), 0 deletions(-)
> 
> diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
> index 34fa8ed..645c276 100644
> --- a/net/mac80211/wext.c
> +++ b/net/mac80211/wext.c
> @@ -929,6 +929,18 @@ static int ieee80211_ioctl_siwencode(struct net_device *dev,
>   	else
>   		idx--;
> 
> +	if (sdata->vif.type == IEEE80211_IF_TYPE_STA) {
> +		struct ieee80211_if_sta *ifsta = &sdata->u.sta;
> +		if (erq->flags & IW_ENCODE_OPEN) {
> +			printk("wext: open\n");
> +			ifsta->auth_alg = WLAN_AUTH_OPEN;
> +		}
> +		else if (erq->flags & IW_ENCODE_RESTRICTED) {
> +			printk("wext: shared key\n");
> +			ifsta->auth_alg = WLAN_AUTH_SHARED_KEY;
> +		}

remove the printks please

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