staging: r8188eu: calculate the addba response length
authorMartin Kaiser <martin@kaiser.cx>
Thu, 2 Jun 2022 19:37:20 +0000 (21:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Jun 2022 06:08:35 +0000 (08:08 +0200)
commitc67eea0c34101ba199e500c825edf0a080cdfd45
tree63ae2b438ab72b0cd14c2a76ab3384797daf5ea1
parent8836faf7196b233bb2baf7dc2b84bfe9f34efe11
staging: r8188eu: calculate the addba response length

An addba response always ends with the timeout field. The length of the
addba response is the offset of the end of the timeout field in the struct
ieee80211_mgmt that defines the message.

Use offsetofend to calculate this offset and drop the intermediate pktlen
increments as we add addba response components.

Tested-by: Pavel Skripkin <paskripkin@gmail.com>
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220602193726.280922-6-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_mlme_ext.c