/* Calculates data rate corresponding to a given 802.11n MCS index, bandwidth, and guard interval.  */
float ieee80211_htrate(int mcs_index, gboolean bandwidth, gboolean short_gi)
/* Calculates data rate corresponding to a given 802.11n MCS index, bandwidth, and guard interval.  */
float ieee80211_htrate(int mcs_index, gboolean bandwidth, gboolean short_gi)
{
    return (float)(ieee80211_ht_Dbps[mcs_index] * (bandwidth ? 108 : 52) / 52.0 / (short_gi ? 3.6 : 4.0));
}