- Skip firmware reload if MCU already initialized
- Fix firmware_put() memory leaks on error paths
- Increase MCU init timeout to 15 seconds
- Use debug macros instead of device_printf for verbose output
- Remove unused 'ret' variable
- Fix space indentation to tabs per style(9)
Details
- Reviewers
adrian ziaee - Commits
- rGf981fa12b760: mtw: Fix firmware loading and memory leaks
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Thanks for tagging me! I really only review docs side of things. The improvements in error messages looks good though! :P
I tagged you because of the style(9) changes. Some lines are pure indentation change.
Oh, thanks! Pure whitespace changes are very hard on downstreams, I think they prefer for us to separate them into a separate commit. @adrian, does that make sense here?
Got it, i will avoid doing them in other diffs.
PS: Those lines are going to be refactored in a followup, but i was good to get the feedback in this small change, than in a bigger one.
| sys/dev/usb/wlan/if_mtw.c | ||
|---|---|---|
| 643–647 | Given you mention style.9 I believe the | should go to the end of the previous line: If you have to wrap a long statement, put the operator at the end of the line. In general I do understand why we write them this way though. | |
| sys/dev/usb/wlan/if_mtw.c | ||
|---|---|---|
| 643–647 | Ah i see line 632. Actually it's better, let me edit it. | |
interesting, is there no way to force a firmware reload without just power cycling the device?
eg if i wanted to test two different firmware images by unloading and reloading the driver?
You can eject the usb via software, that will init a reset.
However this fix the usage of normal users that keep their wifi connected to an always powered usb port or hub.