Date: Tue, 3 May 2016 03:31:16 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r298954 - head/sys/dev/bwn Message-ID: <201605030331.u433VGqP061746@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Tue May 3 03:31:16 2016 New Revision: 298954 URL: https://svnweb.freebsd.org/changeset/base/298954 Log: [bwn] update bwn_dummy_transmission(). This is based on the b43 code. It'll be used by the upcoming 11n phy. Obtained from: Linux b43 (concept) Modified: head/sys/dev/bwn/if_bwn.c Modified: head/sys/dev/bwn/if_bwn.c ============================================================================== --- head/sys/dev/bwn/if_bwn.c Tue May 3 03:27:11 2016 (r298953) +++ head/sys/dev/bwn/if_bwn.c Tue May 3 03:31:16 2016 (r298954) @@ -3540,9 +3540,12 @@ bwn_dummy_transmission(struct bwn_mac *m BWN_WRITE_2(mac, 0x0568, 0x0000); BWN_WRITE_2(mac, 0x07c0, (siba_get_revid(sc->sc_dev) < 11) ? 0x0000 : 0x0100); - value = ((phy->type == BWN_PHYTYPE_A) ? 0x41 : 0x40); + + value = (ofdm ? 0x41 : 0x40); BWN_WRITE_2(mac, 0x050c, value); - if (phy->type == BWN_PHYTYPE_LP) + + if (phy->type == BWN_PHYTYPE_N || phy->type == BWN_PHYTYPE_LP || + phy->type == BWN_PHYTYPE_LCN) BWN_WRITE_2(mac, 0x0514, 0x1a02); BWN_WRITE_2(mac, 0x0508, 0x0000); BWN_WRITE_2(mac, 0x050a, 0x0000); @@ -3550,10 +3553,24 @@ bwn_dummy_transmission(struct bwn_mac *m BWN_WRITE_2(mac, 0x056a, 0x0014); BWN_WRITE_2(mac, 0x0568, 0x0826); BWN_WRITE_2(mac, 0x0500, 0x0000); - if (phy->type == BWN_PHYTYPE_LP) + + /* XXX TODO: n phy pa override? */ + + switch (phy->type) { + case BWN_PHYTYPE_N: + case BWN_PHYTYPE_LCN: + BWN_WRITE_2(mac, 0x0502, 0x00d0); + break; + case BWN_PHYTYPE_LP: BWN_WRITE_2(mac, 0x0502, 0x0050); - else + break; + default: BWN_WRITE_2(mac, 0x0502, 0x0030); + break; + } + + /* flush */ + BWN_READ_2(mac, 0x0502); if (phy->rf_ver == 0x2050 && phy->rf_rev <= 0x5) BWN_RF_WRITE(mac, 0x0051, 0x0017);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605030331.u433VGqP061746>