Page MenuHomeFreeBSD

acpi_panasonic: Clear wireless RF_KILL on boot and resume
AcceptedPublic

Authored by guest-seuros on Thu, Feb 12, 10:26 PM.
Tags
None
Referenced Files
F145007785: D55265.id.diff
Sun, Feb 15, 12:01 AM
F144972795: D55265.diff
Sat, Feb 14, 3:33 PM
Unknown Object (File)
Sat, Feb 14, 1:31 PM
Unknown Object (File)
Sat, Feb 14, 1:31 PM
Unknown Object (File)
Thu, Feb 12, 10:35 PM
Subscribers

Details

Summary

On Panasonic FZ-Y1 and similar models, the EC latches RF_KILL on shutdown and suspend when battery is at certain level, causing wireless to boot with hard block.

Call WLSW.SHRF during attach and resume to clear the block.

Tested on: Panasonic FZ-Y1 with Intel Wireless 7265

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 70649
Build 67532: arc lint + arc unit

Event Timeline

guest-seuros held this revision as a draft.
guest-seuros edited the test plan for this revision. (Show Details)
guest-seuros added reviewers: jhibbits, obiwac, jhb, nyan, imp.
guest-seuros edited the test plan for this revision. (Show Details)

This code needs refinement but i opened this diff to get guidance.

Background:

  • FZ-Y1 has no physical RF-KILL switch - the EC controls RF_KILL via ACPI
  • The EC latches RF_KILL on shutdown/suspend, causing hard block on boot
  • WLSW.SHRF clears the EC latch, allowing wireless to work
  • This issue happens in all OSes that are not Windows (but also Windows without proper driver/utility)
  • It possible to reset state by resetting the bios or booting to windows

Concern:
Some Panasonic rugged laptops DO have physical RF-KILL switches. The current code will silently fail (with bootverbose warning only) if WLSW.SHRF doesn't exist or fails, but I'm uncertain if calling SHRF on models with physical switches could cause issues.

Questions:

  1. Is there a way to detect if the model has a physical vs software RF-KILL ?
  2. Should this be conditional on specific models, or is the current approach (silent fail on models without WLSW) acceptable?
adrian added inline comments.
sys/dev/acpi_support/acpi_panasonic.c
178

maybe mention the model(s) in question in the comments here?

This revision is now accepted and ready to land.Fri, Feb 13, 3:34 AM
sys/dev/acpi_support/acpi_panasonic.c
184–192

we might as well just make this a function, since calling WLSW.SHRF is exactly the same in attach and resume

sys/dev/acpi_support/acpi_panasonic.c
184–192

Sure!

This is duplicated because i still need to know if this approach is correct.

I fixed first time the shutdown issue, then realized it happened on suspend too. Ctrl+v :)