linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] mac80211: fix RX STBC override byte order
@ 2019-04-09 12:11 Johannes Berg
  2019-04-09 14:55 ` Sergey Matyukevich
  0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2019-04-09 12:11 UTC (permalink / raw)
  To: linux-wireless; +Cc: Sergey Matyukevich, Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

The original patch neglected to take byte order conversions
into account, fix that.

Fixes: d9bb410888ce ("mac80211: allow overriding HT STBC capabilities")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/mac80211/ht.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index e03c46ac8e4d..c62101857b9b 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -112,8 +112,9 @@ void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata,
 			     IEEE80211_HT_CAP_TX_STBC);
 
 	/* Allow user to configure RX STBC bits */
-	if (ht_capa_mask->cap_info & IEEE80211_HT_CAP_RX_STBC)
-		ht_cap->cap |= ht_capa->cap_info & IEEE80211_HT_CAP_RX_STBC;
+	if (ht_capa_mask->cap_info & cpu_to_le16(IEEE80211_HT_CAP_RX_STBC))
+		ht_cap->cap |= le16_to_cpu(ht_capa->cap_info) &
+					IEEE80211_HT_CAP_RX_STBC;
 
 	/* Allow user to decrease AMPDU factor */
 	if (ht_capa_mask->ampdu_params_info &
-- 
2.17.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] mac80211: fix RX STBC override byte order
  2019-04-09 12:11 [PATCH v2] mac80211: fix RX STBC override byte order Johannes Berg
@ 2019-04-09 14:55 ` Sergey Matyukevich
  0 siblings, 0 replies; 2+ messages in thread
From: Sergey Matyukevich @ 2019-04-09 14:55 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Johannes Berg

> The original patch neglected to take byte order conversions
> into account, fix that.
> 
> Fixes: d9bb410888ce ("mac80211: allow overriding HT STBC capabilities")
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---
>  net/mac80211/ht.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
> index e03c46ac8e4d..c62101857b9b 100644
> --- a/net/mac80211/ht.c
> +++ b/net/mac80211/ht.c
> @@ -112,8 +112,9 @@ void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata,
>                              IEEE80211_HT_CAP_TX_STBC);
> 
>         /* Allow user to configure RX STBC bits */
> -       if (ht_capa_mask->cap_info & IEEE80211_HT_CAP_RX_STBC)
> -               ht_cap->cap |= ht_capa->cap_info & IEEE80211_HT_CAP_RX_STBC;
> +       if (ht_capa_mask->cap_info & cpu_to_le16(IEEE80211_HT_CAP_RX_STBC))
> +               ht_cap->cap |= le16_to_cpu(ht_capa->cap_info) &
> +                                       IEEE80211_HT_CAP_RX_STBC;
> 
>         /* Allow user to decrease AMPDU factor */
>         if (ht_capa_mask->ampdu_params_info &

Thanks for fixing this!

Reviewed-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>

Regards,
Sergey

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-09 14:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-09 12:11 [PATCH v2] mac80211: fix RX STBC override byte order Johannes Berg
2019-04-09 14:55 ` Sergey Matyukevich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).