summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/b43/phy_ht.c
AgeCommit message (Collapse)Author
2011-07-19b43: HT-PHY: fix masks in radio ctlRafał Miłecki
Old masks were causing ugly, delayed lock ups. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-19b43: HT-PHY: fix typo in 0x2059 radio initRafał Miłecki
Following operation was incorrectly translated: radio_read(0x0011) -> 0xffff radio_write(0x0011) <- 0xfff7 Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-19b43: HT-PHY: switch to channel after enabling radioRafał Miłecki
Also change the default channel to 11. This is the first channel closed driver switches to. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-08b43: HT-PHY: define dummy TX power functionsRafał Miłecki
Without them we get Oops with NULL pointer Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29b43: HT-PHY: correct 0x2059 radio initRafał Miłecki
Sometimes additional steps are performed while initializing 2059 radio. We did not find the condition yet, so make it always true for now. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29b43: HT-PHY: basic PHY initRafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29b43: HT-PHY: init radio when enabling itRafał Miłecki
Masks and sets were found in MMIO dumps by using MMIO hacks. Shortly: radio_write(0x0c51) <- 0x0070 radio_write(0x0c5a) <- 0x0003 radio_write(0x0146) <- 0x0003 radio_write(0x0546) <- 0x0003 radio_write(0x0946) <- 0x0003 radio_write(0x002e) <- 0x0078 radio_write(0x00c0) <- 0x0080 radio_write(0x002e) <- 0xff87 radio_write(0x00c0) <- 0xff7f radio_write(0x0011) <- 0xfff7 Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29b43: HT-PHY: replace radio routing magic numbersRafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29b43: HT-PHY: implement lacking 0x908 PHY reg opRafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29b43: HT-PHY: perform some tables ops on channel switchingRafał Miłecki
Starring at MMIO dumps around PHY channel switching has led to finding serie of 3 similar ops this patch implements. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-29b43: HT-PHY: upload PHY values when switching channelRafał Miłecki
After calibrating radio you can find few PHY writes in MMIO dumps: phy_read(0x0009) -> 0x0000 phy_write(0x01ce) <- 0x03dd phy_write(0x01cf) <- 0x03d9 phy_write(0x01d0) <- 0x03d5 phy_write(0x01d1) <- 0x0424 phy_write(0x01d2) <- 0x0429 phy_write(0x01d3) <- 0x042d By comparing to N-PHY code we found out that they are PHY tables for channel switching plus band info read at the beginning. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-22b43: HT-PHY: calibrate radio after switching channelRafał Miłecki
After uploading radio values calibration goes in. In MMIO dump it is: radio_read(0x002b) -> 0x0008 radio_write(0x002b) <- 0x0008 radio_read(0x002e) -> 0x0004 radio_write(0x002e) <- 0x0000 radio_read(0x002e) -> 0x0000 radio_write(0x002e) <- 0x0004 radio_read(0x002b) -> 0x0008 radio_write(0x002b) <- 0x0009 To find masks and sets, MMIO hacks were used to fool closed driver. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-22b43: HT-PHY: switch radio to requested channelRafał Miłecki
Switching channel happens after specific SHM write to B43_SHM_SH_CHAN. This is the way we found it in BCM4331 MMIO dumps. By comparing with N-PHY code we noticed there is routing used for SYN and TX/RX. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-22b43: HT-PHY: add place for implementing channel switchingRafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-22b43: HT-PHY: define standard structs for channel switchingRafał Miłecki
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-22b43: HT-PHY: enable radioRafał Miłecki
The trick was to find 0x810 PHY reg ops close to analog enabling code. To find out proper masks and sets, MMIO hacks were used. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-22b43: HT-PHY: implement killing radioRafał Miłecki
Closed drivers kill radio right after reading radio version and MACCTL, so it was easy to find related PHY ops: phy_read(0x0810) -> 0x0000 phy_write(0x0810) <- 0x0000 To find out the mask of above OP, MMIO hack was used to fake read val: phy_read(0x0810) -> 0xffff phy_write(0x0810) <- 0x0000 Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-17b43: HT-PHY: implement switching analogRafał Miłecki
Turning it on is always done between reading PHY version and radio version, so it was easy to find it in MMIO dumps from ndiswrapper. Turning off is done by writing different values to the same registers. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-17b43: HT-PHY: implement radio opsRafał Miłecki
Every PHY has some specific bit used for reading radio regs. Analyze of MMIO dumps from BCM4331 and ndiswrapper has shown it is 0x200 for HT. radio_read(0x037f) -> 0x0073 radio_write(0x017f) <- 0x0072 Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-17b43: HT-PHY: add place for writing HT PHY supportRafał Miłecki
This is totally broken plus we do not have specs for HT PHY yet. Just introduce place for writing driver if we discover anything. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>