aboutsummaryrefslogtreecommitdiffstats
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 18:06:49 -0500
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 @@
19#include "join.h" 19#include "join.h"
20#include "wext.h" 20#include "wext.h"
21#include "assoc.h" 21#include "assoc.h"
22#include "cmd.h"
22 23
23 24
24static inline void lbs_postpone_association_work(struct lbs_private *priv) 25static 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,
962 struct iw_param *vwrq, char *extra) 963 struct iw_param *vwrq, char *extra)
963{ 964{
964 struct lbs_private *priv = dev->priv; 965 struct lbs_private *priv = dev->priv;
965 u32 new_rate; 966 u8 new_rate = 0;
966 u16 action;
967 int ret = -EINVAL; 967 int ret = -EINVAL;
968 u8 rates[MAX_RATES + 1]; 968 u8 rates[MAX_RATES + 1];
969 969
@@ -972,7 +972,6 @@ static int lbs_set_rate(struct net_device *dev, struct iw_request_info *info,
972 972
973 /* Auto rate? */ 973 /* Auto rate? */
974 if (vwrq->value == -1) { 974 if (vwrq->value == -1) {
975 action = CMD_ACT_SET_TX_AUTO;
976 priv->auto_rate = 1; 975 priv->auto_rate = 1;
977 priv->cur_rate = 0; 976 priv->cur_rate = 0;
978 } else { 977 } else {
@@ -989,12 +988,10 @@ static int lbs_set_rate(struct net_device *dev, struct iw_request_info *info,
989 } 988 }
990 989
991 priv->cur_rate = new_rate; 990 priv->cur_rate = new_rate;
992 action = CMD_ACT_SET_TX_FIX_RATE;
993 priv->auto_rate = 0; 991 priv->auto_rate = 0;
994 } 992 }
995 993
996 ret = lbs_prepare_and_send_command(priv, CMD_802_11_DATA_RATE, 994 ret = lbs_set_data_rate(priv, new_rate);
997 action, CMD_OPTION_WAITFORRSP, 0, NULL);
998 995
999out: 996out:
1000 lbs_deb_leave_args(LBS_DEB_WEXT, "ret %d", ret); 997 lbs_deb_leave_args(LBS_DEB_WEXT, "ret %d", ret);