summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/libertas/wext.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-12-11 15:50:59 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 15:06:49 -0800
commit8e3c91bb70372da692a5fefae9f698c94bb1e641 (patch)
treec8befebaafa59facde125257c626c3440a22f785 /drivers/net/wireless/libertas/wext.c
parent79a9a37c1eb13bd645ec423c0c30b70838e7bf93 (diff)
libertas: convert DATA_RATE to a direct command
Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/wext.c')
-rw-r--r--drivers/net/wireless/libertas/wext.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c
index 1e0b2245db56..e44c0ce804ed 100644
--- a/drivers/net/wireless/libertas/wext.c
+++ b/drivers/net/wireless/libertas/wext.c
@@ -19,6 +19,7 @@
#include "join.h"
#include "wext.h"
#include "assoc.h"
+#include "cmd.h"
static inline void lbs_postpone_association_work(struct lbs_private *priv)
@@ -962,8 +963,7 @@ static int lbs_set_rate(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra)
{
struct lbs_private *priv = dev->priv;
- u32 new_rate;
- u16 action;
+ u8 new_rate = 0;
int ret = -EINVAL;
u8 rates[MAX_RATES + 1];
@@ -972,7 +972,6 @@ static int lbs_set_rate(struct net_device *dev, struct iw_request_info *info,
/* Auto rate? */
if (vwrq->value == -1) {
- action = CMD_ACT_SET_TX_AUTO;
priv->auto_rate = 1;
priv->cur_rate = 0;
} else {
@@ -989,12 +988,10 @@ static int lbs_set_rate(struct net_device *dev, struct iw_request_info *info,
}
priv->cur_rate = new_rate;
- action = CMD_ACT_SET_TX_FIX_RATE;
priv->auto_rate = 0;
}
- ret = lbs_prepare_and_send_command(priv, CMD_802_11_DATA_RATE,
- action, CMD_OPTION_WAITFORRSP, 0, NULL);
+ ret = lbs_set_data_rate(priv, new_rate);
out:
lbs_deb_leave_args(LBS_DEB_WEXT, "ret %d", ret);