提交 ee444cf0 编写于 作者: J Juuso Oikarinen 提交者: John W. Linville

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: NJuuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: NKalle Valo <kalle.valo@nokia.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 fddc7dd7
...@@ -1475,6 +1475,14 @@ static int wl1271_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, ...@@ -1475,6 +1475,14 @@ static int wl1271_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
wl1271_error("Could not add or replace key"); wl1271_error("Could not add or replace key");
goto out_sleep; goto out_sleep;
} }
/* the default WEP key needs to be configured at least once */
if (key_type == KEY_WEP) {
ret = wl1271_cmd_set_default_wep_key(wl,
wl->default_key);
if (ret < 0)
goto out_sleep;
}
break; break;
case DISABLE_KEY: case DISABLE_KEY:
......
...@@ -203,6 +203,7 @@ static int wl1271_tx_frame(struct wl1271 *wl, struct sk_buff *skb) ...@@ -203,6 +203,7 @@ static int wl1271_tx_frame(struct wl1271 *wl, struct sk_buff *skb)
ret = wl1271_cmd_set_default_wep_key(wl, idx); ret = wl1271_cmd_set_default_wep_key(wl, idx);
if (ret < 0) if (ret < 0)
return ret; return ret;
wl->default_key = idx;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册