mwifiex: remove warnings in mwifiex_cmd_append_11n_tlv()
authorGanapathi Bhat <gbhat@marvell.com>
Thu, 15 Mar 2018 06:20:32 +0000 (11:50 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 27 Mar 2018 08:03:24 +0000 (11:03 +0300)
Fix the following sparse warning in mwifiex_cmd_append_11n_tlv:

drivers/net/wireless/marvell/mwifiex/11n.c:358:65: warning: invalid assignment: &=
drivers/net/wireless/marvell/mwifiex/11n.c:358:65:    left side has type restricted __le16
drivers/net/wireless/marvell/mwifiex/11n.c:358:65:    right side has type int
drivers/net/wireless/marvell/mwifiex/11n.c:360:65: warning: invalid assignment: &=
drivers/net/wireless/marvell/mwifiex/11n.c:360:65:    left side has type restricted __le16
drivers/net/wireless/marvell/mwifiex/11n.c:360:65:    right side has type int
drivers/net/wireless/marvell/mwifiex/11n.c:366:65: warning: invalid assignment: &=
drivers/net/wireless/marvell/mwifiex/11n.c:366:65:    left side has type restricted __le16
drivers/net/wireless/marvell/mwifiex/11n.c:366:65:    right side has type int
drivers/net/wireless/marvell/mwifiex/11n.c:368:65: warning: invalid assignment: &=
drivers/net/wireless/marvell/mwifiex/11n.c:368:65:    left side has type restricted __le16
drivers/net/wireless/marvell/mwifiex/11n.c:368:65:    right side has type int

Fixes: 77423fa73927 ("mwifiex: fix incorrect ht capability problem")
Signed-off-by: Ganapathi Bhat <gbhat@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/mwifiex/11n.c

index feebfdcf025ad40dbda217548a7f893a4561a8a4..5d75c971004b4e480737aa0fe13627afb1e58cb7 100644 (file)
@@ -356,17 +356,19 @@ mwifiex_cmd_append_11n_tlv(struct mwifiex_private *priv,
                        case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
                                if (chan->flags & IEEE80211_CHAN_NO_HT40PLUS) {
                                        ht_cap->ht_cap.cap_info &=
-                                       ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
+                                       cpu_to_le16
+                                       (~IEEE80211_HT_CAP_SUP_WIDTH_20_40);
                                        ht_cap->ht_cap.cap_info &=
-                                       ~IEEE80211_HT_CAP_SGI_40;
+                                       cpu_to_le16(~IEEE80211_HT_CAP_SGI_40);
                                }
                                break;
                        case IEEE80211_HT_PARAM_CHA_SEC_BELOW:
                                if (chan->flags & IEEE80211_CHAN_NO_HT40MINUS) {
                                        ht_cap->ht_cap.cap_info &=
-                                       ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
+                                       cpu_to_le16
+                                       (~IEEE80211_HT_CAP_SUP_WIDTH_20_40);
                                        ht_cap->ht_cap.cap_info &=
-                                       ~IEEE80211_HT_CAP_SGI_40;
+                                       cpu_to_le16(~IEEE80211_HT_CAP_SGI_40);
                                }
                                break;
                        }