freebsd ath10k port
Geramy and erikarn Added in a retry so that when kldload does its first interface creati…
…on it works. (#4)

* changed timeout to 2 seconds

for sloweer systems I have changed the ATH10K_HTC_WAIT_TIMEOUT_MSEC to 2 seconds instead.

* took back the change.

Instead i'll implement a system that unloads the firmware when the capabilities don't come in correctly and the firmware load crashes. kldload and unload should not have to deal with internal driver issues.

* add code to force the driver to attempt to retry to load the interface up to 6 times.

add code to force the driver to attempt to retry to load the interface up to 6 times. This should fix kldload issues, as long as the wifi card will work during boot we can automate bringing up the interface in scripts. Thats our first goal.

* re-order

* re-trying probe fw until sucessful or errors at the 6th try.

* undo changes

* attempt at retrying to wait for htc to complete and return

stopping hif and restarting hif if htc wait target doesnt finish succesfully.

* removed return on hif_stop

* attemping to recall ath10k_core_probe_fw

trying to reset the atheros chip to to load up properly on error.

* add sleep statement

sleep a little to let the device catch up and be ready.

* dumb auto programming features of VSCode capatilized Sleep

* not use to freebsd kernel developing.

I decided to use pause_sig in the case a signal called us to release before we end sleeping.

* added in a ath10k_core_stop

need to stop the core its not being called on error. I also have set bmi.done_sent = false.

* oops forgot semicolon

* test removing ath10k_core_stop from retrying probe and just hack bmi.done_sent

* cleaened up my hack for probe retrying

turned the probe retry in to functional code and added a retry limit to core.h called ATH10K_FW_PROBE_RETRYS

* forgot struct def

* added function to cleanup memory leaks

added a function to the process that allows us to cleanup any memory leaks if there are any.

* removed pause_sig

pause_sig isn't being used anywhere else and pause_sig is a delay based function which does not put the thread in the sleep queue so I switched it to tsleep instead.

* removed line of code from ath10k
Latest commit 107d83e Oct 17, 2018