reenable-hwcrypto.sh 705 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/bash
  2. # Copyright (c) 2021, Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
  3. #
  4. # This code may be distributed under the terms of the BSD license.
  5. # See README for more details.
  6. set -e
  7. NOHWCRYPT="ath5k ath9k ath9k_htc rt2800usb carl9170 b43 p54common rt2500usb rt2800pci rt2800usb rt73usb"
  8. SWCRYPTO="iwlwifi iwl3945 iwl4965"
  9. HWCRYPTO="ipw2200"
  10. # 1. Create nohwcrypt.conf options file
  11. rm -f /etc/modprobe.d/nohwcrypt.conf
  12. # 2. Remove loaded modules so they'll reload parameters
  13. for MODULE in $NOHWCRYPT $SWCRYPTO $HWCRYPTO
  14. do
  15. rmmod $MODULE 2> /dev/null || true;
  16. done
  17. # 3. Done. To be sure parameters are reloaded, reboot computer.
  18. echo "Hardware decryption re-enabled. Reboot your computer."