summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/assoc.c
diff options
context:
space:
mode:
authorDavid Woodhouse2007-12-18 06:18:05 +0100
committerDavid S. Miller2008-01-29 00:07:49 +0100
commitf70dd4515a8ad9c9d59ebb8c1d1fa2c610fb4020 (patch)
treeb9c5f3682972024fad4726a4163bbfb74a55ac0b /drivers/net/wireless/libertas/assoc.c
parentlibertas: convert SLEEP_PARAMS to a direct command (diff)
downloadkernel-qcow2-linux-f70dd4515a8ad9c9d59ebb8c1d1fa2c610fb4020.tar.gz
kernel-qcow2-linux-f70dd4515a8ad9c9d59ebb8c1d1fa2c610fb4020.tar.xz
kernel-qcow2-linux-f70dd4515a8ad9c9d59ebb8c1d1fa2c610fb4020.zip
libertas: convert SET_WEP to a direct command
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/assoc.c')
-rw-r--r--drivers/net/wireless/libertas/assoc.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c
index 882e51c16a75..e91cd6724de7 100644
--- a/drivers/net/wireless/libertas/assoc.c
+++ b/drivers/net/wireless/libertas/assoc.c
@@ -258,7 +258,7 @@ static int assoc_helper_channel(struct lbs_private *priv,
static int assoc_helper_wep_keys(struct lbs_private *priv,
- struct assoc_request * assoc_req)
+ struct assoc_request *assoc_req)
{
int i;
int ret = 0;
@@ -266,22 +266,11 @@ static int assoc_helper_wep_keys(struct lbs_private *priv,
lbs_deb_enter(LBS_DEB_ASSOC);
/* Set or remove WEP keys */
- if ( assoc_req->wep_keys[0].len
- || assoc_req->wep_keys[1].len
- || assoc_req->wep_keys[2].len
- || assoc_req->wep_keys[3].len) {
- ret = lbs_prepare_and_send_command(priv,
- CMD_802_11_SET_WEP,
- CMD_ACT_ADD,
- CMD_OPTION_WAITFORRSP,
- 0, assoc_req);
- } else {
- ret = lbs_prepare_and_send_command(priv,
- CMD_802_11_SET_WEP,
- CMD_ACT_REMOVE,
- CMD_OPTION_WAITFORRSP,
- 0, NULL);
- }
+ if (assoc_req->wep_keys[0].len || assoc_req->wep_keys[1].len ||
+ assoc_req->wep_keys[2].len || assoc_req->wep_keys[3].len)
+ ret = lbs_cmd_802_11_set_wep(priv, CMD_ACT_ADD, assoc_req);
+ else
+ ret = lbs_cmd_802_11_set_wep(priv, CMD_ACT_REMOVE, assoc_req);
if (ret)
goto out;
@@ -291,6 +280,7 @@ static int assoc_helper_wep_keys(struct lbs_private *priv,
priv->currentpacketfilter |= CMD_ACT_MAC_WEP_ENABLE;
else
priv->currentpacketfilter &= ~CMD_ACT_MAC_WEP_ENABLE;
+
ret = lbs_set_mac_packet_filter(priv);
if (ret)
goto out;
@@ -300,7 +290,7 @@ static int assoc_helper_wep_keys(struct lbs_private *priv,
/* Copy WEP keys into priv wep key fields */
for (i = 0; i < 4; i++) {
memcpy(&priv->wep_keys[i], &assoc_req->wep_keys[i],
- sizeof(struct enc_key));
+ sizeof(struct enc_key));
}
priv->wep_tx_keyidx = assoc_req->wep_tx_keyidx;