[PATCH] libertas: remove adapter->adhoc_grate_enabled
authorHolger Schurig <hs4233@mail.mn-solutions.de>
Thu, 2 Aug 2007 17:11:19 +0000 (13:11 -0400)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:50:06 +0000 (16:50 -0700)
The variable was initialized with 0 (false). There is no code that would
ever change it, so we can use the false-patch directly.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/dev.h
drivers/net/wireless/libertas/join.c
drivers/net/wireless/libertas/main.c

index 4738afa61e3314a8c1f235215426d198aa4660b9..90e9405903babd521f7d9591e7971e0f00b1201b 100644 (file)
@@ -281,8 +281,6 @@ struct _wlan_adapter {
 
        u16 enablehwauto;
        u16 ratebitmap;
-       /** control G rates */
-       u8 adhoc_grate_enabled;
 
        u32 fragthsd;
        u32 rtsthsd;
index e335a7e4adaa79fb43923319f962261f6e30b65e..95c21bae60f5726ac13fc37f312d5bc11ae5eed2 100644 (file)
@@ -534,13 +534,8 @@ int libertas_cmd_80211_ad_hoc_start(wlan_private * priv,
        adhs->probedelay = cpu_to_le16(CMD_SCAN_PROBE_DELAY_TIME);
 
        memset(adhs->rates, 0, sizeof(adhs->rates));
-       if (adapter->adhoc_grate_enabled) {
-               ratesize = min(sizeof(adhs->rates), sizeof(libertas_bg_rates));
-               memcpy(adhs->rates, libertas_bg_rates, ratesize);
-       } else {
-               ratesize = min(sizeof(adhs->rates), sizeof(adhoc_rates_b));
-               memcpy(adhs->rates, adhoc_rates_b, ratesize);
-       }
+       ratesize = min(sizeof(adhs->rates), sizeof(adhoc_rates_b));
+       memcpy(adhs->rates, adhoc_rates_b, ratesize);
 
        /* Copy the ad-hoc creating rates into Current BSS state structure */
        memset(&adapter->curbssparams.rates, 0, sizeof(adapter->curbssparams.rates));
index d3316e413465b43367e61cd572d46c64f34b5831..ab8dcbf5bfc90bd9a8041a83f0eef0c9cb240dfb 100644 (file)
@@ -1042,7 +1042,6 @@ static void wlan_init_adapter(wlan_private * priv)
 
        adapter->auto_rate = 1;
        adapter->cur_rate = 0;
-       adapter->adhoc_grate_enabled = 0;
 
        adapter->beaconperiod = MRVDRV_BEACON_INTERVAL;