aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2011-10-05 05:55:59 -0400
committerLuciano Coelho <coelho@ti.com>2011-10-07 01:32:49 -0400
commitf75c753f3c77b758fa5ace90c15b2ea3b7a3d46d (patch)
tree30f717c80971d921891c3c717a4f8512a189801a
parent6a8997964366f51c39d8efcfdc0e6319b2bd01fa (diff)
wl12xx: move default_key into wlvif
move default_key into the per-interface data, rather than being global. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
-rw-r--r--drivers/net/wireless/wl12xx/main.c7
-rw-r--r--drivers/net/wireless/wl12xx/tx.c4
-rw-r--r--drivers/net/wireless/wl12xx/wl12xx.h6
3 files changed, 8 insertions, 9 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 577266defe9e..09983dee4105 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -2704,7 +2704,7 @@ static int wl1271_ap_init_hwenc(struct wl1271 *wl, struct wl12xx_vif *wlvif)
2704 } 2704 }
2705 2705
2706 if (wep_key_added) { 2706 if (wep_key_added) {
2707 ret = wl12xx_cmd_set_default_wep_key(wl, wl->default_key, 2707 ret = wl12xx_cmd_set_default_wep_key(wl, wlvif->default_key,
2708 wlvif->ap.bcast_hlid); 2708 wlvif->ap.bcast_hlid);
2709 if (ret < 0) 2709 if (ret < 0)
2710 goto out; 2710 goto out;
@@ -2801,8 +2801,8 @@ static int wl1271_set_key(struct wl1271 *wl, struct wl12xx_vif *wlvif,
2801 /* the default WEP key needs to be configured at least once */ 2801 /* the default WEP key needs to be configured at least once */
2802 if (key_type == KEY_WEP) { 2802 if (key_type == KEY_WEP) {
2803 ret = wl12xx_cmd_set_default_wep_key(wl, 2803 ret = wl12xx_cmd_set_default_wep_key(wl,
2804 wl->default_key, 2804 wlvif->default_key,
2805 wlvif->sta.hlid); 2805 wlvif->sta.hlid);
2806 if (ret < 0) 2806 if (ret < 0)
2807 return ret; 2807 return ret;
2808 } 2808 }
@@ -4891,7 +4891,6 @@ struct ieee80211_hw *wl1271_alloc_hw(void)
4891 } 4891 }
4892 4892
4893 wl->channel = WL1271_DEFAULT_CHANNEL; 4893 wl->channel = WL1271_DEFAULT_CHANNEL;
4894 wl->default_key = 0;
4895 wl->rx_counter = 0; 4894 wl->rx_counter = 0;
4896 wl->psm_entry_retry = 0; 4895 wl->psm_entry_retry = 0;
4897 wl->power_level = WL1271_DEFAULT_POWER_LEVEL; 4896 wl->power_level = WL1271_DEFAULT_POWER_LEVEL;
diff --git a/drivers/net/wireless/wl12xx/tx.c b/drivers/net/wireless/wl12xx/tx.c
index 8db68c649437..509ae10f0e03 100644
--- a/drivers/net/wireless/wl12xx/tx.c
+++ b/drivers/net/wireless/wl12xx/tx.c
@@ -424,11 +424,11 @@ static int wl1271_prepare_tx_frame(struct wl1271 *wl, struct sk_buff *skb,
424 is_wep = (cipher == WLAN_CIPHER_SUITE_WEP40) || 424 is_wep = (cipher == WLAN_CIPHER_SUITE_WEP40) ||
425 (cipher == WLAN_CIPHER_SUITE_WEP104); 425 (cipher == WLAN_CIPHER_SUITE_WEP104);
426 426
427 if (unlikely(is_wep && wl->default_key != idx)) { 427 if (unlikely(is_wep && wlvif->default_key != idx)) {
428 ret = wl1271_set_default_wep_key(wl, wlvif, idx); 428 ret = wl1271_set_default_wep_key(wl, wlvif, idx);
429 if (ret < 0) 429 if (ret < 0)
430 return ret; 430 return ret;
431 wl->default_key = idx; 431 wlvif->default_key = idx;
432 } 432 }
433 } 433 }
434 hlid = wl1271_tx_get_hlid(wl, vif, skb); 434 hlid = wl1271_tx_get_hlid(wl, vif, skb);
diff --git a/drivers/net/wireless/wl12xx/wl12xx.h b/drivers/net/wireless/wl12xx/wl12xx.h
index 9d4b72e96c24..91e6cd36bf8b 100644
--- a/drivers/net/wireless/wl12xx/wl12xx.h
+++ b/drivers/net/wireless/wl12xx/wl12xx.h
@@ -503,9 +503,6 @@ struct wl1271 {
503 /* The current band */ 503 /* The current band */
504 enum ieee80211_band band; 504 enum ieee80211_band band;
505 505
506 /* Default key (for WEP) */
507 u32 default_key;
508
509 /* Rx Streaming */ 506 /* Rx Streaming */
510 struct work_struct rx_streaming_enable_work; 507 struct work_struct rx_streaming_enable_work;
511 struct work_struct rx_streaming_disable_work; 508 struct work_struct rx_streaming_disable_work;
@@ -645,6 +642,9 @@ struct wl12xx_vif {
645 /* Beaconing interval (needed for ad-hoc) */ 642 /* Beaconing interval (needed for ad-hoc) */
646 u32 beacon_int; 643 u32 beacon_int;
647 644
645 /* Default key (for WEP) */
646 u32 default_key;
647
648 /* Our association ID */ 648 /* Our association ID */
649 u16 aid; 649 u16 aid;
650 650