]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
iwlwifi: Use sta_bcast_id variable instead of BROADCAST_ID constant
authorTomas Winkler <tomas.winkler@intel.com>
Tue, 11 Mar 2008 23:17:16 +0000 (16:17 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 13 Mar 2008 23:32:32 +0000 (19:32 -0400)
This patch removes iwlYYY_BROADCAST_ID from run time usage.
hw_setting.sta_bcast_id is used instead.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-3945.c
drivers/net/wireless/iwlwifi/iwl-4965.c

index 50a641c0c5b79607017e1db4e365b2cc067f06e9..9a9918e5272b9c3b597cd65ae1ab79bb7cd24c44 100644 (file)
@@ -980,7 +980,7 @@ void iwl3945_hw_build_tx_cmd_rate(struct iwl3945_priv *priv,
        priv->stations[sta_id].current_rate.rate_n_flags = rate;
 
        if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) &&
-           (sta_id != IWL3945_BROADCAST_ID) &&
+           (sta_id != priv->hw_setting.bcast_sta_id) &&
                (sta_id != IWL_MULTICAST_ID))
                priv->stations[IWL_STA_ID].current_rate.rate_n_flags = rate;
 
@@ -2595,7 +2595,7 @@ unsigned int iwl3945_hw_get_beacon_cmd(struct iwl3945_priv *priv,
        tx_beacon_cmd = (struct iwl3945_tx_beacon_cmd *)&frame->u;
        memset(tx_beacon_cmd, 0, sizeof(*tx_beacon_cmd));
 
-       tx_beacon_cmd->tx.sta_id = IWL3945_BROADCAST_ID;
+       tx_beacon_cmd->tx.sta_id = priv->hw_setting.bcast_sta_id;
        tx_beacon_cmd->tx.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE;
 
        frame_size = iwl3945_fill_beacon_frame(priv,
index 2f01a490c9eeb185fca4ada05050aec29ccac4d0..1fe8cc4e74df932237f468ba22c7f5fd7bab447f 100644 (file)
@@ -254,7 +254,7 @@ u8 iwl4965_hw_find_station(struct iwl4965_priv *priv, const u8 *addr)
                start = IWL_STA_ID;
 
        if (is_broadcast_ether_addr(addr))
-               return IWL4965_BROADCAST_ID;
+               return priv->hw_setting.bcast_sta_id;
 
        spin_lock_irqsave(&priv->sta_lock, flags);
        for (i = start; i < priv->hw_setting.max_stations; i++)
@@ -2836,7 +2836,7 @@ unsigned int iwl4965_hw_get_beacon_cmd(struct iwl4965_priv *priv,
        tx_beacon_cmd = &frame->u.beacon;
        memset(tx_beacon_cmd, 0, sizeof(*tx_beacon_cmd));
 
-       tx_beacon_cmd->tx.sta_id = IWL4965_BROADCAST_ID;
+       tx_beacon_cmd->tx.sta_id = priv->hw_setting.bcast_sta_id;
        tx_beacon_cmd->tx.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE;
 
        frame_size = iwl4965_fill_beacon_frame(priv,
@@ -4436,7 +4436,7 @@ void iwl4965_add_station(struct iwl4965_priv *priv, const u8 *addr, int is_ap)
        link_cmd.agg_params.agg_time_limit = cpu_to_le16(4000);
 
        /* Update the rate scaling for control frame Tx to AP */
-       link_cmd.sta_id = is_ap ? IWL_AP_ID : IWL4965_BROADCAST_ID;
+       link_cmd.sta_id = is_ap ? IWL_AP_ID : priv->hw_setting.bcast_sta_id;
 
        iwl4965_send_cmd_pdu(priv, REPLY_TX_LINK_QUALITY_CMD, sizeof(link_cmd),
                         &link_cmd);