iwlagn: kill iwlagn_rx_handler_setup
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 3 Jul 2011 12:45:34 +0000 (15:45 +0300)
committerWey-Yi Guy <wey-yi.w.guy@intel.com>
Thu, 21 Jul 2011 14:27:55 +0000 (07:27 -0700)
Since iwlagn_rx_handler_setup is always called, fold it into
iwl_rx_handler_setup. BT related handlers are setup by the new
bt_rx_handler_setup lib_ops.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.guy@intel.com>
drivers/net/wireless/iwlwifi/iwl-1000.c
drivers/net/wireless/iwlwifi/iwl-2000.c
drivers/net/wireless/iwlwifi/iwl-5000.c
drivers/net/wireless/iwlwifi/iwl-6000.c
drivers/net/wireless/iwlwifi/iwl-agn-lib.c
drivers/net/wireless/iwlwifi/iwl-agn.h
drivers/net/wireless/iwlwifi/iwl-core.h
drivers/net/wireless/iwlwifi/iwl-rx.c

index fe15a46e4c7e1e986d9055d1f0e01be24dbe8849..5fa171954099429169deafb8e1e236e7add132ad 100644 (file)
@@ -168,7 +168,6 @@ static int iwl1000_hw_set_hw_params(struct iwl_priv *priv)
 
 static struct iwl_lib_ops iwl1000_lib = {
        .set_hw_params = iwl1000_hw_set_hw_params,
-       .rx_handler_setup = iwlagn_rx_handler_setup,
        .setup_deferred_work = iwlagn_setup_deferred_work,
        .nic_config = iwl1000_nic_config,
        .eeprom_ops = {
index 7e0f766e43645c8c4e8436d9ec2672a8d808f085..c913410380c395d1f72f9e310a7532105fbaa523 100644 (file)
@@ -167,7 +167,6 @@ static int iwl2000_hw_set_hw_params(struct iwl_priv *priv)
 
 static struct iwl_lib_ops iwl2000_lib = {
        .set_hw_params = iwl2000_hw_set_hw_params,
-       .rx_handler_setup = iwlagn_rx_handler_setup,
        .setup_deferred_work = iwlagn_setup_deferred_work,
        .nic_config = iwl2000_nic_config,
        .eeprom_ops = {
@@ -187,7 +186,7 @@ static struct iwl_lib_ops iwl2000_lib = {
 
 static struct iwl_lib_ops iwl2030_lib = {
        .set_hw_params = iwl2000_hw_set_hw_params,
-       .rx_handler_setup = iwlagn_bt_rx_handler_setup,
+       .bt_rx_handler_setup = iwlagn_bt_rx_handler_setup,
        .setup_deferred_work = iwlagn_bt_setup_deferred_work,
        .cancel_deferred_work = iwlagn_bt_cancel_deferred_work,
        .nic_config = iwl2000_nic_config,
index e0908784afc087018e28555b7470850cfec89cb9..4e1204a5ff681c9102d2fad0a30acb2f5eed622a 100644 (file)
@@ -320,7 +320,6 @@ static int iwl5000_hw_channel_switch(struct iwl_priv *priv,
 
 static struct iwl_lib_ops iwl5000_lib = {
        .set_hw_params = iwl5000_hw_set_hw_params,
-       .rx_handler_setup = iwlagn_rx_handler_setup,
        .setup_deferred_work = iwlagn_setup_deferred_work,
        .set_channel_switch = iwl5000_hw_channel_switch,
        .nic_config = iwl5000_nic_config,
@@ -340,7 +339,6 @@ static struct iwl_lib_ops iwl5000_lib = {
 
 static struct iwl_lib_ops iwl5150_lib = {
        .set_hw_params = iwl5150_hw_set_hw_params,
-       .rx_handler_setup = iwlagn_rx_handler_setup,
        .setup_deferred_work = iwlagn_setup_deferred_work,
        .set_channel_switch = iwl5000_hw_channel_switch,
        .nic_config = iwl5000_nic_config,
index 3b2d753b346343271fec7fc2a1992009aee971d6..f1fdcdc21eb5b8df67863085b88f040d910b1e7d 100644 (file)
@@ -258,7 +258,6 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
 
 static struct iwl_lib_ops iwl6000_lib = {
        .set_hw_params = iwl6000_hw_set_hw_params,
-       .rx_handler_setup = iwlagn_rx_handler_setup,
        .setup_deferred_work = iwlagn_setup_deferred_work,
        .set_channel_switch = iwl6000_hw_channel_switch,
        .nic_config = iwl6000_nic_config,
@@ -279,7 +278,7 @@ static struct iwl_lib_ops iwl6000_lib = {
 
 static struct iwl_lib_ops iwl6030_lib = {
        .set_hw_params = iwl6000_hw_set_hw_params,
-       .rx_handler_setup = iwlagn_bt_rx_handler_setup,
+       .bt_rx_handler_setup = iwlagn_bt_rx_handler_setup,
        .setup_deferred_work = iwlagn_bt_setup_deferred_work,
        .cancel_deferred_work = iwlagn_bt_cancel_deferred_work,
        .set_channel_switch = iwl6000_hw_channel_switch,
index e06a5c2f83558b75206ac690056b4ace7b27cfbc..5d6258d08e2066803d5da186c3f1d0ec6511cff0 100644 (file)
@@ -391,8 +391,7 @@ void iwl_check_abort_status(struct iwl_priv *priv,
        }
 }
 
-static void iwlagn_rx_reply_tx(struct iwl_priv *priv,
-                               struct iwl_rx_mem_buffer *rxb)
+void iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
 {
        struct iwl_rx_packet *pkt = rxb_addr(rxb);
        u16 sequence = le16_to_cpu(pkt->hdr.sequence);
@@ -479,19 +478,6 @@ static void iwlagn_rx_reply_tx(struct iwl_priv *priv,
        spin_unlock_irqrestore(&priv->sta_lock, flags);
 }
 
-void iwlagn_rx_handler_setup(struct iwl_priv *priv)
-{
-       /* init calibration handlers */
-       priv->rx_handlers[CALIBRATION_RES_NOTIFICATION] =
-                                       iwlagn_rx_calib_result;
-       priv->rx_handlers[REPLY_TX] = iwlagn_rx_reply_tx;
-
-       /* set up notification wait support */
-       spin_lock_init(&priv->_agn.notif_wait_lock);
-       INIT_LIST_HEAD(&priv->_agn.notif_waits);
-       init_waitqueue_head(&priv->_agn.notif_waitq);
-}
-
 void iwlagn_setup_deferred_work(struct iwl_priv *priv)
 {
        /*
@@ -1762,7 +1748,6 @@ void iwlagn_bt_coex_profile_notif(struct iwl_priv *priv,
 
 void iwlagn_bt_rx_handler_setup(struct iwl_priv *priv)
 {
-       iwlagn_rx_handler_setup(priv);
        priv->rx_handlers[REPLY_BT_COEX_PROFILE_NOTIF] =
                iwlagn_bt_coex_profile_notif;
 }
index 0e8ccb9c99b1868b5f5aa7df71bf991996f0433c..d9fef639759c08f5b0302e9d5aa2d047fe5fb1cb 100644 (file)
@@ -162,7 +162,6 @@ int iwlagn_load_ucode_wait_alive(struct iwl_priv *priv,
 /* lib */
 void iwl_check_abort_status(struct iwl_priv *priv,
                            u8 frame_count, u32 status);
-void iwlagn_rx_handler_setup(struct iwl_priv *priv);
 void iwlagn_setup_deferred_work(struct iwl_priv *priv);
 int iwlagn_hw_valid_rtc_data_addr(u32 addr);
 int iwlagn_send_tx_power(struct iwl_priv *priv);
@@ -197,6 +196,7 @@ int iwlagn_txq_check_empty(struct iwl_priv *priv,
                           int sta_id, u8 tid, int txq_id);
 void iwlagn_rx_reply_compressed_ba(struct iwl_priv *priv,
                                struct iwl_rx_mem_buffer *rxb);
+void iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb);
 int iwlagn_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index);
 
 static inline u32 iwl_tx_status_to_mac80211(u32 status)
index c10ced58d357eec8838a2d39075a0fe15cd2804d..6f825d3e50e9d2c6686d2157f1bf0469a92e2dad 100644 (file)
@@ -83,8 +83,8 @@ struct iwl_cmd;
 struct iwl_lib_ops {
        /* set hw dependent parameters */
        int (*set_hw_params)(struct iwl_priv *priv);
-       /* setup Rx handler */
-       void (*rx_handler_setup)(struct iwl_priv *priv);
+       /* setup BT Rx handler */
+       void (*bt_rx_handler_setup)(struct iwl_priv *priv);
        /* setup deferred work */
        void (*setup_deferred_work)(struct iwl_priv *priv);
        /* cancel deferred work */
index 05fd75fb59ac79857a858222f6fe21b8dd7a2e40..f67931d408b6e53b6f2f22d99e074381cf504464 100644 (file)
@@ -966,8 +966,20 @@ void iwl_setup_rx_handlers(struct iwl_priv *priv)
        /* block ack */
        handlers[REPLY_COMPRESSED_BA]           = iwlagn_rx_reply_compressed_ba;
 
-       /* Set up hardware specific Rx handlers */
-       priv->cfg->lib->rx_handler_setup(priv);
+       /* init calibration handlers */
+       priv->rx_handlers[CALIBRATION_RES_NOTIFICATION] =
+                                       iwlagn_rx_calib_result;
+       priv->rx_handlers[REPLY_TX] = iwlagn_rx_reply_tx;
+
+       /* set up notification wait support */
+       spin_lock_init(&priv->_agn.notif_wait_lock);
+       INIT_LIST_HEAD(&priv->_agn.notif_waits);
+       init_waitqueue_head(&priv->_agn.notif_waitq);
+
+       /* Set up BT Rx handlers */
+       if (priv->cfg->lib->bt_rx_handler_setup)
+               priv->cfg->lib->bt_rx_handler_setup(priv);
+
 }
 
 void iwl_rx_dispatch(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)