aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k/hif.h
diff options
context:
space:
mode:
authorSven Eckelmann <sven.eckelmann@open-mesh.com>2016-06-02 10:59:50 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2016-06-07 07:28:35 -0400
commit6847f967339179b72eab690d46bc6e88ff847844 (patch)
tree971c6cb09ddb84755445b43f1278b281dd975e13 /drivers/net/wireless/ath/ath10k/hif.h
parent6fd3dd7160918f528b0d6b7084d18b31cd5fced5 (diff)
ath10k: add board data download from target
The QCA9887 stores its calibration data (board.bin) inside the EEPROM of the target. This has to be downloaded manually to allow the device to initialize correctly. Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com> [kvalo@qca.qualcomm.com: handle -EOPNOTSUPP and s/fetch_board_data/fetch_cal_eeprom] Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/hif.h')
-rw-r--r--drivers/net/wireless/ath/ath10k/hif.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/hif.h b/drivers/net/wireless/ath/ath10k/hif.h
index 89e7076c919f..b2566b06e1e1 100644
--- a/drivers/net/wireless/ath/ath10k/hif.h
+++ b/drivers/net/wireless/ath/ath10k/hif.h
@@ -87,6 +87,10 @@ struct ath10k_hif_ops {
87 87
88 int (*suspend)(struct ath10k *ar); 88 int (*suspend)(struct ath10k *ar);
89 int (*resume)(struct ath10k *ar); 89 int (*resume)(struct ath10k *ar);
90
91 /* fetch calibration data from target eeprom */
92 int (*fetch_cal_eeprom)(struct ath10k *ar, void **data,
93 size_t *data_len);
90}; 94};
91 95
92static inline int ath10k_hif_tx_sg(struct ath10k *ar, u8 pipe_id, 96static inline int ath10k_hif_tx_sg(struct ath10k *ar, u8 pipe_id,
@@ -202,4 +206,14 @@ static inline void ath10k_hif_write32(struct ath10k *ar,
202 ar->hif.ops->write32(ar, address, data); 206 ar->hif.ops->write32(ar, address, data);
203} 207}
204 208
209static inline int ath10k_hif_fetch_cal_eeprom(struct ath10k *ar,
210 void **data,
211 size_t *data_len)
212{
213 if (!ar->hif.ops->fetch_cal_eeprom)
214 return -EOPNOTSUPP;
215
216 return ar->hif.ops->fetch_cal_eeprom(ar, data, data_len);
217}
218
205#endif /* _HIF_H_ */ 219#endif /* _HIF_H_ */