diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2010-03-28 18:53:13 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-03-31 14:39:18 -0400 |
commit | b15b3039919c7357c2851ec66843ff92f8ff86aa (patch) | |
tree | 882f3f5b094ecd8874e1697e09857d9ad030a055 /drivers/net/wireless/b43 | |
parent | d817f4e18cf54ae7d662cf2f33e51685e81ad254 (diff) |
b43: N-PHY: use b43_phy_n_sfo_cfg rather than duplicating same fields
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')
-rw-r--r-- | drivers/net/wireless/b43/phy_n.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/b43/tables_nphy.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/b43/tables_nphy.h | 15 |
3 files changed, 14 insertions, 19 deletions
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c index 05866675015..052119b84da 100644 --- a/drivers/net/wireless/b43/phy_n.c +++ b/drivers/net/wireless/b43/phy_n.c | |||
@@ -141,7 +141,7 @@ static void b43_chantab_radio_upload(struct b43_wldev *dev, | |||
141 | } | 141 | } |
142 | 142 | ||
143 | static void b43_chantab_phy_upload(struct b43_wldev *dev, | 143 | static void b43_chantab_phy_upload(struct b43_wldev *dev, |
144 | const struct b43_nphy_channeltab_entry *e) | 144 | const struct b43_phy_n_sfo_cfg *e) |
145 | { | 145 | { |
146 | b43_phy_write(dev, B43_NPHY_BW1A, e->phy_bw1a); | 146 | b43_phy_write(dev, B43_NPHY_BW1A, e->phy_bw1a); |
147 | b43_phy_write(dev, B43_NPHY_BW2, e->phy_bw2); | 147 | b43_phy_write(dev, B43_NPHY_BW2, e->phy_bw2); |
@@ -3270,7 +3270,7 @@ int b43_phy_initn(struct b43_wldev *dev) | |||
3270 | 3270 | ||
3271 | /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/ChanspecSetup */ | 3271 | /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/ChanspecSetup */ |
3272 | static void b43_nphy_chanspec_setup(struct b43_wldev *dev, | 3272 | static void b43_nphy_chanspec_setup(struct b43_wldev *dev, |
3273 | const struct b43_nphy_channeltab_entry *e, | 3273 | const struct b43_phy_n_sfo_cfg *e, |
3274 | struct b43_chanspec chanspec) | 3274 | struct b43_chanspec chanspec) |
3275 | { | 3275 | { |
3276 | struct b43_phy *phy = &dev->phy; | 3276 | struct b43_phy *phy = &dev->phy; |
@@ -3373,7 +3373,7 @@ static int b43_nphy_set_chanspec(struct b43_wldev *dev, | |||
3373 | tmp = (chanspec.b_freq == 1) ? 0x0020 : 0x0050; | 3373 | tmp = (chanspec.b_freq == 1) ? 0x0020 : 0x0050; |
3374 | b43_radio_maskset(dev, B2055_MASTER1, 0xFF8F, tmp); | 3374 | b43_radio_maskset(dev, B2055_MASTER1, 0xFF8F, tmp); |
3375 | b43_radio_2055_setup(dev, tabent); | 3375 | b43_radio_2055_setup(dev, tabent); |
3376 | b43_nphy_chanspec_setup(dev, tabent, chanspec); | 3376 | b43_nphy_chanspec_setup(dev, &(tabent->phy_regs), chanspec); |
3377 | } | 3377 | } |
3378 | 3378 | ||
3379 | return 0; | 3379 | return 0; |
diff --git a/drivers/net/wireless/b43/tables_nphy.c b/drivers/net/wireless/b43/tables_nphy.c index a00d509150f..237426d64ad 100644 --- a/drivers/net/wireless/b43/tables_nphy.c +++ b/drivers/net/wireless/b43/tables_nphy.c | |||
@@ -318,12 +318,12 @@ void b2055_upload_inittab(struct b43_wldev *dev, | |||
318 | .radio_c2_tx_mxbgtrim = r21 | 318 | .radio_c2_tx_mxbgtrim = r21 |
319 | 319 | ||
320 | #define PHYREGS(r0, r1, r2, r3, r4, r5) \ | 320 | #define PHYREGS(r0, r1, r2, r3, r4, r5) \ |
321 | .phy_bw1a = r0, \ | 321 | .phy_regs.phy_bw1a = r0, \ |
322 | .phy_bw2 = r1, \ | 322 | .phy_regs.phy_bw2 = r1, \ |
323 | .phy_bw3 = r2, \ | 323 | .phy_regs.phy_bw3 = r2, \ |
324 | .phy_bw4 = r3, \ | 324 | .phy_regs.phy_bw4 = r3, \ |
325 | .phy_bw5 = r4, \ | 325 | .phy_regs.phy_bw5 = r4, \ |
326 | .phy_bw6 = r5 | 326 | .phy_regs.phy_bw6 = r5 |
327 | 327 | ||
328 | static const struct b43_nphy_channeltab_entry b43_nphy_channeltab[] = { | 328 | static const struct b43_nphy_channeltab_entry b43_nphy_channeltab[] = { |
329 | { .channel = 184, | 329 | { .channel = 184, |
diff --git a/drivers/net/wireless/b43/tables_nphy.h b/drivers/net/wireless/b43/tables_nphy.h index b23036f7dc1..84dea356d85 100644 --- a/drivers/net/wireless/b43/tables_nphy.h +++ b/drivers/net/wireless/b43/tables_nphy.h | |||
@@ -16,6 +16,10 @@ struct b43_phy_n_sfo_cfg { | |||
16 | struct b43_nphy_channeltab_entry { | 16 | struct b43_nphy_channeltab_entry { |
17 | /* The channel number */ | 17 | /* The channel number */ |
18 | u8 channel; | 18 | u8 channel; |
19 | /* The channel frequency in MHz */ | ||
20 | u16 freq; | ||
21 | /* An unknown value */ | ||
22 | u16 unk2; | ||
19 | /* Radio register values on channelswitch */ | 23 | /* Radio register values on channelswitch */ |
20 | u8 radio_pll_ref; | 24 | u8 radio_pll_ref; |
21 | u8 radio_rf_pllmod0; | 25 | u8 radio_rf_pllmod0; |
@@ -40,16 +44,7 @@ struct b43_nphy_channeltab_entry { | |||
40 | u8 radio_c2_tx_pgapadtn; | 44 | u8 radio_c2_tx_pgapadtn; |
41 | u8 radio_c2_tx_mxbgtrim; | 45 | u8 radio_c2_tx_mxbgtrim; |
42 | /* PHY register values on channelswitch */ | 46 | /* PHY register values on channelswitch */ |
43 | u16 phy_bw1a; | 47 | struct b43_phy_n_sfo_cfg phy_regs; |
44 | u16 phy_bw2; | ||
45 | u16 phy_bw3; | ||
46 | u16 phy_bw4; | ||
47 | u16 phy_bw5; | ||
48 | u16 phy_bw6; | ||
49 | /* The channel frequency in MHz */ | ||
50 | u16 freq; | ||
51 | /* An unknown value */ | ||
52 | u16 unk2; | ||
53 | }; | 48 | }; |
54 | 49 | ||
55 | 50 | ||