Search Linux Wireless

[PATCH 6/6] wl12xx: update set_key callback to match current API

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

 



Use the new prototype for ops->set_key which now takes a vif pointer
and sta pointer instead of a pair of addresses.  Remove the debug
statement for local_addr since wl12xx_op_set_key doesn't use the vif
pointer anyway.
---
 drivers/net/wireless/wl12xx/main.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 76b1efc..edf9ec1 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -840,28 +840,30 @@ static int wl12xx_set_key_type(struct wl12xx *wl, struct acx_set_key *key,
 }
 
 static int wl12xx_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
-			     const u8 *local_addr, const u8 *addr,
+			     struct ieee80211_vif *vif,
+			     struct ieee80211_sta *sta,
 			     struct ieee80211_key_conf *key)
 {
 	struct wl12xx *wl = hw->priv;
 	struct acx_set_key wl_key;
+	const u8 *addr;
 	int ret;
 
+	static const u8 bcast_addr[ETH_ALEN] =
+		{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
+
 	wl12xx_debug(DEBUG_MAC80211, "mac80211 set key");
 
 	memset(&wl_key, 0, sizeof(wl_key));
 
+	addr = sta ? sta->addr : bcast_addr;
+
 	wl12xx_debug(DEBUG_CRYPT, "CMD: 0x%x", cmd);
 	wl12xx_dump(DEBUG_CRYPT, "ADDR: ", addr, ETH_ALEN);
-	wl12xx_dump(DEBUG_CRYPT, "LOCAL_ADDR: ", local_addr, ETH_ALEN);
 	wl12xx_debug(DEBUG_CRYPT, "Key: algo:0x%x, id:%d, len:%d flags 0x%x",
 		     key->alg, key->keyidx, key->keylen, key->flags);
 	wl12xx_dump(DEBUG_CRYPT, "KEY: ", key->key, key->keylen);
 
-	if (is_zero_ether_addr(addr))
-		/* We dont support TX only encryption */
-		return -EOPNOTSUPP;
-
 	mutex_lock(&wl->mutex);
 
 	switch (cmd) {
-- 
1.6.0.6


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