qcacld-3.0: Fix logging issue in NL80211_RATE_INFO_BITRATE32
Even though the bitrate is greater than zero, because of incorrect conditional check, error log "Invalid bitrate" is getting printed. Hence, fix this by adding proper conditional check. Change-Id: I2076c7a90e735e4a278f4d5894e51abc8bd091c0 CRs-Fixed: 2250687
This commit is contained in:

gecommit door
nshrivas

bovenliggende
ccc6906dbf
commit
27cdaa15fb
@@ -4619,18 +4619,21 @@ static int32_t hdd_add_tx_bitrate(struct sk_buff *skb,
|
||||
/* report 16-bit bitrate only if we can */
|
||||
bitrate_compat = bitrate < (1UL << 16) ? bitrate : 0;
|
||||
|
||||
if (bitrate > 0 &&
|
||||
nla_put_u32(skb, NL80211_RATE_INFO_BITRATE32, bitrate)) {
|
||||
hdd_err("put fail bitrate: %u", bitrate);
|
||||
goto fail;
|
||||
if (bitrate > 0) {
|
||||
if (nla_put_u32(skb, NL80211_RATE_INFO_BITRATE32, bitrate)) {
|
||||
hdd_err("put fail bitrate: %u", bitrate);
|
||||
goto fail;
|
||||
}
|
||||
} else {
|
||||
hdd_err("Invalid bitrate: %u", bitrate);
|
||||
}
|
||||
|
||||
if (bitrate_compat > 0 &&
|
||||
nla_put_u16(skb, NL80211_RATE_INFO_BITRATE, bitrate_compat)) {
|
||||
hdd_err("put fail");
|
||||
goto fail;
|
||||
if (bitrate_compat > 0) {
|
||||
if (nla_put_u16(skb, NL80211_RATE_INFO_BITRATE,
|
||||
bitrate_compat)) {
|
||||
hdd_err("put fail bitrate_compat: %u", bitrate_compat);
|
||||
goto fail;
|
||||
}
|
||||
} else {
|
||||
hdd_err("Invalid bitrate_compat: %u", bitrate_compat);
|
||||
}
|
||||
|
Verwijs in nieuw issue
Block a user