diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-06-06 14:26:43 -0700 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2011-06-11 07:11:13 -0700 |
commit | 1f8bf0396ae7e63648b210fd197b1a5ab0db51bf (patch) | |
tree | 2fb91fac19f8257b7c57cf457b01e2ade714fc09 /drivers/net/wireless/iwlwifi/iwl-agn.h | |
parent | 109a0ac5d8ed35914f5ce5c6d36244c08963c6cb (diff) |
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.h | 8 |
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 94ee1416fb9..5d8b2db82a9 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); |