Revert r220907 and r220915.
Changing the size of struct ieee80211_mimo_info changes the STA info data, breaking ifconfig in general.
This commit is contained in:
parent
a7a0fa5f58
commit
88e428c6bc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=220935
@ -3139,13 +3139,11 @@ static void
|
||||
printmimo(const struct ieee80211_mimo_info *mi)
|
||||
{
|
||||
/* NB: don't muddy display unless there's something to show */
|
||||
/* XXX should check flags and n_rx_chains */
|
||||
if (mi->rssi_ctl[0] != 0 || mi->rssi_ctl[1] != 0 || mi->rssi_ctl[2] != 0) {
|
||||
if (mi->rssi[0] != 0 || mi->rssi[1] != 0 || mi->rssi[2] != 0) {
|
||||
/* XXX ignore EVM for now */
|
||||
/* XXX ignore EXT for now */
|
||||
printf(" (rssi %d:%d:%d nf %d:%d:%d)",
|
||||
mi->rssi_ctl[0], mi->rssi_ctl[1], mi->rssi_ctl[2],
|
||||
mi->noise_ctl[0], mi->noise_ctl[1], mi->noise_ctl[2]);
|
||||
mi->rssi[0], mi->rssi[1], mi->rssi[2],
|
||||
mi->noise[0], mi->noise[1], mi->noise[2]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2527,13 +2527,13 @@ mwl_node_getmimoinfo(const struct ieee80211_node *ni,
|
||||
if (mn->mn_ai.rssi_c > rssi_max)
|
||||
rssi_max = mn->mn_ai.rssi_c;
|
||||
|
||||
CVT(mi->rssi_ctl[0], mn->mn_ai.rssi_a);
|
||||
CVT(mi->rssi_ctl[1], mn->mn_ai.rssi_b);
|
||||
CVT(mi->rssi_ctl[2], mn->mn_ai.rssi_c);
|
||||
CVT(mi->rssi[0], mn->mn_ai.rssi_a);
|
||||
CVT(mi->rssi[1], mn->mn_ai.rssi_b);
|
||||
CVT(mi->rssi[2], mn->mn_ai.rssi_c);
|
||||
|
||||
mi->noise_ctl[0] = mn->mn_ai.nf_a;
|
||||
mi->noise_ctl[1] = mn->mn_ai.nf_b;
|
||||
mi->noise_ctl[2] = mn->mn_ai.nf_c;
|
||||
mi->noise[0] = mn->mn_ai.nf_a;
|
||||
mi->noise[1] = mn->mn_ai.nf_b;
|
||||
mi->noise[2] = mn->mn_ai.nf_c;
|
||||
#undef CVT
|
||||
}
|
||||
|
||||
|
@ -395,14 +395,9 @@ struct ieee80211_regdomain {
|
||||
* XXX This doesn't yet export both ctl/ext chain details
|
||||
*/
|
||||
struct ieee80211_mimo_info {
|
||||
uint16_t flags; /* IEEE80211_R_* flags */
|
||||
uint8_t n_rx_chains; /* number of RX chains involved */
|
||||
uint8_t pad[1];
|
||||
int8_t rssi_ctl[IEEE80211_MAX_CHAINS]; /* per-antenna rssi */
|
||||
int8_t noise_ctl[IEEE80211_MAX_CHAINS]; /* per-antenna noise floor */
|
||||
int8_t rssi_ext[IEEE80211_MAX_CHAINS]; /* per-antenna ext rssi */
|
||||
int8_t noise_ext[IEEE80211_MAX_CHAINS]; /* per-antenna ext noise floor */
|
||||
uint32_t evm[IEEE80211_MAX_CHAINS][IEEE80211_MAX_EVM_PILOTS];
|
||||
/* EVM data */
|
||||
int8_t rssi[IEEE80211_MAX_CHAINS]; /* per-antenna rssi */
|
||||
int8_t noise[IEEE80211_MAX_CHAINS]; /* per-antenna noise floor */
|
||||
uint8_t pad[2];
|
||||
uint32_t evm[3]; /* EVM data */
|
||||
};
|
||||
#endif /* _NET80211__IEEE80211_H_ */
|
||||
|
@ -1091,30 +1091,18 @@ node_getmimoinfo(const struct ieee80211_node *ni,
|
||||
|
||||
bzero(info, sizeof(*info));
|
||||
|
||||
/* XXX set flags - evm, ctl/ext data, etc. */
|
||||
info->n_rx_chains = ni->ni_mimo_chains;
|
||||
|
||||
for (i = 0; i < ni->ni_mimo_chains; i++) {
|
||||
/* Ctl channel */
|
||||
avgrssi = ni->ni_mimo_rssi_ctl[i];
|
||||
if (avgrssi == IEEE80211_RSSI_DUMMY_MARKER) {
|
||||
info->rssi_ctl[i] = 0;
|
||||
info->rssi[i] = 0;
|
||||
} else {
|
||||
rssi = IEEE80211_RSSI_GET(avgrssi);
|
||||
info->rssi_ctl[i] = rssi < 0 ? 0 : rssi > 127 ? 127 : rssi;
|
||||
info->rssi[i] = rssi < 0 ? 0 : rssi > 127 ? 127 : rssi;
|
||||
}
|
||||
info->noise[i] = ni->ni_mimo_noise_ctl[i];
|
||||
}
|
||||
info->noise_ctl[i] = ni->ni_mimo_noise_ctl[i];
|
||||
|
||||
/* Ext channel */
|
||||
avgrssi = ni->ni_mimo_rssi_ext[i];
|
||||
if (avgrssi == IEEE80211_RSSI_DUMMY_MARKER) {
|
||||
info->rssi_ext[i] = 0;
|
||||
} else {
|
||||
rssi = IEEE80211_RSSI_GET(avgrssi);
|
||||
info->rssi_ext[i] = rssi < 0 ? 0 : rssi > 127 ? 127 : rssi;
|
||||
}
|
||||
info->noise_ext[i] = ni->ni_mimo_noise_ext[i];
|
||||
}
|
||||
/* XXX ext radios? */
|
||||
|
||||
/* XXX EVM? */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user