diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/hif.h')
| -rw-r--r-- | drivers/net/wireless/ath/ath6kl/hif.h | 61 |
1 files changed, 60 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/hif.h b/drivers/net/wireless/ath/ath6kl/hif.h index 797e2d1d9bf9..f2dc3bcdae4a 100644 --- a/drivers/net/wireless/ath/ath6kl/hif.h +++ b/drivers/net/wireless/ath/ath6kl/hif.h | |||
| @@ -59,6 +59,18 @@ | |||
| 59 | /* mode to enable special 4-bit interrupt assertion without clock */ | 59 | /* mode to enable special 4-bit interrupt assertion without clock */ |
| 60 | #define SDIO_IRQ_MODE_ASYNC_4BIT_IRQ (1 << 0) | 60 | #define SDIO_IRQ_MODE_ASYNC_4BIT_IRQ (1 << 0) |
| 61 | 61 | ||
| 62 | /* HTC runs over mailbox 0 */ | ||
| 63 | #define HTC_MAILBOX 0 | ||
| 64 | |||
| 65 | #define ATH6KL_TARGET_DEBUG_INTR_MASK 0x01 | ||
| 66 | |||
| 67 | /* FIXME: are these duplicates with MAX_SCATTER_ values in hif.h? */ | ||
| 68 | #define ATH6KL_SCATTER_ENTRIES_PER_REQ 16 | ||
| 69 | #define ATH6KL_MAX_TRANSFER_SIZE_PER_SCATTER (16 * 1024) | ||
| 70 | #define ATH6KL_SCATTER_REQS 4 | ||
| 71 | |||
| 72 | #define ATH6KL_HIF_COMMUNICATION_TIMEOUT 1000 | ||
| 73 | |||
| 62 | struct bus_request { | 74 | struct bus_request { |
| 63 | struct list_head list; | 75 | struct list_head list; |
| 64 | 76 | ||
| @@ -186,6 +198,34 @@ struct hif_scatter_req { | |||
| 186 | struct hif_scatter_item scat_list[1]; | 198 | struct hif_scatter_item scat_list[1]; |
| 187 | }; | 199 | }; |
| 188 | 200 | ||
| 201 | struct ath6kl_irq_proc_registers { | ||
| 202 | u8 host_int_status; | ||
| 203 | u8 cpu_int_status; | ||
| 204 | u8 error_int_status; | ||
| 205 | u8 counter_int_status; | ||
| 206 | u8 mbox_frame; | ||
| 207 | u8 rx_lkahd_valid; | ||
| 208 | u8 host_int_status2; | ||
| 209 | u8 gmbox_rx_avail; | ||
| 210 | __le32 rx_lkahd[2]; | ||
| 211 | __le32 rx_gmbox_lkahd_alias[2]; | ||
| 212 | } __packed; | ||
| 213 | |||
| 214 | struct ath6kl_irq_enable_reg { | ||
| 215 | u8 int_status_en; | ||
| 216 | u8 cpu_int_status_en; | ||
| 217 | u8 err_int_status_en; | ||
| 218 | u8 cntr_int_status_en; | ||
| 219 | } __packed; | ||
| 220 | |||
| 221 | struct ath6kl_device { | ||
| 222 | spinlock_t lock; | ||
| 223 | struct ath6kl_irq_proc_registers irq_proc_reg; | ||
| 224 | struct ath6kl_irq_enable_reg irq_en_reg; | ||
| 225 | struct htc_target *htc_cnxt; | ||
| 226 | struct ath6kl *ar; | ||
| 227 | }; | ||
| 228 | |||
| 189 | struct ath6kl_hif_ops { | 229 | struct ath6kl_hif_ops { |
| 190 | int (*read_write_sync)(struct ath6kl *ar, u32 addr, u8 *buf, | 230 | int (*read_write_sync)(struct ath6kl *ar, u32 addr, u8 *buf, |
| 191 | u32 len, u32 request); | 231 | u32 len, u32 request); |
| @@ -202,7 +242,26 @@ struct ath6kl_hif_ops { | |||
| 202 | int (*scat_req_rw) (struct ath6kl *ar, | 242 | int (*scat_req_rw) (struct ath6kl *ar, |
| 203 | struct hif_scatter_req *scat_req); | 243 | struct hif_scatter_req *scat_req); |
| 204 | void (*cleanup_scatter)(struct ath6kl *ar); | 244 | void (*cleanup_scatter)(struct ath6kl *ar); |
| 205 | int (*suspend)(struct ath6kl *ar); | 245 | int (*suspend)(struct ath6kl *ar, struct cfg80211_wowlan *wow); |
| 246 | int (*resume)(struct ath6kl *ar); | ||
| 247 | int (*power_on)(struct ath6kl *ar); | ||
| 248 | int (*power_off)(struct ath6kl *ar); | ||
| 249 | void (*stop)(struct ath6kl *ar); | ||
| 206 | }; | 250 | }; |
| 207 | 251 | ||
| 252 | int ath6kl_hif_setup(struct ath6kl_device *dev); | ||
| 253 | int ath6kl_hif_unmask_intrs(struct ath6kl_device *dev); | ||
| 254 | int ath6kl_hif_mask_intrs(struct ath6kl_device *dev); | ||
| 255 | int ath6kl_hif_poll_mboxmsg_rx(struct ath6kl_device *dev, | ||
| 256 | u32 *lk_ahd, int timeout); | ||
| 257 | int ath6kl_hif_rx_control(struct ath6kl_device *dev, bool enable_rx); | ||
| 258 | int ath6kl_hif_disable_intrs(struct ath6kl_device *dev); | ||
| 259 | |||
| 260 | int ath6kl_hif_rw_comp_handler(void *context, int status); | ||
| 261 | int ath6kl_hif_intr_bh_handler(struct ath6kl *ar); | ||
| 262 | |||
| 263 | /* Scatter Function and Definitions */ | ||
| 264 | int ath6kl_hif_submit_scat_req(struct ath6kl_device *dev, | ||
| 265 | struct hif_scatter_req *scat_req, bool read); | ||
| 266 | |||
| 208 | #endif | 267 | #endif |
