Author: adrian Date: Tue Apr 5 22:01:56 2016 New Revision: 297595 URL: https://svnweb.freebsd.org/changeset/base/297595
Log: [net80211] rename 11n rate macros into a useful spot * begin moving the 11n macros out of ieee80211_phy.c and into a header so they can be used elsewhere. * rename some of them into the IEEE80211_* namespace. * convert HT_RC_2_MCS() to work with three-stream rates. Modified: head/sys/net80211/ieee80211_phy.c head/sys/net80211/ieee80211_phy.h Modified: head/sys/net80211/ieee80211_phy.c ============================================================================== --- head/sys/net80211/ieee80211_phy.c Tue Apr 5 21:54:42 2016 (r297594) +++ head/sys/net80211/ieee80211_phy.c Tue Apr 5 22:01:56 2016 (r297595) @@ -590,7 +590,7 @@ static const uint16_t ht40_bps[32] = { #define HT_STF 4 #define HT_LTF(n) ((n) * 4) -#define HT_RC_2_MCS(_rc) ((_rc) & 0xf) +#define HT_RC_2_MCS(_rc) ((_rc) & 0x1f) #define HT_RC_2_STREAMS(_rc) ((((_rc) & 0x78) >> 3) + 1) #define IS_HT_RATE(_rc) ( (_rc) & IEEE80211_RATE_MCS) Modified: head/sys/net80211/ieee80211_phy.h ============================================================================== --- head/sys/net80211/ieee80211_phy.h Tue Apr 5 21:54:42 2016 (r297594) +++ head/sys/net80211/ieee80211_phy.h Tue Apr 5 22:01:56 2016 (r297595) @@ -194,6 +194,14 @@ uint8_t ieee80211_plcp2rate(uint8_t, en */ uint8_t ieee80211_rate2plcp(int, enum ieee80211_phytype); +/* + * 802.11n rate manipulation. + */ + +#define IEEE80211_HT_RC_2_MCS(_rc) ((_rc) & 0x1f) +#define IEEE80211_HT_RC_2_STREAMS(_rc) ((((_rc) & 0x78) >> 3) + 1) +#define IEEE80211_IS_HT_RATE(_rc) ( (_rc) & IEEE80211_RATE_MCS) + uint32_t ieee80211_compute_duration_ht(uint32_t frameLen, uint16_t rate, int streams, int isht40, int isShortGI); _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"