diff --git a/src/libs/compat/freebsd_wlan/net80211/ieee80211_phy.h b/src/libs/compat/freebsd_wlan/net80211/ieee80211_phy.h index 1e81696342..80a5183e32 100644 --- a/src/libs/compat/freebsd_wlan/net80211/ieee80211_phy.h +++ b/src/libs/compat/freebsd_wlan/net80211/ieee80211_phy.h @@ -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; } diff --git a/src/libs/compat/freebsd_wlan/net80211/ieee80211_var.h b/src/libs/compat/freebsd_wlan/net80211/ieee80211_var.h index a541100f13..7227d4502e 100644 --- a/src/libs/compat/freebsd_wlan/net80211/ieee80211_var.h +++ b/src/libs/compat/freebsd_wlan/net80211/ieee80211_var.h @@ -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;