diff options
author | Holger Schurig <hs4233@mail.mn-solutions.de> | 2007-08-02 13:11:19 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:50:06 -0400 |
commit | 85c93e5189b7402b4f9f4324c284bb91e8e8fb85 (patch) | |
tree | 24a3cdfe3f5ddc2cc316e2c193a262865420cbb0 | |
parent | 0aabc0a5d5657df254255c9049a97cc96229bcba (diff) |
[PATCH] libertas: remove adapter->adhoc_grate_enabled
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>
-rw-r--r-- | drivers/net/wireless/libertas/dev.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/join.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/main.c | 1 |
3 files changed, 2 insertions, 10 deletions
diff --git a/drivers/net/wireless/libertas/dev.h b/drivers/net/wireless/libertas/dev.h index 4738afa61e33..90e9405903ba 100644 --- a/drivers/net/wireless/libertas/dev.h +++ b/drivers/net/wireless/libertas/dev.h | |||
@@ -281,8 +281,6 @@ struct _wlan_adapter { | |||
281 | 281 | ||
282 | u16 enablehwauto; | 282 | u16 enablehwauto; |
283 | u16 ratebitmap; | 283 | u16 ratebitmap; |
284 | /** control G rates */ | ||
285 | u8 adhoc_grate_enabled; | ||
286 | 284 | ||
287 | u32 fragthsd; | 285 | u32 fragthsd; |
288 | u32 rtsthsd; | 286 | u32 rtsthsd; |
diff --git a/drivers/net/wireless/libertas/join.c b/drivers/net/wireless/libertas/join.c index e335a7e4adaa..95c21bae60f5 100644 --- a/drivers/net/wireless/libertas/join.c +++ b/drivers/net/wireless/libertas/join.c | |||
@@ -534,13 +534,8 @@ int libertas_cmd_80211_ad_hoc_start(wlan_private * priv, | |||
534 | adhs->probedelay = cpu_to_le16(CMD_SCAN_PROBE_DELAY_TIME); | 534 | adhs->probedelay = cpu_to_le16(CMD_SCAN_PROBE_DELAY_TIME); |
535 | 535 | ||
536 | memset(adhs->rates, 0, sizeof(adhs->rates)); | 536 | memset(adhs->rates, 0, sizeof(adhs->rates)); |
537 | if (adapter->adhoc_grate_enabled) { | 537 | ratesize = min(sizeof(adhs->rates), sizeof(adhoc_rates_b)); |
538 | ratesize = min(sizeof(adhs->rates), sizeof(libertas_bg_rates)); | 538 | memcpy(adhs->rates, adhoc_rates_b, ratesize); |
539 | memcpy(adhs->rates, libertas_bg_rates, ratesize); | ||
540 | } else { | ||
541 | ratesize = min(sizeof(adhs->rates), sizeof(adhoc_rates_b)); | ||
542 | memcpy(adhs->rates, adhoc_rates_b, ratesize); | ||
543 | } | ||
544 | 539 | ||
545 | /* Copy the ad-hoc creating rates into Current BSS state structure */ | 540 | /* Copy the ad-hoc creating rates into Current BSS state structure */ |
546 | memset(&adapter->curbssparams.rates, 0, sizeof(adapter->curbssparams.rates)); | 541 | memset(&adapter->curbssparams.rates, 0, sizeof(adapter->curbssparams.rates)); |
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index d3316e413465..ab8dcbf5bfc9 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -1042,7 +1042,6 @@ static void wlan_init_adapter(wlan_private * priv) | |||
1042 | 1042 | ||
1043 | adapter->auto_rate = 1; | 1043 | adapter->auto_rate = 1; |
1044 | adapter->cur_rate = 0; | 1044 | adapter->cur_rate = 0; |
1045 | adapter->adhoc_grate_enabled = 0; | ||
1046 | 1045 | ||
1047 | adapter->beaconperiod = MRVDRV_BEACON_INTERVAL; | 1046 | adapter->beaconperiod = MRVDRV_BEACON_INTERVAL; |
1048 | 1047 | ||