aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/phy_n.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2010-01-15 07:40:58 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-01-15 17:05:34 -0500
commit4cb9977516d0f52a779d12a430ccf263d35802fc (patch)
treef1b120b0be97e7261fbd049d2ebb0ecf712f4409 /drivers/net/wireless/b43/phy_n.c
parent4a933c8566da3e2b164ea74b1632bf2f43c8ee9b (diff)
b43: N-PHY: split RSSI calibration into 2 functions (rev2, rev3)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/phy_n.c')
-rw-r--r--drivers/net/wireless/b43/phy_n.c31
1 files changed, 26 insertions, 5 deletions
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index c9d2b7738aef..30b9dacb666c 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -429,10 +429,31 @@ static void b43_nphy_bphy_init(struct b43_wldev *dev)
429 b43_phy_write(dev, B43_PHY_N_BMODE(0x38), 0x668); 429 b43_phy_write(dev, B43_PHY_N_BMODE(0x38), 0x668);
430} 430}
431 431
432/* RSSI Calibration */ 432/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RSSICal */
433static void b43_nphy_rssi_cal(struct b43_wldev *dev, u8 type) 433static void b43_nphy_rev2_rssi_cal(struct b43_wldev *dev, u8 type)
434{ 434{
435 //TODO 435 /* TODO */
436}
437
438/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RSSICalRev3 */
439static void b43_nphy_rev3_rssi_cal(struct b43_wldev *dev)
440{
441 /* TODO */
442}
443
444/*
445 * RSSI Calibration
446 * http://bcm-v4.sipsolutions.net/802.11/PHY/N/RSSICal
447 */
448static void b43_nphy_rssi_cal(struct b43_wldev *dev)
449{
450 if (dev->phy.rev >= 3) {
451 b43_nphy_rev3_rssi_cal(dev);
452 } else {
453 b43_nphy_rev2_rssi_cal(dev, 2);
454 b43_nphy_rev2_rssi_cal(dev, 0);
455 b43_nphy_rev2_rssi_cal(dev, 1);
456 }
436} 457}
437 458
438/* 459/*
@@ -571,11 +592,11 @@ int b43_phy_initn(struct b43_wldev *dev)
571 do_rssi_cal = (nphy->rssical_chanspec_5G == 0); 592 do_rssi_cal = (nphy->rssical_chanspec_5G == 0);
572 593
573 if (do_rssi_cal) 594 if (do_rssi_cal)
574 ;/* b43_nphy_rssi_cal(dev); */ 595 b43_nphy_rssi_cal(dev);
575 else 596 else
576 ;/* b43_nphy_restore_rssi_cal(dev); */ 597 ;/* b43_nphy_restore_rssi_cal(dev); */
577 } else { 598 } else {
578 /* b43_nphy_rssi_cal(dev); */ 599 b43_nphy_rssi_cal(dev);
579 } 600 }
580 601
581 if (!((nphy->measure_hold & 0x6) != 0)) { 602 if (!((nphy->measure_hold & 0x6) != 0)) {