]> Pileus Git - ~andy/linux/commitdiff
rt2x00: Remove DRIVER_SUPPORT_WATCHDOG flag
authorHelmut Schaa <helmut.schaa@googlemail.com>
Mon, 28 Mar 2011 11:30:59 +0000 (13:30 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 4 Apr 2011 20:20:02 +0000 (16:20 -0400)
We can simply check if the driver registered the watchdog callback.
There's no need to have an additional flag for that.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2500usb.c
drivers/net/wireless/rt2x00/rt2800usb.c
drivers/net/wireless/rt2x00/rt2x00.h
drivers/net/wireless/rt2x00/rt2x00link.c
drivers/net/wireless/rt2x00/rt73usb.c

index 979fe6596a2d14bee8424b487f963b847bc81ca0..d9e6cec56cb58174f1cd61f642b32bfe57a9fe6b 100644 (file)
@@ -1796,7 +1796,6 @@ static int rt2500usb_probe_hw(struct rt2x00_dev *rt2x00dev)
                __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags);
                __set_bit(DRIVER_REQUIRE_COPY_IV, &rt2x00dev->flags);
        }
-       __set_bit(DRIVER_SUPPORT_WATCHDOG, &rt2x00dev->flags);
        __set_bit(DRIVER_REQUIRE_SW_SEQNO, &rt2x00dev->flags);
 
        /*
index 4e368657a83c1d54fc321d160f24b1502acc5c16..1c99a4f449f5943d094464a350ea128a15a555ea 100644 (file)
@@ -564,7 +564,6 @@ static int rt2800usb_probe_hw(struct rt2x00_dev *rt2x00dev)
        if (!modparam_nohwcrypt)
                __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags);
        __set_bit(DRIVER_SUPPORT_LINK_TUNING, &rt2x00dev->flags);
-       __set_bit(DRIVER_SUPPORT_WATCHDOG, &rt2x00dev->flags);
        __set_bit(DRIVER_REQUIRE_HT_TX_DESC, &rt2x00dev->flags);
 
        /*
index a3940d7300a4856aeb5cd8c06607cf93407c6f3f..60b1cb05a70d8c51ea5b21d33d3a9699b5265518 100644 (file)
@@ -674,7 +674,6 @@ enum rt2x00_flags {
        DRIVER_SUPPORT_CONTROL_FILTER_PSPOLL,
        DRIVER_SUPPORT_PRE_TBTT_INTERRUPT,
        DRIVER_SUPPORT_LINK_TUNING,
-       DRIVER_SUPPORT_WATCHDOG,
 
        /*
         * Driver configuration
index c975b0a12e950a5bfc3764ecec16fb6478580b18..fc8cee91b54efcc467508d1509e41e35889f2f90 100644 (file)
@@ -413,12 +413,11 @@ void rt2x00link_start_watchdog(struct rt2x00_dev *rt2x00dev)
 {
        struct link *link = &rt2x00dev->link;
 
-       if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags) ||
-           !test_bit(DRIVER_SUPPORT_WATCHDOG, &rt2x00dev->flags))
-               return;
-
-       ieee80211_queue_delayed_work(rt2x00dev->hw,
-                                    &link->watchdog_work, WATCHDOG_INTERVAL);
+       if (test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags) &&
+           rt2x00dev->ops->lib->watchdog)
+               ieee80211_queue_delayed_work(rt2x00dev->hw,
+                                            &link->watchdog_work,
+                                            WATCHDOG_INTERVAL);
 }
 
 void rt2x00link_stop_watchdog(struct rt2x00_dev *rt2x00dev)
index 02f1148c577eb1ea01bfa4493c96a98c51d99a59..149e4f928325b3ec90c4fb0222db344c5ce2081a 100644 (file)
@@ -2209,7 +2209,6 @@ static int rt73usb_probe_hw(struct rt2x00_dev *rt2x00dev)
        if (!modparam_nohwcrypt)
                __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags);
        __set_bit(DRIVER_SUPPORT_LINK_TUNING, &rt2x00dev->flags);
-       __set_bit(DRIVER_SUPPORT_WATCHDOG, &rt2x00dev->flags);
 
        /*
         * Set the rssi offset.