iwlwifi: replace magic constants with define
authorChatre, Reinette <reinette.chatre@intel.com>
Wed, 12 Nov 2008 21:14:07 +0000 (13:14 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 25 Nov 2008 21:41:18 +0000 (16:41 -0500)
use IWL_CCK_RATES_MASK and IWL_OFDM_RATES_MASK instead of
their values directly.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
cc: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl3945-base.c

index 03acad24f6775c5b975a553186d0a5284034f25a..ab599a9628744effcd56339498764b0dbc0c3331 100644 (file)
@@ -466,9 +466,9 @@ static u8 iwl_rate_get_lowest_plcp(struct iwl_priv *priv)
 
        /* Set rate mask*/
        if (priv->staging_rxon.flags & RXON_FLG_BAND_24G_MSK)
-               rate_mask = priv->active_rate_basic & 0xF;
+               rate_mask = priv->active_rate_basic & IWL_CCK_RATES_MASK;
        else
-               rate_mask = priv->active_rate_basic & 0xFF0;
+               rate_mask = priv->active_rate_basic & IWL_OFDM_RATES_MASK;
 
        /* Find lowest valid rate */
        for (i = IWL_RATE_1M_INDEX; i != IWL_RATE_INVALID;
index 18d2a2a689594bf6ab55eaf173fef3518374e2f8..1a923c2fddb0219ed81508ddc2c150435bd59965 100644 (file)
@@ -1425,9 +1425,9 @@ static u8 iwl3945_rate_get_lowest_plcp(struct iwl3945_priv *priv)
 
        /* Set rate mask*/
        if (priv->staging_rxon.flags & RXON_FLG_BAND_24G_MSK)
-               rate_mask = priv->active_rate_basic & 0xF;
+               rate_mask = priv->active_rate_basic & IWL_CCK_RATES_MASK;
        else
-               rate_mask = priv->active_rate_basic & 0xFF0;
+               rate_mask = priv->active_rate_basic & IWL_OFDM_RATES_MASK;
 
        for (i = IWL_RATE_1M_INDEX; i != IWL_RATE_INVALID;
             i = iwl3945_rates[i].next_ieee) {