summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rtl818x/rtl8187_dev.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2009-12-23 02:13:05 +0300
committerJohn W. Linville <linville@tuxdriver.com>2009-12-29 00:31:38 +0300
commitd30506e0357e5448c7d38bb3739c451dbe4c174e (patch)
treec1f828d8097c373a657f6411a2a6290ff5b9bfc3 /drivers/net/wireless/rtl818x/rtl8187_dev.c
parent643aab6733799586c798a7b54b85c34d587b25e3 (diff)
downloadlinux-d30506e0357e5448c7d38bb3739c451dbe4c174e.tar.xz
rtl8187: remove priv->mode
It is checked in add_interface, but there it is easily replaced with a check of priv->vif. If that information should become necessary, it is available in vif->type anyway. It is also checked in led_turn_on and led_turn_off, where I made the substitutions as described above. Of course, these checks seem to have been incorrect since the driver was using NL80211_IFTYPE_MONITOR to indicate no interface rather than NL80211_IFTYPE_UNSPECIFIED. Anyway, I think these checks may be extraneous...? Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtl818x/rtl8187_dev.c')
-rw-r--r--drivers/net/wireless/rtl818x/rtl8187_dev.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/wireless/rtl818x/rtl8187_dev.c b/drivers/net/wireless/rtl818x/rtl8187_dev.c
index bc5726dd5fe4..1cb0eff46223 100644
--- a/drivers/net/wireless/rtl818x/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8187_dev.c
@@ -1025,12 +1025,11 @@ static int rtl8187_add_interface(struct ieee80211_hw *dev,
int ret = -EOPNOTSUPP;
mutex_lock(&priv->conf_mutex);
- if (priv->mode != NL80211_IFTYPE_MONITOR)
+ if (priv->vif)
goto exit;
switch (conf->type) {
case NL80211_IFTYPE_STATION:
- priv->mode = conf->type;
break;
default:
goto exit;
@@ -1055,7 +1054,6 @@ static void rtl8187_remove_interface(struct ieee80211_hw *dev,
{
struct rtl8187_priv *priv = dev->priv;
mutex_lock(&priv->conf_mutex);
- priv->mode = NL80211_IFTYPE_MONITOR;
priv->vif = NULL;
mutex_unlock(&priv->conf_mutex);
}
@@ -1365,7 +1363,6 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band;
- priv->mode = NL80211_IFTYPE_MONITOR;
dev->flags = IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
IEEE80211_HW_SIGNAL_DBM |
IEEE80211_HW_RX_INCLUDES_FCS;