rt2x00: Add module parameter to disable HW crypto
authorIvo van Doorn <ivdoorn@gmail.com>
Wed, 6 Aug 2008 15:27:31 +0000 (17:27 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 22 Aug 2008 20:29:59 +0000 (16:29 -0400)
Add a module parameter to rt61 and rt73 to disable
HW crypto. The option should only be checked when
determining if the SUPPORT_HW_CRYPTO flag should
be set or not.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt61pci.c
drivers/net/wireless/rt2x00/rt73usb.c

index 0fcc456368340a1b2feadf8110fdc391baa89328..23cf93dfda0603c4150feadbe004f5e7a3b71ef5 100644 (file)
 #include "rt2x00pci.h"
 #include "rt61pci.h"
 
+/*
+ * Allow hardware encryption to be disabled.
+ */
+static int modparam_nohwcrypt = 0;
+module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO);
+MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
+
 /*
  * Register access.
  * BBP and RF register require indirect register access,
@@ -2617,7 +2624,8 @@ static int rt61pci_probe_hw(struct rt2x00_dev *rt2x00dev)
         */
        __set_bit(DRIVER_REQUIRE_FIRMWARE, &rt2x00dev->flags);
        __set_bit(DRIVER_REQUIRE_DMA, &rt2x00dev->flags);
-       __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags);
+       if (!modparam_nohwcrypt)
+               __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags);
 
        /*
         * Set the rssi offset.
index 4f2eb90aaf0766e2e840b2337072592159570da3..f58fd059c9a0cd4bb80002724b652e83b418075b 100644 (file)
 #include "rt2x00usb.h"
 #include "rt73usb.h"
 
+/*
+ * Allow hardware encryption to be disabled.
+ */
+static int modparam_nohwcrypt = 0;
+module_param_named(nohwcrypt, modparam_nohwcrypt, bool, S_IRUGO);
+MODULE_PARM_DESC(nohwcrypt, "Disable hardware encryption.");
+
 /*
  * Register access.
  * All access to the CSR registers will go through the methods
@@ -2211,7 +2218,8 @@ static int rt73usb_probe_hw(struct rt2x00_dev *rt2x00dev)
         */
        __set_bit(DRIVER_REQUIRE_FIRMWARE, &rt2x00dev->flags);
        __set_bit(DRIVER_REQUIRE_SCHEDULED, &rt2x00dev->flags);
-       __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags);
+       if (!modparam_nohwcrypt)
+               __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags);
 
        /*
         * Set the rssi offset.