Search Linux Wireless

Re: [RFT] mac80211: clean up set_key callback

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

 



On Monday 08 December 2008 18:23:55 Johannes Berg wrote:
> The set_key callback now seems rather odd, passing a MAC address
> instead of a station struct, and a local address instead of a
> vif struct. Change that.
> 
> Signed-off-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>
> ---
Acked-by: Christian Lamparter <chunkeey@xxxxxx>

> --- everything.orig/drivers/net/wireless/p54/p54common.c	2008-12-08 17:47:11.000000000 +0100
> +++ everything/drivers/net/wireless/p54/p54common.c	2008-12-08 17:53:09.000000000 +0100
> @@ -1938,7 +1938,7 @@ static void p54_bss_info_changed(struct 
>  }
>  
>  static int p54_set_key(struct ieee80211_hw *dev, enum set_key_cmd cmd,
> -		       const u8 *local_address, const u8 *address,
> +		       struct ieee80211_vif *vif, struct ieee80211_sta *sta,
>  		       struct ieee80211_key_conf *key)
>  {
>  	struct p54_common *priv = dev->priv;
> @@ -2002,8 +2002,8 @@ static int p54_set_key(struct ieee80211_
>  	rxkey->entry = key->keyidx;
>  	rxkey->key_id = key->keyidx;
>  	rxkey->key_type = algo;
> -	if (address)
> -		memcpy(rxkey->mac, address, ETH_ALEN);
> +	if (sta)
> +		memcpy(rxkey->mac, sta->addr, ETH_ALEN);
>  	else
>  		memset(rxkey->mac, ~0, ETH_ALEN);
>  	if (key->alg != ALG_TKIP) {
--
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