summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn.h
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2011-06-06 23:26:43 +0200
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2011-06-11 16:11:13 +0200
commit1f8bf0396ae7e63648b210fd197b1a5ab0db51bf (patch)
tree2fb91fac19f8257b7c57cf457b01e2ade714fc09 /drivers/net/wireless/iwlwifi/iwl-agn.h
parentiwlagn: group similar defines together (diff)
downloadlinux-1f8bf0396ae7e63648b210fd197b1a5ab0db51bf.tar.xz
linux-1f8bf0396ae7e63648b210fd197b1a5ab0db51bf.zip
iwlagn: merge duplicated code into single place
Multiple places have similar code to construct calib header. Merge into single inline function. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h
index 94ee1416fb99..5d8b2db82a97 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.h
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.h
@@ -129,6 +129,14 @@ static inline void iwl_synchronize_irq(struct iwl_priv *priv)
tasklet_kill(&priv->irq_tasklet);
}
+static inline void iwl_set_calib_hdr(struct iwl_calib_hdr *hdr, u8 cmd)
+{
+ hdr->op_code = cmd;
+ hdr->first_group = 0;
+ hdr->groups_num = 1;
+ hdr->data_valid = 1;
+}
+
int iwl_prepare_card_hw(struct iwl_priv *priv);
int iwlagn_start_device(struct iwl_priv *priv);