Message ID | 87zj3gw2h4.fsf@kamboji.qca.qualcomm.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
--- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -2893,7 +2893,11 @@ static void ath10k_wmi_update_tim(struct ath10k *ar, if (__le32_to_cpu(tim_info->tim_changed)) { int i; - WARN_ON_ONCE(sizeof(arvif->u.ap.tim_bitmap) < tim_len); + if (sizeof(arvif->u.ap.tim_bitmap) < tim_len) { + ath10k_warn(ar, "SWBA TIM field is too big (%d), truncated it to %d", + tim_len, sizeof(arvif->u.ap.tim_bitmap)); + tim_len = sizeof(arvif->u.ap.tim_bitmap); + } for (i = 0; i < tim_len; i++) { t = tim_info->tim_bitmap[i / 4];