Commit 8097e1494459a4f9cdbaba7440334d9bd11a39f0

Authored by Thomas Pedersen
Committed by John W. Linville
1 parent 2e7eb11758

cfg80211: expose cfg80211_calculate_bitrate()

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

Showing 2 changed files with 9 additions and 0 deletions Side-by-side Diff

include/net/cfg80211.h
... ... @@ -3337,6 +3337,14 @@
3337 3337 struct ieee80211_channel *chan,
3338 3338 enum nl80211_channel_type channel_type);
3339 3339  
  3340 +/*
  3341 + * cfg80211_calculate_bitrate - calculate actual bitrate (in 100Kbps units)
  3342 + * @rate: given rate_info to calculate bitrate from
  3343 + *
  3344 + * return 0 if MCS index >= 32
  3345 + */
  3346 +u16 cfg80211_calculate_bitrate(struct rate_info *rate);
  3347 +
3340 3348 /* Logging, debugging and troubleshooting/diagnostic helpers. */
3341 3349  
3342 3350 /* wiphy_printk helpers, similar to dev_printk */
... ... @@ -904,6 +904,7 @@
904 904 /* do NOT round down here */
905 905 return (bitrate + 50000) / 100000;
906 906 }
  907 +EXPORT_SYMBOL(cfg80211_calculate_bitrate);
907 908  
908 909 int cfg80211_validate_beacon_int(struct cfg80211_registered_device *rdev,
909 910 u32 beacon_int)