Commit 85c93e51 authored by Holger Schurig's avatar Holger Schurig Committed by David S. Miller

[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: default avatarHolger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 0aabc0a5
...@@ -281,8 +281,6 @@ struct _wlan_adapter { ...@@ -281,8 +281,6 @@ struct _wlan_adapter {
u16 enablehwauto; u16 enablehwauto;
u16 ratebitmap; u16 ratebitmap;
/** control G rates */
u8 adhoc_grate_enabled;
u32 fragthsd; u32 fragthsd;
u32 rtsthsd; u32 rtsthsd;
......
...@@ -534,13 +534,8 @@ int libertas_cmd_80211_ad_hoc_start(wlan_private * priv, ...@@ -534,13 +534,8 @@ int libertas_cmd_80211_ad_hoc_start(wlan_private * priv,
adhs->probedelay = cpu_to_le16(CMD_SCAN_PROBE_DELAY_TIME); adhs->probedelay = cpu_to_le16(CMD_SCAN_PROBE_DELAY_TIME);
memset(adhs->rates, 0, sizeof(adhs->rates)); memset(adhs->rates, 0, sizeof(adhs->rates));
if (adapter->adhoc_grate_enabled) { ratesize = min(sizeof(adhs->rates), sizeof(adhoc_rates_b));
ratesize = min(sizeof(adhs->rates), sizeof(libertas_bg_rates)); memcpy(adhs->rates, adhoc_rates_b, ratesize);
memcpy(adhs->rates, libertas_bg_rates, ratesize);
} else {
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 */ /* Copy the ad-hoc creating rates into Current BSS state structure */
memset(&adapter->curbssparams.rates, 0, sizeof(adapter->curbssparams.rates)); memset(&adapter->curbssparams.rates, 0, sizeof(adapter->curbssparams.rates));
......
...@@ -1042,7 +1042,6 @@ static void wlan_init_adapter(wlan_private * priv) ...@@ -1042,7 +1042,6 @@ static void wlan_init_adapter(wlan_private * priv)
adapter->auto_rate = 1; adapter->auto_rate = 1;
adapter->cur_rate = 0; adapter->cur_rate = 0;
adapter->adhoc_grate_enabled = 0;
adapter->beaconperiod = MRVDRV_BEACON_INTERVAL; adapter->beaconperiod = MRVDRV_BEACON_INTERVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment