summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath6kl/bmi.h
diff options
context:
space:
mode:
authorKalle Valo <kvalo@qca.qualcomm.com>2012-03-07 20:03:58 +0200
committerKalle Valo <kvalo@qca.qualcomm.com>2012-03-07 20:03:58 +0200
commit24fc32b35647401bbf03b3e2d5f01c6d0579a01c (patch)
tree0313adc46ffb798f5934183fc8d9e5988288064c /drivers/net/wireless/ath/ath6kl/bmi.h
parentd0d670abcf97d2e1a369449847d776ebbfba292d (diff)
ath6kl: add ath6kl_bmi_write_hi32()
We have a lot of 32 bit writes to the host interest area and the code doing that is ugly. Clean that up by adding ath6kl_bmi_write_hi32(). This also fixes few checkpatch warnings. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/bmi.h')
-rw-r--r--drivers/net/wireless/ath/ath6kl/bmi.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/bmi.h b/drivers/net/wireless/ath/ath6kl/bmi.h
index 114f7b265a3a..e6a7330aadcd 100644
--- a/drivers/net/wireless/ath/ath6kl/bmi.h
+++ b/drivers/net/wireless/ath/ath6kl/bmi.h
@@ -223,6 +223,15 @@ struct ath6kl_bmi_target_info {
__le32 type; /* target type */
} __packed;
+#define ath6kl_bmi_write_hi32(ar, item, val) \
+ ({ \
+ u32 addr, v; \
+ addr = ath6kl_get_hi_item_addr(ar, HI_ITEM(item)); \
+ v = val; \
+ ath6kl_bmi_write(ar, addr, (u8 *) &v, sizeof(v)); \
+ })
+
+
int ath6kl_bmi_init(struct ath6kl *ar);
void ath6kl_bmi_cleanup(struct ath6kl *ar);
void ath6kl_bmi_reset(struct ath6kl *ar);