Date: Tue, 26 Jul 2016 20:26:03 +0000 (UTC) From: Andriy Voskoboinyk <avos@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r303344 - stable/11/sys/dev/urtwn Message-ID: <201607262026.u6QKQ3FF048649@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avos Date: Tue Jul 26 20:26:03 2016 New Revision: 303344 URL: https://svnweb.freebsd.org/changeset/base/303344 Log: MFC r303115: urtwn: fix A-MSDU tx aggregation when encryption is used. Clear unused (undocumented) CAM bytes while setting a key; without that, hardware does weird things when A-MSDU bit in QoS header is set. Tested with RTL8188CUS (AP) -> RTL8188EU (STA) (A-MSDU transmit). Reported by: many Approved by: re (gjb) Obtained from: https://github.com/s3erios/urtwm Modified: stable/11/sys/dev/urtwn/if_urtwn.c stable/11/sys/dev/urtwn/if_urtwnreg.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/urtwn/if_urtwn.c ============================================================================== --- stable/11/sys/dev/urtwn/if_urtwn.c Tue Jul 26 20:20:09 2016 (r303343) +++ stable/11/sys/dev/urtwn/if_urtwn.c Tue Jul 26 20:26:03 2016 (r303344) @@ -2318,6 +2318,10 @@ urtwn_key_set_cb(struct urtwn_softc *sc, k->wk_cipher->ic_cipher, algo, k->wk_flags, k->wk_keylen, ether_sprintf(k->wk_macaddr)); + /* Clear high bits. */ + urtwn_cam_write(sc, R92C_CAM_CTL6(k->wk_keyix), 0); + urtwn_cam_write(sc, R92C_CAM_CTL7(k->wk_keyix), 0); + /* Write key. */ for (i = 0; i < 4; i++) { error = urtwn_cam_write(sc, R92C_CAM_KEY(k->wk_keyix, i), Modified: stable/11/sys/dev/urtwn/if_urtwnreg.h ============================================================================== --- stable/11/sys/dev/urtwn/if_urtwnreg.h Tue Jul 26 20:20:09 2016 (r303343) +++ stable/11/sys/dev/urtwn/if_urtwnreg.h Tue Jul 26 20:26:03 2016 (r303344) @@ -871,6 +871,8 @@ #define R92C_CAM_CTL0(entry) ((entry) * 8 + 0) #define R92C_CAM_CTL1(entry) ((entry) * 8 + 1) #define R92C_CAM_KEY(entry, i) ((entry) * 8 + 2 + (i)) +#define R92C_CAM_CTL6(entry) ((entry) * 8 + 6) +#define R92C_CAM_CTL7(entry) ((entry) * 8 + 7) /* Bits for R92C_CAM_CTL0(i). */ #define R92C_CAM_KEYID_M 0x00000003
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607262026.u6QKQ3FF048649>