> +static void ieee80211_sta_mon_txrate_thold_check(struct sta_info *sta)
> +{
> + struct rate_info rinfo;
> + enum nl80211_sta_mon_txrate_threshold_event sta_txrate_event;
> + int txrate;
> +
> + if (!sta->txrate_high)
> + return;
> +
> + sta_set_rate_info_tx(sta, &sta->tx_stats.last_rate, &rinfo);
> + txrate = cfg80211_calculate_bitrate(&rinfo);
These are quite expensive calculations, I think this is far too much to
do on every packet.
You need to find a way to do most of the calculations at configure time,
e.g. build a table of MCS configurations this station might use, and
mark bits in there that fall above/below the threshold, or something
like that?
johannes