e1000e: don't check for alternate MAC addr on parts that don't support it
[deliverable/linux.git] / drivers / net / wireless / iwlwifi / iwl-3945.c
index 295b67ac8169de7f3efeef1c98adb1b30d161081..6950a783913b83561839f20a08657857ee242a86 100644 (file)
@@ -279,8 +279,8 @@ static void iwl3945_tx_queue_reclaim(struct iwl_priv *priv,
                q->read_ptr = iwl_queue_inc_wrap(q->read_ptr, q->n_bd)) {
 
                tx_info = &txq->txb[txq->q.read_ptr];
-               ieee80211_tx_status_irqsafe(priv->hw, tx_info->skb[0]);
-               tx_info->skb[0] = NULL;
+               ieee80211_tx_status_irqsafe(priv->hw, tx_info->skb);
+               tx_info->skb = NULL;
                priv->cfg->ops->lib->txq_free_tfd(priv, txq);
        }
 
@@ -315,7 +315,7 @@ static void iwl3945_rx_reply_tx(struct iwl_priv *priv,
                return;
        }
 
-       info = IEEE80211_SKB_CB(txq->txb[txq->q.read_ptr].skb[0]);
+       info = IEEE80211_SKB_CB(txq->txb[txq->q.read_ptr].skb);
        ieee80211_tx_info_clear_status(info);
 
        /* Fill the MRR chain with some info about on-chip retransmissions */
@@ -406,6 +406,11 @@ static bool iwl3945_good_plcp_health(struct iwl_priv *priv,
        unsigned int plcp_msec;
        unsigned long plcp_received_jiffies;
 
+       if (priv->cfg->plcp_delta_threshold ==
+           IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE) {
+               IWL_DEBUG_RADIO(priv, "plcp_err check disabled\n");
+               return rc;
+       }
        memcpy(&current_stat, pkt->u.raw, sizeof(struct
                        iwl3945_notif_statistics));
        /*
@@ -702,19 +707,22 @@ void iwl3945_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq)
 
        /* unmap chunks if any */
 
-       for (i = 1; i < counter; i++) {
+       for (i = 1; i < counter; i++)
                pci_unmap_single(dev, le32_to_cpu(tfd->tbs[i].addr),
                         le32_to_cpu(tfd->tbs[i].len), PCI_DMA_TODEVICE);
-               if (txq->txb[txq->q.read_ptr].skb[0]) {
-                       struct sk_buff *skb = txq->txb[txq->q.read_ptr].skb[0];
-                       if (txq->txb[txq->q.read_ptr].skb[0]) {
-                               /* Can be called from interrupt context */
-                               dev_kfree_skb_any(skb);
-                               txq->txb[txq->q.read_ptr].skb[0] = NULL;
-                       }
+
+       /* free SKB */
+       if (txq->txb) {
+               struct sk_buff *skb;
+
+               skb = txq->txb[txq->q.read_ptr].skb;
+
+               /* can be called from irqs-disabled context */
+               if (skb) {
+                       dev_kfree_skb_any(skb);
+                       txq->txb[txq->q.read_ptr].skb = NULL;
                }
        }
-       return ;
 }
 
 /**
@@ -761,22 +769,6 @@ void iwl3945_hw_build_tx_cmd_rate(struct iwl_priv *priv,
                rts_retry_limit = data_retry_limit;
        tx_cmd->rts_retry_limit = rts_retry_limit;
 
-       if (ieee80211_is_mgmt(fc)) {
-               switch (fc & cpu_to_le16(IEEE80211_FCTL_STYPE)) {
-               case cpu_to_le16(IEEE80211_STYPE_AUTH):
-               case cpu_to_le16(IEEE80211_STYPE_DEAUTH):
-               case cpu_to_le16(IEEE80211_STYPE_ASSOC_REQ):
-               case cpu_to_le16(IEEE80211_STYPE_REASSOC_REQ):
-                       if (tx_flags & TX_CMD_FLG_RTS_MSK) {
-                               tx_flags &= ~TX_CMD_FLG_RTS_MSK;
-                               tx_flags |= TX_CMD_FLG_CTS_MSK;
-                       }
-                       break;
-               default:
-                       break;
-               }
-       }
-
        tx_cmd->rate = rate;
        tx_cmd->tx_flags = tx_flags;
 
@@ -841,7 +833,7 @@ static int iwl3945_set_pwr_src(struct iwl_priv *priv, enum iwl_pwr_src src)
 
 static int iwl3945_rx_init(struct iwl_priv *priv, struct iwl_rx_queue *rxq)
 {
-       iwl_write_direct32(priv, FH39_RCSR_RBD_BASE(0), rxq->dma_addr);
+       iwl_write_direct32(priv, FH39_RCSR_RBD_BASE(0), rxq->bd_dma);
        iwl_write_direct32(priv, FH39_RCSR_RPTR_ADDR(0), rxq->rb_stts_dma);
        iwl_write_direct32(priv, FH39_RCSR_WPTR(0), 0);
        iwl_write_direct32(priv, FH39_RCSR_CONFIG(0),
@@ -2696,6 +2688,7 @@ static struct iwl_lib_ops iwl3945_lib = {
        .isr = iwl_isr_legacy,
        .config_ap = iwl3945_config_ap,
        .manage_ibss_station = iwl3945_manage_ibss_station,
+       .recover_from_tx_stall = iwl_bg_monitor_recover,
        .check_plcp_health = iwl3945_good_plcp_health,
 
        .debugfs_ops = {
@@ -2708,7 +2701,7 @@ static struct iwl_lib_ops iwl3945_lib = {
 static struct iwl_hcmd_utils_ops iwl3945_hcmd_utils = {
        .get_hcmd_size = iwl3945_get_hcmd_size,
        .build_addsta_hcmd = iwl3945_build_addsta_hcmd,
-       .rts_tx_cmd_flag = iwlcore_rts_tx_cmd_flag,
+       .tx_cmd_protection = iwlcore_tx_cmd_protection,
        .request_scan = iwl3945_request_scan,
 };
 
This page took 0.040703 seconds and 5 git commands to generate.