iwlwifi: 3945 extract flow handler definitions into iwl-3945-fh.h
[cascardo/linux.git] / drivers / net / wireless / iwlwifi / iwl3945-base.c
index 352ccac..fee3e93 100644 (file)
@@ -48,6 +48,7 @@
 
 #include "iwl-3945-core.h"
 #include "iwl-3945.h"
+#include "iwl-3945-fh.h"
 #include "iwl-helpers.h"
 
 #ifdef CONFIG_IWL3945_DEBUG
@@ -65,7 +66,7 @@ static int iwl3945_tx_queue_update_write_ptr(struct iwl3945_priv *priv,
 
 /* module parameters */
 static int iwl3945_param_disable_hw_scan; /* def: 0 = use 3945's h/w scan */
-static int iwl3945_param_debug;    /* def: 0 = minimal debug log messages */
+static u32 iwl3945_param_debug;    /* def: 0 = minimal debug log messages */
 static int iwl3945_param_disable;  /* def: 0 = enable radio */
 static int iwl3945_param_antenna;  /* def: 0 = both antennas (use diversity) */
 int iwl3945_param_hwcrypto;        /* def: 0 = use software encryption */
@@ -745,7 +746,7 @@ static int iwl3945_send_cmd_sync(struct iwl3945_priv *priv, struct iwl3945_host_
                IWL_ERROR("Error: Response NULL in '%s'\n",
                          get_cmd_string(cmd->id));
                ret = -EIO;
-               goto out;
+               goto cancel;
        }
 
        ret = 0;
@@ -1402,7 +1403,7 @@ static void iwl3945_free_frame(struct iwl3945_priv *priv, struct iwl3945_frame *
 
 unsigned int iwl3945_fill_beacon_frame(struct iwl3945_priv *priv,
                                struct ieee80211_hdr *hdr,
-                               const u8 *dest, int left)
+                               int left)
 {
 
        if (!iwl3945_is_associated(priv) || !priv->ibss_beacon ||
@@ -3479,14 +3480,14 @@ int iwl3945_rx_queue_update_write_ptr(struct iwl3945_priv *priv, struct iwl3945_
                        goto exit_unlock;
 
                /* Device expects a multiple of 8 */
-               iwl3945_write_direct32(priv, FH_RSCSR_CHNL0_WPTR,
+               iwl3945_write_direct32(priv, FH39_RSCSR_CHNL0_WPTR,
                                     q->write & ~0x7);
                iwl3945_release_nic_access(priv);
 
        /* Else device is assumed to be awake */
        } else
                /* Device expects a multiple of 8 */
-               iwl3945_write32(priv, FH_RSCSR_CHNL0_WPTR, q->write & ~0x7);
+               iwl3945_write32(priv, FH39_RSCSR_CHNL0_WPTR, q->write & ~0x7);
 
 
        q->need_update = 0;
@@ -4339,9 +4340,8 @@ static void iwl3945_irq_tasklet(struct iwl3945_priv *priv)
 
                iwl3945_write32(priv, CSR_FH_INT_STATUS, (1 << 6));
                if (!iwl3945_grab_nic_access(priv)) {
-                       iwl3945_write_direct32(priv,
-                                            FH_TCSR_CREDIT
-                                            (ALM_FH_SRVC_CHNL), 0x0);
+                       iwl3945_write_direct32(priv, FH39_TCSR_CREDIT
+                                            (FH39_SRVC_CHNL), 0x0);
                        iwl3945_release_nic_access(priv);
                }
                handled |= CSR_INT_BIT_FH_TX;
@@ -6538,7 +6538,7 @@ static int iwl3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
                dev_kfree_skb_any(skb);
 
        IWL_DEBUG_MAC80211("leave\n");
-       return 0;
+       return NETDEV_TX_OK;
 }
 
 static int iwl3945_mac_add_interface(struct ieee80211_hw *hw,
@@ -8343,7 +8343,7 @@ MODULE_PARM_DESC(disable, "manually disable the radio (default 0 [radio on])");
 module_param_named(hwcrypto, iwl3945_param_hwcrypto, int, 0444);
 MODULE_PARM_DESC(hwcrypto,
                 "using hardware crypto engine (default 0 [software])\n");
-module_param_named(debug, iwl3945_param_debug, int, 0444);
+module_param_named(debug, iwl3945_param_debug, uint, 0444);
 MODULE_PARM_DESC(debug, "debug output mask");
 module_param_named(disable_hw_scan, iwl3945_param_disable_hw_scan, int, 0444);
 MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 0)");