]> err.no Git - linux-2.6/commitdiff
rt2x00: Add support for CTS protection in rt2x00lib
authorIvo van Doorn <ivdoorn@gmail.com>
Wed, 9 Jul 2008 13:12:06 +0000 (15:12 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 14 Jul 2008 18:52:56 +0000 (14:52 -0400)
Inform drivers about the changed CTS protection settings.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2x00.h
drivers/net/wireless/rt2x00/rt2x00config.c
drivers/net/wireless/rt2x00/rt2x00mac.c

index 9ad3ce43e6cd5a524df3746d06b423f9ef68b338..b32fedf4a1b907f005fce31f38befca45d722b4b 100644 (file)
@@ -434,6 +434,7 @@ struct rt2x00lib_conf {
  */
 struct rt2x00lib_erp {
        int short_preamble;
+       int cts_protection;
 
        int ack_timeout;
        int ack_consume_time;
index 48608e8cc8b4a50ef01a559314e4375e7214c946..f20ca712504f734a39e8d5ee5a2264ad955365f7 100644 (file)
@@ -84,6 +84,8 @@ void rt2x00lib_config_erp(struct rt2x00_dev *rt2x00dev,
        memset(&erp, 0, sizeof(erp));
 
        erp.short_preamble = bss_conf->use_short_preamble;
+       erp.cts_protection = bss_conf->use_cts_prot;
+
        erp.ack_timeout = PLCP + get_duration(ACK_SIZE, 10);
        erp.ack_consume_time = SIFS + PLCP + get_duration(ACK_SIZE, 10);
 
index 84b51f49175ea4fcfa570584be98f5ec777d26d8..ff853c430bdf5c226908b4975c9ea23d2702be02 100644 (file)
@@ -511,7 +511,7 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw,
         * When the erp information has changed, we should perform
         * additional configuration steps. For all other changes we are done.
         */
-       if (changes & BSS_CHANGED_ERP_PREAMBLE) {
+       if (changes & (BSS_CHANGED_ERP_PREAMBLE | BSS_CHANGED_ERP_CTS_PROT)) {
                if (!test_bit(DRIVER_REQUIRE_SCHEDULED, &rt2x00dev->flags))
                        rt2x00lib_config_erp(rt2x00dev, intf, bss_conf);
                else