The he_sr_control field is u8 so there is no need to do any endianess
conversion. Drop the conversion code and use he_sr_control directly.
Fixes: ef11a931bd1c ("mac80211: HE: add Spatial Reuse element parsing support")
Signed-off-by: John Crispin <john@phrozen.org>
{
struct ieee80211_he_spr *he_spr = (void *)he_spr_ie;
u8 spr_len = sizeof(struct ieee80211_he_spr);
- u32 he_spr_params;
/* Make sure the input is not NULL */
if (!he_spr_ie)
return 0;
/* Calc required length */
- he_spr_params = le32_to_cpu(he_spr->he_sr_control);
- if (he_spr_params & IEEE80211_HE_SPR_NON_SRG_OFFSET_PRESENT)
+ if (he_spr->he_sr_control & IEEE80211_HE_SPR_NON_SRG_OFFSET_PRESENT)
spr_len++;
- if (he_spr_params & IEEE80211_HE_SPR_SRG_INFORMATION_PRESENT)
+ if (he_spr->he_sr_control & IEEE80211_HE_SPR_SRG_INFORMATION_PRESENT)
spr_len += 18;
/* Add the first byte (extension ID) to the total length */