aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2010-02-18 06:25:50 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-02-19 15:52:46 -0500
commitee444cf0501183df1640cd35bebd4250989bfe99 (patch)
tree7e181a105e8a13ab4edf63d3753bf71383b0363d /drivers
parentfddc7dd7deaa400db314b214d92de95f865a8af0 (diff)
wl1271: Fix WEP key handling
WEP key index handling was broken: the default key when using key 0 was never specified to the FW, and if using other default than 0, it would be set on the TX path for every single TX'd frame. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_main.c8
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_tx.c1
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 4a0a15bcd67e..459d9a0931f4 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -1475,6 +1475,14 @@ static int wl1271_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
1475 wl1271_error("Could not add or replace key"); 1475 wl1271_error("Could not add or replace key");
1476 goto out_sleep; 1476 goto out_sleep;
1477 } 1477 }
1478
1479 /* the default WEP key needs to be configured at least once */
1480 if (key_type == KEY_WEP) {
1481 ret = wl1271_cmd_set_default_wep_key(wl,
1482 wl->default_key);
1483 if (ret < 0)
1484 goto out_sleep;
1485 }
1478 break; 1486 break;
1479 1487
1480 case DISABLE_KEY: 1488 case DISABLE_KEY:
diff --git a/drivers/net/wireless/wl12xx/wl1271_tx.c b/drivers/net/wireless/wl12xx/wl1271_tx.c
index f6815a9239e5..f9e06385d9fe 100644
--- a/drivers/net/wireless/wl12xx/wl1271_tx.c
+++ b/drivers/net/wireless/wl12xx/wl1271_tx.c
@@ -203,6 +203,7 @@ static int wl1271_tx_frame(struct wl1271 *wl, struct sk_buff *skb)
203 ret = wl1271_cmd_set_default_wep_key(wl, idx); 203 ret = wl1271_cmd_set_default_wep_key(wl, idx);
204 if (ret < 0) 204 if (ret < 0)
205 return ret; 205 return ret;
206 wl->default_key = idx;
206 } 207 }
207 } 208 }
208 209