Guest User

rtw89_core_disable_rfkill.patch

a guest
Oct 18th, 2025
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. rtw89: core: Module option to disable check for HW RF kill
  2.  
  3. This patch forces bool rtw89_chip_has_rfkill to return false.
  4. If option disable_rfkill_check is set to 1 (or true), this will
  5. prevent the driver from polling the chip for an rfkill state.
  6.  
  7. --- a/drivers/net/wireless/realtek/rtw89/core.c
  8. +++ b/drivers/net/wireless/realtek/rtw89/core.c
  9. @@ -24,6 +24,10 @@ static bool rtw89_disable_ps_mode;
  10. module_param_named(disable_ps_mode, rtw89_disable_ps_mode, bool, 0644);
  11. MODULE_PARM_DESC(disable_ps_mode, "Set Y to disable low power mode");
  12.  
  13. +static bool rtw89_disable_rfkill_check;
  14. +module_param_named(disable_rfkill_check, rtw89_disable_rfkill_check, bool, 0644);
  15. +MODULE_PARM_DESC(disable_rfkill_check, "Disable check for chip hw rfkill state");
  16. +
  17. #define RTW89_DEF_CHAN(_freq, _hw_val, _flags, _band) \
  18. { .center_freq = _freq, .hw_value = _hw_val, .flags = _flags, .band = _band, }
  19. #define RTW89_DEF_CHAN_2G(_freq, _hw_val) \
  20. @@ -5540,6 +5544,10 @@ static int rtw89_chip_board_info_setup(struct rtw89_dev *rtwdev)
  21.  
  22. static bool rtw89_chip_has_rfkill(struct rtw89_dev *rtwdev)
  23. {
  24. + if (rtw89_disable_rfkill_check) {
  25. + return false;
  26. + }
  27. +
  28. return !!rtwdev->chip->rfkill_init;
  29. }
  30.  
  31.  
Advertisement
Add Comment
Please, Sign In to add comment