From: Stanislaw Gruszka Date: Tue, 27 Jul 2010 14:48:17 +0000 (-0400) Subject: rt2500usb: truly disable encryption when initialize X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ac59b496d9fd0b7425219e8dc5d4f1f6f0083efc;p=linux-beck.git rt2500usb: truly disable encryption when initialize Without cipher part nullify of TXRX_CSR0 register we can receive corrupted frames (removed IV or IVC), after reloading rt2500usb module with nohwcrypt=1 option, if previous some keys were configured into the hardware. Signed-off-by: Stanislaw Gruszka Acked-by: Ivo van Doorn Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 27942455ddcc..08240f813ef4 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c @@ -817,6 +817,7 @@ static int rt2500usb_init_registers(struct rt2x00_dev *rt2x00dev) rt2500usb_register_write(rt2x00dev, MAC_CSR8, reg); rt2500usb_register_read(rt2x00dev, TXRX_CSR0, ®); + rt2x00_set_field16(®, TXRX_CSR0_ALGORITHM, CIPHER_NONE); rt2x00_set_field16(®, TXRX_CSR0_IV_OFFSET, IEEE80211_HEADER); rt2x00_set_field16(®, TXRX_CSR0_KEY_ID, 0); rt2500usb_register_write(rt2x00dev, TXRX_CSR0, reg);