Skip to content

Conversation

@Geramy
Copy link
Contributor

@Geramy Geramy commented Nov 5, 2018

Fixed the crash issue with the if_athp when it tried to go for a second load of the firmware and get the hardware caps. For some reason, as we know the first attempt to load the firmware and power up the device doesn't work so we go for 6 times. the second time will work but for some reason, the old fwlog from wmi is still running or maybe its ending and clearing out the log, but fwlog is still registered and running. So I added a mutex check so that the software doesn't crash and it successfully loads the firmware a second time.

for sloweer systems I have changed the ATH10K_HTC_WAIT_TIMEOUT_MSEC to 2 seconds instead.
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.
…e 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.
stopping hif and restarting hif if htc wait target doesnt finish succesfully.
trying to reset the atheros chip to to load up properly on error.
sleep a little to let the device catch up and be ready.
I decided to use pause_sig in the case a signal called us to release before we end sleeping.
need to stop the core its not being called on error. I also have set bmi.done_sent = false.
turned the probe retry in to functional code and added a retry limit to core.h called ATH10K_FW_PROBE_RETRYS
added a function to the process that allows us to cleanup any memory leaks if there are any.
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.
Grammer correction and add a null check for fwlog locking mutext variable as well as adding a longer timeout for htc connect.
used wrong case for null, woops so use to the many other programming languages with lowercase null.
added mutext checking inside of if_athp_fwlog for some reason its still trying to log on an unitialized mutex, which means somewhere something is still initialized for the first firmware failed load, need to check this out in detail, its weird.
removing annoying warnings that come out of my serial device, so i cant see or type anything.
@erikarn erikarn force-pushed the master branch 2 times, most recently from c55dc6b to f1c00bf Compare July 6, 2025 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant