Commit 008c4482 authored by Ivo van Doorn's avatar Ivo van Doorn Committed by John W. Linville

rt2x00: Add module parameter to disable HW crypto

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: default avatarIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent ba2ab471
...@@ -37,6 +37,13 @@ ...@@ -37,6 +37,13 @@
#include "rt2x00pci.h" #include "rt2x00pci.h"
#include "rt61pci.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. * Register access.
* BBP and RF register require indirect register access, * BBP and RF register require indirect register access,
...@@ -2617,7 +2624,8 @@ static int rt61pci_probe_hw(struct rt2x00_dev *rt2x00dev) ...@@ -2617,7 +2624,8 @@ static int rt61pci_probe_hw(struct rt2x00_dev *rt2x00dev)
*/ */
__set_bit(DRIVER_REQUIRE_FIRMWARE, &rt2x00dev->flags); __set_bit(DRIVER_REQUIRE_FIRMWARE, &rt2x00dev->flags);
__set_bit(DRIVER_REQUIRE_DMA, &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. * Set the rssi offset.
......
...@@ -36,6 +36,13 @@ ...@@ -36,6 +36,13 @@
#include "rt2x00usb.h" #include "rt2x00usb.h"
#include "rt73usb.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. * Register access.
* All access to the CSR registers will go through the methods * All access to the CSR registers will go through the methods
...@@ -2211,7 +2218,8 @@ static int rt73usb_probe_hw(struct rt2x00_dev *rt2x00dev) ...@@ -2211,7 +2218,8 @@ static int rt73usb_probe_hw(struct rt2x00_dev *rt2x00dev)
*/ */
__set_bit(DRIVER_REQUIRE_FIRMWARE, &rt2x00dev->flags); __set_bit(DRIVER_REQUIRE_FIRMWARE, &rt2x00dev->flags);
__set_bit(DRIVER_REQUIRE_SCHEDULED, &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. * Set the rssi offset.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment