freebsd_wlan: GCC2 fixes.

This commit is contained in:
Augustin Cavalier 2019-01-07 21:04:59 -05:00
parent 8842f2a01e
commit 53e3d3f593
2 changed files with 7 additions and 4 deletions

View File

@ -91,6 +91,7 @@ const struct ieee80211_rate_table *ieee80211_get_ratetable(
static __inline__ uint8_t
ieee80211_ack_rate(const struct ieee80211_rate_table *rt, uint8_t rate)
{
uint8_t cix;
/*
* XXX Assert this is for a legacy rate; not for an MCS rate.
* If the caller wishes to use it for a basic rate, they should
@ -98,7 +99,7 @@ ieee80211_ack_rate(const struct ieee80211_rate_table *rt, uint8_t rate)
*/
KASSERT(! (rate & 0x80), ("rate %d is basic/mcs?", rate));
uint8_t cix = rt->info[rt->rateCodeToIndex[rate & IEEE80211_RATE_VAL]].ctlRateIndex;
cix = rt->info[rt->rateCodeToIndex[rate & IEEE80211_RATE_VAL]].ctlRateIndex;
KASSERT(cix != (uint8_t)-1, ("rate %d has no info", rate));
return rt->info[cix].dot11Rate;
}
@ -106,6 +107,7 @@ ieee80211_ack_rate(const struct ieee80211_rate_table *rt, uint8_t rate)
static __inline__ uint8_t
ieee80211_ctl_rate(const struct ieee80211_rate_table *rt, uint8_t rate)
{
uint8_t cix;
/*
* XXX Assert this is for a legacy rate; not for an MCS rate.
* If the caller wishes to use it for a basic rate, they should
@ -113,7 +115,7 @@ ieee80211_ctl_rate(const struct ieee80211_rate_table *rt, uint8_t rate)
*/
KASSERT(! (rate & 0x80), ("rate %d is basic/mcs?", rate));
uint8_t cix = rt->info[rt->rateCodeToIndex[rate & IEEE80211_RATE_VAL]].ctlRateIndex;
cix = rt->info[rt->rateCodeToIndex[rate & IEEE80211_RATE_VAL]].ctlRateIndex;
KASSERT(cix != (uint8_t)-1, ("rate %d has no info", rate));
return rt->info[cix].dot11Rate;
}
@ -121,6 +123,7 @@ ieee80211_ctl_rate(const struct ieee80211_rate_table *rt, uint8_t rate)
static __inline__ enum ieee80211_phytype
ieee80211_rate2phytype(const struct ieee80211_rate_table *rt, uint8_t rate)
{
uint8_t rix;
/*
* XXX Assert this is for a legacy rate; not for an MCS rate.
* If the caller wishes to use it for a basic rate, they should
@ -128,7 +131,7 @@ ieee80211_rate2phytype(const struct ieee80211_rate_table *rt, uint8_t rate)
*/
KASSERT(! (rate & 0x80), ("rate %d is basic/mcs?", rate));
uint8_t rix = rt->rateCodeToIndex[rate & IEEE80211_RATE_VAL];
rix = rt->rateCodeToIndex[rate & IEEE80211_RATE_VAL];
KASSERT(rix != (uint8_t)-1, ("rate %d has no info", rate));
return (enum ieee80211_phytype)rt->info[rix].phy;
}

View File

@ -124,7 +124,7 @@ typedef void (*ieee80211vap_attach)(struct ieee80211vap *);
struct ieee80211_appie {
uint16_t ie_len; /* size of ie_data */
uint8_t ie_data[]; /* user-specified IE's */
uint8_t ie_data[0]; /* user-specified IE's */
};
struct ieee80211_tdma_param;