aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2008-04-20 10:23:26 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-05-07 15:02:12 -0400
commitf4440e8a47e216adfe32d96a35bef6d13d498b58 (patch)
treeb214899cd8e4e42b59ac07982403f07e8cfff1b7 /drivers
parentf5eda47f45e90dfa38e25d569b9ac84ba94f8301 (diff)
b43: Remove some dead code
This patch removes some dead code from the driver. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/b43/lo.c6
-rw-r--r--drivers/net/wireless/b43/phy.c121
2 files changed, 2 insertions, 125 deletions
diff --git a/drivers/net/wireless/b43/lo.c b/drivers/net/wireless/b43/lo.c
index 4edee6da2b8b..4ce1e3561205 100644
--- a/drivers/net/wireless/b43/lo.c
+++ b/drivers/net/wireless/b43/lo.c
@@ -58,7 +58,6 @@ static void b43_lo_write(struct b43_wldev *dev, struct b43_loctl *control)
58{ 58{
59 struct b43_phy *phy = &dev->phy; 59 struct b43_phy *phy = &dev->phy;
60 u16 value; 60 u16 value;
61 u16 reg;
62 61
63 if (B43_DEBUG) { 62 if (B43_DEBUG) {
64 if (unlikely(abs(control->i) > 16 || abs(control->q) > 16)) { 63 if (unlikely(abs(control->i) > 16 || abs(control->q) > 16)) {
@@ -68,12 +67,11 @@ static void b43_lo_write(struct b43_wldev *dev, struct b43_loctl *control)
68 return; 67 return;
69 } 68 }
70 } 69 }
70 B43_WARN_ON(phy->type != B43_PHYTYPE_G);
71 71
72 value = (u8) (control->q); 72 value = (u8) (control->q);
73 value |= ((u8) (control->i)) << 8; 73 value |= ((u8) (control->i)) << 8;
74 74 b43_phy_write(dev, B43_PHY_LO_CTL, value);
75 reg = (phy->type == B43_PHYTYPE_B) ? 0x002F : B43_PHY_LO_CTL;
76 b43_phy_write(dev, reg, value);
77} 75}
78 76
79static u16 lo_measure_feedthrough(struct b43_wldev *dev, 77static u16 lo_measure_feedthrough(struct b43_wldev *dev,
diff --git a/drivers/net/wireless/b43/phy.c b/drivers/net/wireless/b43/phy.c
index fd1f301748c2..8b3c24da8db9 100644
--- a/drivers/net/wireless/b43/phy.c
+++ b/drivers/net/wireless/b43/phy.c
@@ -890,109 +890,6 @@ static void b43_phy_inita(struct b43_wldev *dev)
890 } 890 }
891} 891}
892 892
893static void b43_phy_initb2(struct b43_wldev *dev)
894{
895 struct b43_phy *phy = &dev->phy;
896 u16 offset, val;
897
898 b43_write16(dev, 0x03EC, 0x3F22);
899 b43_phy_write(dev, 0x0020, 0x301C);
900 b43_phy_write(dev, 0x0026, 0x0000);
901 b43_phy_write(dev, 0x0030, 0x00C6);
902 b43_phy_write(dev, 0x0088, 0x3E00);
903 val = 0x3C3D;
904 for (offset = 0x0089; offset < 0x00A7; offset++) {
905 b43_phy_write(dev, offset, val);
906 val -= 0x0202;
907 }
908 b43_phy_write(dev, 0x03E4, 0x3000);
909 b43_radio_selectchannel(dev, phy->channel, 0);
910 if (phy->radio_ver != 0x2050) {
911 b43_radio_write16(dev, 0x0075, 0x0080);
912 b43_radio_write16(dev, 0x0079, 0x0081);
913 }
914 b43_radio_write16(dev, 0x0050, 0x0020);
915 b43_radio_write16(dev, 0x0050, 0x0023);
916 if (phy->radio_ver == 0x2050) {
917 b43_radio_write16(dev, 0x0050, 0x0020);
918 b43_radio_write16(dev, 0x005A, 0x0070);
919 b43_radio_write16(dev, 0x005B, 0x007B);
920 b43_radio_write16(dev, 0x005C, 0x00B0);
921 b43_radio_write16(dev, 0x007A, 0x000F);
922 b43_phy_write(dev, 0x0038, 0x0677);
923 b43_radio_init2050(dev);
924 }
925 b43_phy_write(dev, 0x0014, 0x0080);
926 b43_phy_write(dev, 0x0032, 0x00CA);
927 b43_phy_write(dev, 0x0032, 0x00CC);
928 b43_phy_write(dev, 0x0035, 0x07C2);
929//XXX won't trigger b43_lo_b_measure(dev);
930 b43_phy_write(dev, 0x0026, 0xCC00);
931 if (phy->radio_ver != 0x2050)
932 b43_phy_write(dev, 0x0026, 0xCE00);
933 b43_write16(dev, B43_MMIO_CHANNEL_EXT, 0x1000);
934 b43_phy_write(dev, 0x002A, 0x88A3);
935 if (phy->radio_ver != 0x2050)
936 b43_phy_write(dev, 0x002A, 0x88C2);
937 b43_set_txpower_g(dev, &phy->bbatt, &phy->rfatt, phy->tx_control);
938 b43_phy_init_pctl(dev);
939}
940
941static void b43_phy_initb4(struct b43_wldev *dev)
942{
943 struct b43_phy *phy = &dev->phy;
944 u16 offset, val;
945
946 b43_write16(dev, 0x03EC, 0x3F22);
947 b43_phy_write(dev, 0x0020, 0x301C);
948 b43_phy_write(dev, 0x0026, 0x0000);
949 b43_phy_write(dev, 0x0030, 0x00C6);
950 b43_phy_write(dev, 0x0088, 0x3E00);
951 val = 0x3C3D;
952 for (offset = 0x0089; offset < 0x00A7; offset++) {
953 b43_phy_write(dev, offset, val);
954 val -= 0x0202;
955 }
956 b43_phy_write(dev, 0x03E4, 0x3000);
957 b43_radio_selectchannel(dev, phy->channel, 0);
958 if (phy->radio_ver != 0x2050) {
959 b43_radio_write16(dev, 0x0075, 0x0080);
960 b43_radio_write16(dev, 0x0079, 0x0081);
961 }
962 b43_radio_write16(dev, 0x0050, 0x0020);
963 b43_radio_write16(dev, 0x0050, 0x0023);
964 if (phy->radio_ver == 0x2050) {
965 b43_radio_write16(dev, 0x0050, 0x0020);
966 b43_radio_write16(dev, 0x005A, 0x0070);
967 b43_radio_write16(dev, 0x005B, 0x007B);
968 b43_radio_write16(dev, 0x005C, 0x00B0);
969 b43_radio_write16(dev, 0x007A, 0x000F);
970 b43_phy_write(dev, 0x0038, 0x0677);
971 b43_radio_init2050(dev);
972 }
973 b43_phy_write(dev, 0x0014, 0x0080);
974 b43_phy_write(dev, 0x0032, 0x00CA);
975 if (phy->radio_ver == 0x2050)
976 b43_phy_write(dev, 0x0032, 0x00E0);
977 b43_phy_write(dev, 0x0035, 0x07C2);
978
979//XXX won't trigger b43_lo_b_measure(dev);
980
981 b43_phy_write(dev, 0x0026, 0xCC00);
982 if (phy->radio_ver == 0x2050)
983 b43_phy_write(dev, 0x0026, 0xCE00);
984 b43_write16(dev, B43_MMIO_CHANNEL_EXT, 0x1100);
985 b43_phy_write(dev, 0x002A, 0x88A3);
986 if (phy->radio_ver == 0x2050)
987 b43_phy_write(dev, 0x002A, 0x88C2);
988 b43_set_txpower_g(dev, &phy->bbatt, &phy->rfatt, phy->tx_control);
989 if (dev->dev->bus->sprom.boardflags_lo & B43_BFL_RSSI) {
990 b43_calc_nrssi_slope(dev);
991 b43_calc_nrssi_threshold(dev);
992 }
993 b43_phy_init_pctl(dev);
994}
995
996static void b43_phy_initb5(struct b43_wldev *dev) 893static void b43_phy_initb5(struct b43_wldev *dev)
997{ 894{
998 struct ssb_bus *bus = dev->dev->bus; 895 struct ssb_bus *bus = dev->dev->bus;
@@ -1950,24 +1847,6 @@ int b43_phy_init(struct b43_wldev *dev)
1950 else 1847 else
1951 unsupported = 1; 1848 unsupported = 1;
1952 break; 1849 break;
1953 case B43_PHYTYPE_B:
1954 switch (phy->rev) {
1955 case 2:
1956 b43_phy_initb2(dev);
1957 break;
1958 case 4:
1959 b43_phy_initb4(dev);
1960 break;
1961 case 5:
1962 b43_phy_initb5(dev);
1963 break;
1964 case 6:
1965 b43_phy_initb6(dev);
1966 break;
1967 default:
1968 unsupported = 1;
1969 }
1970 break;
1971 case B43_PHYTYPE_G: 1850 case B43_PHYTYPE_G:
1972 b43_phy_initg(dev); 1851 b43_phy_initg(dev);
1973 break; 1852 break;