mirror of
https://github.com/opnsense/src.git
synced 2026-06-07 15:52:40 -04:00
LinuxKPI; 802.11: start implementing cfg80211_calculate_bitrate()
For now we only return the legacy rate and have two TODOs for HT and VHT which still need to be implemented as needed. Sponsored by: The FreeBSD Foundation MFC after: 3 days
This commit is contained in:
parent
470aaf42c3
commit
a7c19b8a99
2 changed files with 33 additions and 3 deletions
|
|
@ -1304,6 +1304,7 @@ void linuxkpi_wiphy_delayed_work_cancel(struct wiphy *,
|
|||
|
||||
int linuxkpi_regulatory_set_wiphy_regd_sync(struct wiphy *wiphy,
|
||||
struct linuxkpi_ieee80211_regdomain *regd);
|
||||
uint32_t linuxkpi_cfg80211_calculate_bitrate(struct rate_info *);
|
||||
uint32_t linuxkpi_ieee80211_channel_to_frequency(uint32_t, enum nl80211_band);
|
||||
uint32_t linuxkpi_ieee80211_frequency_to_channel(uint32_t, uint32_t);
|
||||
struct linuxkpi_ieee80211_channel *
|
||||
|
|
@ -1574,11 +1575,10 @@ cfg80211_find_vendor_ie(unsigned int oui, int oui_type,
|
|||
return (__DECONST(uint8_t *, elem));
|
||||
}
|
||||
|
||||
static __inline uint32_t
|
||||
static inline uint32_t
|
||||
cfg80211_calculate_bitrate(struct rate_info *rate)
|
||||
{
|
||||
TODO();
|
||||
return (-1);
|
||||
return (linuxkpi_cfg80211_calculate_bitrate(rate));
|
||||
}
|
||||
|
||||
static __inline uint32_t
|
||||
|
|
|
|||
|
|
@ -5890,6 +5890,36 @@ linuxkpi_wiphy_free(struct wiphy *wiphy)
|
|||
kfree(lwiphy);
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
lkpi_cfg80211_calculate_bitrate_ht(struct rate_info *rate)
|
||||
{
|
||||
TODO("cfg80211_calculate_bitrate_ht");
|
||||
return (rate->legacy);
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
lkpi_cfg80211_calculate_bitrate_vht(struct rate_info *rate)
|
||||
{
|
||||
TODO("cfg80211_calculate_bitrate_vht");
|
||||
return (rate->legacy);
|
||||
}
|
||||
|
||||
uint32_t
|
||||
linuxkpi_cfg80211_calculate_bitrate(struct rate_info *rate)
|
||||
{
|
||||
|
||||
/* Beware: order! */
|
||||
if (rate->flags & RATE_INFO_FLAGS_MCS)
|
||||
return (lkpi_cfg80211_calculate_bitrate_ht(rate));
|
||||
|
||||
if (rate->flags & RATE_INFO_FLAGS_VHT_MCS)
|
||||
return (lkpi_cfg80211_calculate_bitrate_vht(rate));
|
||||
|
||||
IMPROVE("HE/EHT/...");
|
||||
|
||||
return (rate->legacy);
|
||||
}
|
||||
|
||||
uint32_t
|
||||
linuxkpi_ieee80211_channel_to_frequency(uint32_t channel,
|
||||
enum nl80211_band band)
|
||||
|
|
|
|||
Loading…
Reference in a new issue