Typecasting takes precedence over division here, so the legacy rates
larger than 255 * 100 kbps (i.e., 36, 48, 54 Mbps) ended up getting
truncated to invalid values.
Fix this by typecasting the value after the division.
Fixes: d4f3003c56f8 ("nl80211: Configure Beacon frame TX rate if driver advertises support")
Signed-off-by: Prasanna JS <quic_pjs@quicinc.com>
}
if (nla_put_u8(msg, NL80211_TXRATE_LEGACY,
- (u8) params->beacon_rate / 5) ||
+ (u8) (params->beacon_rate / 5)) ||
nla_put(msg, NL80211_TXRATE_HT, 0, NULL) ||
(params->freq->vht_enabled &&
nla_put(msg, NL80211_TXRATE_VHT, sizeof(vht_rate),