iwlwifi: mvm: fix RSS config command
authorSara Sharon <sara.sharon@intel.com>
Wed, 12 Dec 2018 07:45:11 +0000 (09:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jan 2020 09:24:14 +0000 (10:24 +0100)
[ Upstream commit 608dce95db10b8ee1a26dbce3f60204bb69812a5 ]

The hash mask is a bitmap, so we should use BIT() on
the enum values.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Fixes: 43413a975d06 ("iwlwifi: mvm: support rss queues configuration command")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/intel/iwlwifi/mvm/fw.c

index 2ec3a91a0f6b618b60ceb832641f59f425d64d14..bba7ace1a744da0ee35ba877209db4e503508e1a 100644 (file)
@@ -106,12 +106,12 @@ static int iwl_send_rss_cfg_cmd(struct iwl_mvm *mvm)
        int i;
        struct iwl_rss_config_cmd cmd = {
                .flags = cpu_to_le32(IWL_RSS_ENABLE),
-               .hash_mask = IWL_RSS_HASH_TYPE_IPV4_TCP |
-                            IWL_RSS_HASH_TYPE_IPV4_UDP |
-                            IWL_RSS_HASH_TYPE_IPV4_PAYLOAD |
-                            IWL_RSS_HASH_TYPE_IPV6_TCP |
-                            IWL_RSS_HASH_TYPE_IPV6_UDP |
-                            IWL_RSS_HASH_TYPE_IPV6_PAYLOAD,
+               .hash_mask = BIT(IWL_RSS_HASH_TYPE_IPV4_TCP) |
+                            BIT(IWL_RSS_HASH_TYPE_IPV4_UDP) |
+                            BIT(IWL_RSS_HASH_TYPE_IPV4_PAYLOAD) |
+                            BIT(IWL_RSS_HASH_TYPE_IPV6_TCP) |
+                            BIT(IWL_RSS_HASH_TYPE_IPV6_UDP) |
+                            BIT(IWL_RSS_HASH_TYPE_IPV6_PAYLOAD),
        };
 
        if (mvm->trans->num_rx_queues == 1)