Changeset View
Standalone View
sys/net80211/ieee80211_node.h
| Show First 20 Lines • Show All 133 Lines • ▼ Show 20 Lines | ieee80211_ni_chw_to_str(enum ieee80211_sta_rx_bw bw) | ||||
| case IEEE80211_STA_RX_BW_20: return ("BW_20"); | case IEEE80211_STA_RX_BW_20: return ("BW_20"); | ||||
| case IEEE80211_STA_RX_BW_40: return ("BW_40"); | case IEEE80211_STA_RX_BW_40: return ("BW_40"); | ||||
| case IEEE80211_STA_RX_BW_80: return ("BW_80"); | case IEEE80211_STA_RX_BW_80: return ("BW_80"); | ||||
| case IEEE80211_STA_RX_BW_160: return ("BW_160"); | case IEEE80211_STA_RX_BW_160: return ("BW_160"); | ||||
| case IEEE80211_STA_RX_BW_320: return ("BW_320"); | case IEEE80211_STA_RX_BW_320: return ("BW_320"); | ||||
| } | } | ||||
| } | } | ||||
| #define IEEE80211_NODE_TXRATE_LEGACY 0x1 | |||||
bz: Make this 0. | |||||
Done Inline ActionsIt's 0 so "uninitialised" (which is hopefully 0) gets caught. adrian: It's 0 so "uninitialised" (which is hopefully 0) gets caught. | |||||
bzUnsubmitted Done Inline ActionsOk, if you prefer to stay with something .. Can we make this bz: Ok, if you prefer to stay with something ..
Can we make this
(a) an enum
(b) remove the "TX"… | |||||
| #define IEEE80211_NODE_TXRATE_VHT 0x2 | |||||
Done Inline ActionsI'd suffix that with _MCS bz: I'd suffix that with _MCS | |||||
| struct ieee80211_node_txrate { | |||||
| uint8_t type; /* IEEE80211_NODE_TXRATE_* */ | |||||
Done Inline ActionsI'd call them flags; I am not sure what you envision there to be defined beyond that but sooner or later ... I think you may want to have SGI in there too as a flag. bz: I'd call them flags; I am not sure what you envision there to be defined beyond that but… | |||||
| uint8_t nss; /* VHT - number of spatial streams */ | |||||
Done Inline ActionsRemove VHT from comments. It's NSS and MCS. In the end what you are modelling here seems to be struct rate_info in sys/compat/linuxkpi/common/include/net/cfg80211.h minus (the "bw" and the the MCS case [unless you cleanup HT]). That struct already has fields for HE/EHT. it is funny we want to rewrite the Linux drivers but then still have own data structures rather than closing the rapture. It's funny how I can see where all these things are coming from ... So here's the question: do you want to cleanup HT to use mcs and a flag and we can move things over for this and save LinuxKPI the conversions or do we keep inventing our own names? bz: Remove VHT from comments. It's NSS and MCS.
In the end what you are modelling here seems to… | |||||
Done Inline ActionsWell, they come from "if i needed to represent stuff how would i", I'm not basing it on the linux side of things. The only time I've looked at the linux side of things is when I hit ieee80211_* namespace clashes. :-) It's named VHT-NSS / MCS right now because it's explicitly /not/ representing 11n just yet. 11n MCS is still represented in the "legacy" way. I'd like to eventually clean that up, and it shouldn't be hard to do with the cleanups going on in here. When that happens, I'll remove the VHT bits. Also, linux /does/ change stuff - eg look at the stuff that mechanically changed when they implemented the dual-sta support. I'd prefer we stick with translations in linuxkpi - even if they're simple mechanical translations - so if/when they do change other stuff, we've limited how far the changes end up spreading in our codebase. (And yeah I do owe you and others an email on porting linux drivers to freebsd with shims rather than a linuxkpi; I've had a bunch of experience with "drivers that run on any wifi stack" <-> "driver shim layer" "stack shim layer" <-> "wifi stack". It's .. dirty. ;-) adrian: Well, they come from "if i needed to represent stuff how would i", I'm not basing it on the… | |||||
| uint8_t mcs; /* VHT - MCS */ | |||||
| uint8_t dot11rate; /* Legacy/HT - dot11rate / ratecode */ | |||||
| }; | |||||
| /* | /* | ||||
| * Node specific information. Note that drivers are expected | * Node specific information. Note that drivers are expected | ||||
| * to derive from this structure to add device-specific per-node | * to derive from this structure to add device-specific per-node | ||||
| * state. This is done by overriding the ic_node_* methods in | * state. This is done by overriding the ic_node_* methods in | ||||
| * the ieee80211com structure. | * the ieee80211com structure. | ||||
| */ | */ | ||||
| struct ieee80211_node { | struct ieee80211_node { | ||||
| struct ieee80211vap *ni_vap; /* associated vap */ | struct ieee80211vap *ni_vap; /* associated vap */ | ||||
| ▲ Show 20 Lines • Show All 120 Lines • ▼ Show 20 Lines | #define IEEE80211_NODE_BOOST 0x0080 /* Dynamic Turbo boosted */ | ||||
| uint32_t ni_vht_spare[8]; | uint32_t ni_vht_spare[8]; | ||||
| /* fast-frames state */ | /* fast-frames state */ | ||||
| struct mbuf * ni_tx_superg[WME_NUM_TID]; | struct mbuf * ni_tx_superg[WME_NUM_TID]; | ||||
| /* others */ | /* others */ | ||||
| short ni_inact; /* inactivity mark count */ | short ni_inact; /* inactivity mark count */ | ||||
| short ni_inact_reload;/* inactivity reload value */ | short ni_inact_reload;/* inactivity reload value */ | ||||
| int ni_txrate; /* legacy rate/MCS */ | struct ieee80211_node_txrate ni_txrate; /* current transmit rate */ | ||||
| struct ieee80211_psq ni_psq; /* power save queue */ | struct ieee80211_psq ni_psq; /* power save queue */ | ||||
| struct ieee80211_nodestats ni_stats; /* per-node statistics */ | struct ieee80211_nodestats ni_stats; /* per-node statistics */ | ||||
| struct ieee80211vap *ni_wdsvap; /* associated WDS vap */ | struct ieee80211vap *ni_wdsvap; /* associated WDS vap */ | ||||
| void *ni_rctls; /* private ratectl state */ | void *ni_rctls; /* private ratectl state */ | ||||
| /* quiet time IE state for the given node */ | /* quiet time IE state for the given node */ | ||||
| uint32_t ni_quiet_ie_set; /* Quiet time IE was seen */ | uint32_t ni_quiet_ie_set; /* Quiet time IE was seen */ | ||||
| ▲ Show 20 Lines • Show All 207 Lines • ▼ Show 20 Lines | |||||
| struct ieee80211_node *ieee80211_add_neighbor(struct ieee80211vap *, | struct ieee80211_node *ieee80211_add_neighbor(struct ieee80211vap *, | ||||
| const struct ieee80211_frame *, | const struct ieee80211_frame *, | ||||
| const struct ieee80211_scanparams *); | const struct ieee80211_scanparams *); | ||||
| void ieee80211_node_join(struct ieee80211_node *,int); | void ieee80211_node_join(struct ieee80211_node *,int); | ||||
| void ieee80211_node_leave(struct ieee80211_node *); | void ieee80211_node_leave(struct ieee80211_node *); | ||||
| int8_t ieee80211_getrssi(struct ieee80211vap *); | int8_t ieee80211_getrssi(struct ieee80211vap *); | ||||
| void ieee80211_getsignal(struct ieee80211vap *, int8_t *, int8_t *); | void ieee80211_getsignal(struct ieee80211vap *, int8_t *, int8_t *); | ||||
| /* | |||||
Not Done Inline ActionsShould this comment be part of D48601 really? bz: Should this comment be part of D48601 really? | |||||
| * Node transmit rate specific manipulation. | |||||
| * | |||||
| * This should eventually be refactored into its own type. | |||||
| */ | |||||
| uint8_t ieee80211_node_get_txrate_dot11rate(struct ieee80211_node *); | uint8_t ieee80211_node_get_txrate_dot11rate(struct ieee80211_node *); | ||||
| void ieee80211_node_set_txrate_dot11rate(struct ieee80211_node *, uint8_t); | void ieee80211_node_set_txrate_dot11rate(struct ieee80211_node *, uint8_t); | ||||
| void ieee80211_node_set_txrate_ht_mcsrate(struct ieee80211_node *, uint8_t); | void ieee80211_node_set_txrate_ht_mcsrate(struct ieee80211_node *, uint8_t); | ||||
| uint32_t ieee80211_node_get_txrate_kbit(struct ieee80211_node *); | uint32_t ieee80211_node_get_txrate_kbit(struct ieee80211_node *); | ||||
| #endif /* _NET80211_IEEE80211_NODE_H_ */ | #endif /* _NET80211_IEEE80211_NODE_H_ */ | ||||
Make this 0.