Remove unused rate flags from driver use

These are not really used and can be removed to clean up the driver
interface definition. The only remaining flag (HOSTAPD_RATE_BASIC) can
be removed once the basic rate set indication can be handled
differently.
This commit is contained in:
Jouni Malinen 2009-12-09 21:38:14 +02:00
parent 22a7c9d735
commit 217e7eeaf0
4 changed files with 5 additions and 23 deletions

View file

@ -31,17 +31,11 @@ struct hostapd_channel_data {
u8 max_tx_power; /* maximum transmit power in dBm */
};
#define HOSTAPD_RATE_ERP 0x00000001
#define HOSTAPD_RATE_BASIC 0x00000002
#define HOSTAPD_RATE_PREAMBLE2 0x00000004
#define HOSTAPD_RATE_SUPPORTED 0x00000010
#define HOSTAPD_RATE_OFDM 0x00000020
#define HOSTAPD_RATE_CCK 0x00000040
#define HOSTAPD_RATE_MANDATORY 0x00000100
struct hostapd_rate_data {
int rate; /* rate in 100 kbps */
int flags; /* HOSTAPD_RATE_ flags */
int flags; /* HOSTAPD_RATE_ flags for internal use */
};
struct hostapd_hw_modes {

View file

@ -1213,13 +1213,9 @@ static struct hostapd_hw_modes * hostap_get_hw_feature_data(void *priv,
}
mode->rates[0].rate = 10;
mode->rates[0].flags = HOSTAPD_RATE_CCK;
mode->rates[1].rate = 20;
mode->rates[1].flags = HOSTAPD_RATE_CCK;
mode->rates[2].rate = 55;
mode->rates[2].flags = HOSTAPD_RATE_CCK;
mode->rates[3].rate = 110;
mode->rates[3].flags = HOSTAPD_RATE_CCK;
return mode;
}

View file

@ -2394,9 +2394,6 @@ static int phy_info_handler(struct nl_msg *msg, void *arg)
mode->rates[idx].rate > 200)
mode->mode = HOSTAPD_MODE_IEEE80211G;
if (tb_rate[NL80211_BITRATE_ATTR_2GHZ_SHORTPREAMBLE])
mode->rates[idx].flags |= HOSTAPD_RATE_PREAMBLE2;
idx++;
}
}
@ -2455,9 +2452,10 @@ wpa_driver_nl80211_add_11b(struct hostapd_hw_modes *modes, u16 *num_modes)
}
for (i = 0; i < mode11g->num_rates; i++) {
if (mode11g->rates[i].rate > 110 ||
mode11g->rates[i].flags &
(HOSTAPD_RATE_ERP | HOSTAPD_RATE_OFDM))
if (mode11g->rates[i].rate != 10 &&
mode11g->rates[i].rate != 20 &&
mode11g->rates[i].rate != 55 &&
mode11g->rates[i].rate != 110)
continue;
mode->rates[mode->num_rates] = mode11g->rates[i];
mode->num_rates++;

View file

@ -2420,8 +2420,6 @@ wpa_driver_test_get_hw_feature_data(void *priv, u16 *num_modes, u16 *flags)
modes[0].channels[0].freq = 2412;
modes[0].channels[0].flag = 0;
modes[0].rates[0].rate = 10;
modes[0].rates[0].flags = HOSTAPD_RATE_BASIC | HOSTAPD_RATE_SUPPORTED |
HOSTAPD_RATE_CCK | HOSTAPD_RATE_MANDATORY;
modes[1].mode = HOSTAPD_MODE_IEEE80211B;
modes[1].num_channels = 1;
@ -2434,8 +2432,6 @@ wpa_driver_test_get_hw_feature_data(void *priv, u16 *num_modes, u16 *flags)
modes[1].channels[0].freq = 2412;
modes[1].channels[0].flag = 0;
modes[1].rates[0].rate = 10;
modes[1].rates[0].flags = HOSTAPD_RATE_BASIC | HOSTAPD_RATE_SUPPORTED |
HOSTAPD_RATE_CCK | HOSTAPD_RATE_MANDATORY;
modes[2].mode = HOSTAPD_MODE_IEEE80211A;
modes[2].num_channels = 1;
@ -2448,8 +2444,6 @@ wpa_driver_test_get_hw_feature_data(void *priv, u16 *num_modes, u16 *flags)
modes[2].channels[0].freq = 5300;
modes[2].channels[0].flag = 0;
modes[2].rates[0].rate = 60;
modes[2].rates[0].flags = HOSTAPD_RATE_BASIC | HOSTAPD_RATE_SUPPORTED |
HOSTAPD_RATE_MANDATORY;
return modes;