Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d301193 authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by Wey-Yi Guy
Browse files

iwlagn: kill iwlagn_rx_handler_setup



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: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.guy@intel.com>
parent 56d90f4c
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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 = {
+1 −2
Original line number Diff line number Diff line
@@ -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,
+0 −2
Original line number Diff line number Diff line
@@ -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,
+1 −2
Original line number Diff line number Diff line
@@ -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,
+1 −16
Original line number Diff line number Diff line
@@ -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;
}
Loading