mbox series

[0/2] wifi: rtw89: adjust early loading firmware for SECURITY_LOADPIN_ENFORCE

Message ID 20221202060521.501512-1-pkshih@realtek.com (mailing list archive)
Headers show
Series wifi: rtw89: adjust early loading firmware for SECURITY_LOADPIN_ENFORCE | expand

Message

Ping-Ke Shih Dec. 2, 2022, 6:05 a.m. UTC
Originally, we early load partial firmware to know its capability before
register_hw(), because it can save some loading time. However, a platform
can enable SECURITY_LOADPIN_ENFORCE that disallows to load firmware
partially, so we load full firmware instead in this kind of platform.
The costs of loading partial and full firmware are about 10us and 100us in
10+ years old computer, so I think this isn't very critical for users.

We are still thinking if we can fork a work during PCI probe to load
firmware and register_hw(), but this will be a big change of initial flow.
Before the implement, this patchset can let driver works as expectation and
avoid kernel warning if SECURITY_LOADPIN_ENFORCE is enabled.

Zong-Zhe Yang (2):
  wifi: rtw89: don't request partial firmware if
    SECURITY_LOADPIN_ENFORCE
  wifi: rtw89: request full firmware only once if it's early requested

 drivers/net/wireless/realtek/rtw89/core.c |  6 ++-
 drivers/net/wireless/realtek/rtw89/fw.c   | 60 +++++++++++++++++------
 drivers/net/wireless/realtek/rtw89/fw.h   | 22 +++++++--
 3 files changed, 69 insertions(+), 19 deletions(-)