summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00config.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2007-09-25 20:55:39 +0200
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-11 01:53:03 +0200
commit066cb637b1b562bebd09d237bfaaca6724f247e5 (patch)
tree340b3902e69246cb73e820bbd9994bd1bdcca402 /drivers/net/wireless/rt2x00/rt2x00config.c
parent[PATCH] rt2x00: Correctly identify rt2561turbo (diff)
downloadlinux-066cb637b1b562bebd09d237bfaaca6724f247e5.tar.xz
linux-066cb637b1b562bebd09d237bfaaca6724f247e5.zip
[PATCH] rt2x00: Reorganize rt2x00dev->flags
The rt2x00dev->flags has become a chaos over time, this will reorganize the flags by renaming, deleting, adding and properly implement the flags. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00config.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00config.c27
1 files changed, 7 insertions, 20 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c b/drivers/net/wireless/rt2x00/rt2x00config.c
index f962ce497086..13b510687bcb 100644
--- a/drivers/net/wireless/rt2x00/rt2x00config.c
+++ b/drivers/net/wireless/rt2x00/rt2x00config.c
@@ -48,33 +48,20 @@ void rt2x00lib_config_bssid(struct rt2x00_dev *rt2x00dev, u8 *bssid)
void rt2x00lib_config_type(struct rt2x00_dev *rt2x00dev, int type)
{
- struct interface *intf = &rt2x00dev->interface;
-
- if (!test_bit(INTERFACE_RESUME, &rt2x00dev->flags) &&
- (!!test_bit(INTERFACE_ENABLED, &rt2x00dev->flags) ==
- !!is_interface_present(intf)))
- return;
-
- rt2x00dev->ops->lib->config_type(rt2x00dev, type);
-
- /*
- * Update the configuration flags.
- */
- if (is_interface_present(intf))
- __set_bit(INTERFACE_ENABLED, &rt2x00dev->flags);
- else
- __clear_bit(INTERFACE_ENABLED, &rt2x00dev->flags);
+ if (type != INVALID_INTERFACE)
+ rt2x00dev->ops->lib->config_type(rt2x00dev, type);
}
-void rt2x00lib_config(struct rt2x00_dev *rt2x00dev, struct ieee80211_conf *conf)
+void rt2x00lib_config(struct rt2x00_dev *rt2x00dev,
+ struct ieee80211_conf *conf, const int force_config)
{
int flags = 0;
/*
- * If we are in RESUME state we should
- * force all configuration options.
+ * In some situations we want to force all configurations
+ * to be reloaded (When resuming for instance).
*/
- if (test_bit(INTERFACE_RESUME, &rt2x00dev->flags)) {
+ if (force_config) {
flags = CONFIG_UPDATE_ALL;
goto config;
}