rt2x00: Implement support for 802.11n
[safe/jmp/linux-2.6] / drivers / net / wireless / rt2x00 / rt2x00config.c
index ab139f2..863e399 100644 (file)
@@ -1,5 +1,5 @@
 /*
-       Copyright (C) 2004 - 2008 rt2x00 SourceForge Project
+       Copyright (C) 2004 - 2009 rt2x00 SourceForge Project
        <http://rt2x00.serialmonkey.com>
 
        This program is free software; you can redistribute it and/or modify
@@ -32,7 +32,7 @@
 void rt2x00lib_config_intf(struct rt2x00_dev *rt2x00dev,
                           struct rt2x00_intf *intf,
                           enum nl80211_iftype type,
-                          u8 *mac, u8 *bssid)
+                          const u8 *mac, const u8 *bssid)
 {
        struct rt2x00intf_conf conf;
        unsigned int flags = 0;
@@ -173,6 +173,11 @@ void rt2x00lib_config(struct rt2x00_dev *rt2x00dev,
        libconf.conf = conf;
 
        if (ieee80211_flags & IEEE80211_CONF_CHANGE_CHANNEL) {
+               if (conf_is_ht40(conf))
+                       __set_bit(CONFIG_CHANNEL_HT40, &rt2x00dev->flags);
+               else
+                       __clear_bit(CONFIG_CHANNEL_HT40, &rt2x00dev->flags);
+
                memcpy(&libconf.rf,
                       &rt2x00dev->spec.channels[conf->channel->hw_value],
                       sizeof(libconf.rf));