summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/cfg.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2010-07-27 12:54:34 -0700
committerJohn W. Linville <linville@tuxdriver.com>2010-07-27 15:03:29 -0400
commita45b6f4f9ef7fde2321da5aaa7db0e1e793a5b1e (patch)
treed38142f7db7ad6b63f37ca902ff40f70bc439969 /drivers/net/wireless/libertas/cfg.c
parent98ec62185cd940765a096c88a3f14147dd1d3bd4 (diff)
libertas: clean up MONITOR_MODE command
Convert to a full direct command; previous code rolled a direct command by handle but left the original indirect command code lying around. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/cfg.c')
-rw-r--r--drivers/net/wireless/libertas/cfg.c57
1 files changed, 3 insertions, 54 deletions
diff --git a/drivers/net/wireless/libertas/cfg.c b/drivers/net/wireless/libertas/cfg.c
index 7e074160885..5110a771464 100644
--- a/drivers/net/wireless/libertas/cfg.c
+++ b/drivers/net/wireless/libertas/cfg.c
@@ -7,7 +7,6 @@
*/
#include <linux/slab.h>
-#include <linux/if_arp.h>
#include <linux/ieee80211.h>
#include <net/cfg80211.h>
#include <asm/unaligned.h>
@@ -1383,56 +1382,6 @@ static int lbs_cfg_del_key(struct wiphy *wiphy, struct net_device *netdev,
}
-
-/***************************************************************************
- * Monitor mode
- */
-
-/* like "struct cmd_ds_802_11_monitor_mode", but with cmd_header. Once we
- * get rid of WEXT, this should go into host.h */
-struct cmd_monitor_mode {
- struct cmd_header hdr;
-
- __le16 action;
- __le16 mode;
-} __packed;
-
-static int lbs_enable_monitor_mode(struct lbs_private *priv, int mode)
-{
- struct cmd_monitor_mode cmd;
- int ret;
-
- lbs_deb_enter(LBS_DEB_CFG80211);
-
- /*
- * cmd 98 00
- * size 0c 00
- * sequence xx xx
- * result 00 00
- * action 01 00 ACT_SET
- * enable 01 00
- */
- memset(&cmd, 0, sizeof(cmd));
- cmd.hdr.size = cpu_to_le16(sizeof(cmd));
- cmd.action = cpu_to_le16(CMD_ACT_SET);
- cmd.mode = cpu_to_le16(mode);
-
- ret = lbs_cmd_with_response(priv, CMD_802_11_MONITOR_MODE, &cmd);
-
- if (ret == 0)
- priv->dev->type = ARPHRD_IEEE80211_RADIOTAP;
- else
- priv->dev->type = ARPHRD_ETHER;
-
- lbs_deb_leave(LBS_DEB_CFG80211);
- return ret;
-}
-
-
-
-
-
-
/***************************************************************************
* Get station
*/
@@ -1558,17 +1507,17 @@ static int lbs_change_intf(struct wiphy *wiphy, struct net_device *dev,
switch (type) {
case NL80211_IFTYPE_MONITOR:
- ret = lbs_enable_monitor_mode(priv, 1);
+ ret = lbs_set_monitor_mode(priv, 1);
break;
case NL80211_IFTYPE_STATION:
if (priv->wdev->iftype == NL80211_IFTYPE_MONITOR)
- ret = lbs_enable_monitor_mode(priv, 0);
+ ret = lbs_set_monitor_mode(priv, 0);
if (!ret)
ret = lbs_set_snmp_mib(priv, SNMP_MIB_OID_BSS_TYPE, 1);
break;
case NL80211_IFTYPE_ADHOC:
if (priv->wdev->iftype == NL80211_IFTYPE_MONITOR)
- ret = lbs_enable_monitor_mode(priv, 0);
+ ret = lbs_set_monitor_mode(priv, 0);
if (!ret)
ret = lbs_set_snmp_mib(priv, SNMP_MIB_OID_BSS_TYPE, 2);
break;