Skip to content

Commit

Permalink
Merge branch 'for-linville' of git://github.com/kvalo/ath6kl
Browse files Browse the repository at this point in the history
  • Loading branch information
linvjw committed Mar 13, 2012
2 parents 5d6a1b0 + 9df2a0b commit 843dc66
Show file tree
Hide file tree
Showing 25 changed files with 1,228 additions and 667 deletions.
3 changes: 2 additions & 1 deletion drivers/net/wireless/ath/ath6kl/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#------------------------------------------------------------------------------
# Copyright (c) 2004-2010 Atheros Communications Inc.
# Copyright (c) 2004-2011 Atheros Communications Inc.
# Copyright (c) 2011-2012 Qualcomm Atheros, Inc.
# All rights reserved.
#
#
Expand Down
7 changes: 4 additions & 3 deletions drivers/net/wireless/ath/ath6kl/bmi.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2004-2011 Atheros Communications Inc.
* Copyright (c) 2011-2012 Qualcomm Atheros, Inc.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down Expand Up @@ -105,7 +106,7 @@ int ath6kl_bmi_get_target_info(struct ath6kl *ar,
}

ath6kl_dbg(ATH6KL_DBG_BMI, "target info (ver: 0x%x type: 0x%x)\n",
targ_info->version, targ_info->type);
targ_info->version, targ_info->type);

return 0;
}
Expand Down Expand Up @@ -192,7 +193,7 @@ int ath6kl_bmi_write(struct ath6kl *ar, u32 addr, u8 *buf, u32 len)
memset(ar->bmi.cmd_buf, 0, ar->bmi.max_data_size + header);

ath6kl_dbg(ATH6KL_DBG_BMI,
"bmi write memory: addr: 0x%x, len: %d\n", addr, len);
"bmi write memory: addr: 0x%x, len: %d\n", addr, len);

len_remain = len;
while (len_remain) {
Expand Down Expand Up @@ -434,7 +435,7 @@ int ath6kl_bmi_lz_data(struct ath6kl *ar, u8 *buf, u32 len)
memcpy(&(ar->bmi.cmd_buf[offset]), &tx_len, sizeof(tx_len));
offset += sizeof(tx_len);
memcpy(&(ar->bmi.cmd_buf[offset]), &buf[len - len_remain],
tx_len);
tx_len);
offset += tx_len;

ret = ath6kl_hif_bmi_write(ar, ar->bmi.cmd_buf, offset);
Expand Down
24 changes: 24 additions & 0 deletions drivers/net/wireless/ath/ath6kl/bmi.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2004-2011 Atheros Communications Inc.
* Copyright (c) 2011 Qualcomm Atheros, Inc.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
Expand Down Expand Up @@ -222,6 +223,29 @@ struct ath6kl_bmi_target_info {
__le32 type; /* target type */
} __packed;

#define ath6kl_bmi_write_hi32(ar, item, val) \
({ \
u32 addr; \
__le32 v; \
\
addr = ath6kl_get_hi_item_addr(ar, HI_ITEM(item)); \
v = cpu_to_le32(val); \
ath6kl_bmi_write(ar, addr, (u8 *) &v, sizeof(v)); \
})

#define ath6kl_bmi_read_hi32(ar, item, val) \
({ \
u32 addr, *check_type = val; \
__le32 tmp; \
int ret; \
\
(void) (check_type == val); \
addr = ath6kl_get_hi_item_addr(ar, HI_ITEM(item)); \
ret = ath6kl_bmi_read(ar, addr, (u8 *) &tmp, 4); \
*val = le32_to_cpu(tmp); \
ret; \
})

int ath6kl_bmi_init(struct ath6kl *ar);
void ath6kl_bmi_cleanup(struct ath6kl *ar);
void ath6kl_bmi_reset(struct ath6kl *ar);
Expand Down
Loading

0 comments on commit 843dc66

Please sign in to comment.