]> git.baikalelectronics.ru Git - kernel.git/commit
ath10k: retrieve calibration data from file
authorKalle Valo <kvalo@qca.qualcomm.com>
Mon, 13 Oct 2014 06:40:59 +0000 (09:40 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Tue, 21 Oct 2014 07:03:33 +0000 (10:03 +0300)
commit7eaadef181e4124a96a308fe0efd50b596ba3d20
tree0030e4cc5b3d226b6892f35a90922c085b3bc613
parent6bc87518fa3567f7c5e1a6a95ba4bc63171f754a
ath10k: retrieve calibration data from file

A frequent request have been to be able to provide calibration data from a
file as some of the AP devices store the calibration data on an MTD partition.
This patchset adds support for that and also makes it easier to add Device Tree
support later on.

The calibration data is found by using the id string provided by dev_name()
using this format:

cal-<bus>-<id>.bin

With PCI the id string contains bus, slot and func values. For example for a
PCI device in bus 2 slot 0, ath10k will try to retrieve a calibration data from
a file:

/lib/firmware/ath10k/cal-pci-0000:02:00.0.bin

The calibration data sequence is:

1. Check with request_firmware() if there's a calibration file
   ("cal-<bus>-<id>.bin") on the filesystem for this device. If yes, use that. If
   not, goto 2

2. Check if otp.bin is able to successfully load the calibration data
   from OTP. If yes, use that. If not, goto 3.

4. Print an error message that no calibration data found and stop driver
   initialization for this device.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/core.c
drivers/net/wireless/ath/ath10k/core.h
drivers/net/wireless/ath/ath10k/debug.c
drivers/net/wireless/ath/ath10k/hw.h