diff options
Diffstat (limited to 'drivers/staging/brcm80211/brcmsmac')
-rw-r--r-- | drivers/staging/brcm80211/brcmsmac/bmac.c | 2 | ||||
-rw-r--r-- | drivers/staging/brcm80211/brcmsmac/main.h | 4 | ||||
-rw-r--r-- | drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c | 170 | ||||
-rw-r--r-- | drivers/staging/brcm80211/brcmsmac/phy/phy_hal.h | 155 | ||||
-rw-r--r-- | drivers/staging/brcm80211/brcmsmac/phy/phy_int.h | 21 | ||||
-rw-r--r-- | drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c | 21 | ||||
-rw-r--r-- | drivers/staging/brcm80211/brcmsmac/phy/phy_n.c | 49 | ||||
-rw-r--r-- | drivers/staging/brcm80211/brcmsmac/stf.c | 2 | ||||
-rw-r--r-- | drivers/staging/brcm80211/brcmsmac/types.h | 1 |
9 files changed, 223 insertions, 202 deletions
diff --git a/drivers/staging/brcm80211/brcmsmac/bmac.c b/drivers/staging/brcm80211/brcmsmac/bmac.c index b506d1692e0..b0446d8f91f 100644 --- a/drivers/staging/brcm80211/brcmsmac/bmac.c +++ b/drivers/staging/brcm80211/brcmsmac/bmac.c | |||
@@ -1796,7 +1796,7 @@ void brcms_b_macphyclk_set(struct brcms_c_hw_info *wlc_hw, bool clk) | |||
1796 | 1796 | ||
1797 | void brcms_b_phy_reset(struct brcms_c_hw_info *wlc_hw) | 1797 | void brcms_b_phy_reset(struct brcms_c_hw_info *wlc_hw) |
1798 | { | 1798 | { |
1799 | wlc_phy_t *pih = wlc_hw->band->pi; | 1799 | struct brcms_phy_pub *pih = wlc_hw->band->pi; |
1800 | u32 phy_bw_clkbits; | 1800 | u32 phy_bw_clkbits; |
1801 | bool phy_in_reset = false; | 1801 | bool phy_in_reset = false; |
1802 | 1802 | ||
diff --git a/drivers/staging/brcm80211/brcmsmac/main.h b/drivers/staging/brcm80211/brcmsmac/main.h index 1501a4b77be..6b8b4d2c53f 100644 --- a/drivers/staging/brcm80211/brcmsmac/main.h +++ b/drivers/staging/brcm80211/brcmsmac/main.h | |||
@@ -369,7 +369,7 @@ struct brcms_c_band { | |||
369 | u16 phyrev; | 369 | u16 phyrev; |
370 | u16 radioid; | 370 | u16 radioid; |
371 | u16 radiorev; | 371 | u16 radiorev; |
372 | wlc_phy_t *pi; /* pointer to phy specific information */ | 372 | struct brcms_phy_pub *pi; /* pointer to phy specific information */ |
373 | bool abgphy_encore; | 373 | bool abgphy_encore; |
374 | 374 | ||
375 | u8 gmode; /* currently active gmode */ | 375 | u8 gmode; /* currently active gmode */ |
@@ -475,7 +475,7 @@ struct brcms_c_hwband { | |||
475 | u16 phyrev; | 475 | u16 phyrev; |
476 | u16 radioid; | 476 | u16 radioid; |
477 | u16 radiorev; | 477 | u16 radiorev; |
478 | wlc_phy_t *pi; /* pointer to phy specific information */ | 478 | struct brcms_phy_pub *pi; /* pointer to phy specific information */ |
479 | bool abgphy_encore; | 479 | bool abgphy_encore; |
480 | }; | 480 | }; |
481 | 481 | ||
diff --git a/drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c b/drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c index 7c8bf178465..43a1dc55100 100644 --- a/drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c +++ b/drivers/staging/brcm80211/brcmsmac/phy/phy_cmn.c | |||
@@ -132,7 +132,7 @@ static void wlc_phy_cal_perical_mphase_schedule(struct brcms_phy *pi, | |||
132 | uint delay); | 132 | uint delay); |
133 | 133 | ||
134 | static void wlc_phy_noise_cb(struct brcms_phy *pi, u8 channel, s8 noise_dbm); | 134 | static void wlc_phy_noise_cb(struct brcms_phy *pi, u8 channel, s8 noise_dbm); |
135 | static void wlc_phy_noise_sample_request(wlc_phy_t *pih, u8 reason, | 135 | static void wlc_phy_noise_sample_request(struct brcms_phy_pub *pih, u8 reason, |
136 | u8 ch); | 136 | u8 ch); |
137 | 137 | ||
138 | static void wlc_phy_txpower_reg_limit_calc(struct brcms_phy *pi, | 138 | static void wlc_phy_txpower_reg_limit_calc(struct brcms_phy *pi, |
@@ -180,19 +180,19 @@ int phy_getintvar(struct brcms_phy *pi, const char *name) | |||
180 | return simple_strtoul(val, NULL, 0); | 180 | return simple_strtoul(val, NULL, 0); |
181 | } | 181 | } |
182 | 182 | ||
183 | void wlc_phyreg_enter(wlc_phy_t *pih) | 183 | void wlc_phyreg_enter(struct brcms_phy_pub *pih) |
184 | { | 184 | { |
185 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 185 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
186 | wlapi_bmac_ucode_wake_override_phyreg_set(pi->sh->physhim); | 186 | wlapi_bmac_ucode_wake_override_phyreg_set(pi->sh->physhim); |
187 | } | 187 | } |
188 | 188 | ||
189 | void wlc_phyreg_exit(wlc_phy_t *pih) | 189 | void wlc_phyreg_exit(struct brcms_phy_pub *pih) |
190 | { | 190 | { |
191 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 191 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
192 | wlapi_bmac_ucode_wake_override_phyreg_clear(pi->sh->physhim); | 192 | wlapi_bmac_ucode_wake_override_phyreg_clear(pi->sh->physhim); |
193 | } | 193 | } |
194 | 194 | ||
195 | void wlc_radioreg_enter(wlc_phy_t *pih) | 195 | void wlc_radioreg_enter(struct brcms_phy_pub *pih) |
196 | { | 196 | { |
197 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 197 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
198 | wlapi_bmac_mctrl(pi->sh->physhim, MCTL_LOCK_RADIO, MCTL_LOCK_RADIO); | 198 | wlapi_bmac_mctrl(pi->sh->physhim, MCTL_LOCK_RADIO, MCTL_LOCK_RADIO); |
@@ -200,7 +200,7 @@ void wlc_radioreg_enter(wlc_phy_t *pih) | |||
200 | udelay(10); | 200 | udelay(10); |
201 | } | 201 | } |
202 | 202 | ||
203 | void wlc_radioreg_exit(wlc_phy_t *pih) | 203 | void wlc_radioreg_exit(struct brcms_phy_pub *pih) |
204 | { | 204 | { |
205 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 205 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
206 | volatile u16 dummy; | 206 | volatile u16 dummy; |
@@ -507,8 +507,9 @@ struct shared_phy *wlc_phy_shared_attach(struct shared_phy_params *shp) | |||
507 | return sh; | 507 | return sh; |
508 | } | 508 | } |
509 | 509 | ||
510 | wlc_phy_t *wlc_phy_attach(struct shared_phy *sh, void *regs, int bandtype, | 510 | struct brcms_phy_pub * |
511 | char *vars, struct wiphy *wiphy) | 511 | wlc_phy_attach(struct shared_phy *sh, void *regs, int bandtype, |
512 | char *vars, struct wiphy *wiphy) | ||
512 | { | 513 | { |
513 | struct brcms_phy *pi; | 514 | struct brcms_phy *pi; |
514 | u32 sflags = 0; | 515 | u32 sflags = 0; |
@@ -584,7 +585,7 @@ wlc_phy_t *wlc_phy_attach(struct shared_phy *sh, void *regs, int bandtype, | |||
584 | } | 585 | } |
585 | } | 586 | } |
586 | 587 | ||
587 | wlc_phy_anacore((wlc_phy_t *) pi, ON); | 588 | wlc_phy_anacore((struct brcms_phy_pub *) pi, ON); |
588 | 589 | ||
589 | idcode = wlc_phy_get_radio_ver(pi); | 590 | idcode = wlc_phy_get_radio_ver(pi); |
590 | pi->pubpi.radioid = | 591 | pi->pubpi.radioid = |
@@ -596,7 +597,7 @@ wlc_phy_t *wlc_phy_attach(struct shared_phy *sh, void *regs, int bandtype, | |||
596 | if (!VALID_RADIO(pi, pi->pubpi.radioid)) | 597 | if (!VALID_RADIO(pi, pi->pubpi.radioid)) |
597 | goto err; | 598 | goto err; |
598 | 599 | ||
599 | wlc_phy_switch_radio((wlc_phy_t *) pi, OFF); | 600 | wlc_phy_switch_radio((struct brcms_phy_pub *) pi, OFF); |
600 | 601 | ||
601 | wlc_set_phy_uninitted(pi); | 602 | wlc_set_phy_uninitted(pi); |
602 | 603 | ||
@@ -670,7 +671,7 @@ wlc_phy_t *wlc_phy_attach(struct shared_phy *sh, void *regs, int bandtype, | |||
670 | 671 | ||
671 | pi->vars = (char *)&pi->vars; | 672 | pi->vars = (char *)&pi->vars; |
672 | 673 | ||
673 | memcpy(&pi->pubpi_ro, &pi->pubpi, sizeof(wlc_phy_t)); | 674 | memcpy(&pi->pubpi_ro, &pi->pubpi, sizeof(struct brcms_phy_pub)); |
674 | 675 | ||
675 | return &pi->pubpi_ro; | 676 | return &pi->pubpi_ro; |
676 | 677 | ||
@@ -679,7 +680,7 @@ wlc_phy_t *wlc_phy_attach(struct shared_phy *sh, void *regs, int bandtype, | |||
679 | return NULL; | 680 | return NULL; |
680 | } | 681 | } |
681 | 682 | ||
682 | void wlc_phy_detach(wlc_phy_t *pih) | 683 | void wlc_phy_detach(struct brcms_phy_pub *pih) |
683 | { | 684 | { |
684 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 685 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
685 | 686 | ||
@@ -706,7 +707,7 @@ void wlc_phy_detach(wlc_phy_t *pih) | |||
706 | } | 707 | } |
707 | 708 | ||
708 | bool | 709 | bool |
709 | wlc_phy_get_phyversion(wlc_phy_t *pih, u16 *phytype, u16 *phyrev, | 710 | wlc_phy_get_phyversion(struct brcms_phy_pub *pih, u16 *phytype, u16 *phyrev, |
710 | u16 *radioid, u16 *radiover) | 711 | u16 *radioid, u16 *radiover) |
711 | { | 712 | { |
712 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 713 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
@@ -718,13 +719,13 @@ wlc_phy_get_phyversion(wlc_phy_t *pih, u16 *phytype, u16 *phyrev, | |||
718 | return true; | 719 | return true; |
719 | } | 720 | } |
720 | 721 | ||
721 | bool wlc_phy_get_encore(wlc_phy_t *pih) | 722 | bool wlc_phy_get_encore(struct brcms_phy_pub *pih) |
722 | { | 723 | { |
723 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 724 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
724 | return pi->pubpi.abgphy_encore; | 725 | return pi->pubpi.abgphy_encore; |
725 | } | 726 | } |
726 | 727 | ||
727 | u32 wlc_phy_get_coreflags(wlc_phy_t *pih) | 728 | u32 wlc_phy_get_coreflags(struct brcms_phy_pub *pih) |
728 | { | 729 | { |
729 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 730 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
730 | return pi->pubpi.coreflags; | 731 | return pi->pubpi.coreflags; |
@@ -753,7 +754,7 @@ static void wlc_phy_timercb_phycal(void *arg) | |||
753 | 754 | ||
754 | } | 755 | } |
755 | 756 | ||
756 | void wlc_phy_anacore(wlc_phy_t *pih, bool on) | 757 | void wlc_phy_anacore(struct brcms_phy_pub *pih, bool on) |
757 | { | 758 | { |
758 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 759 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
759 | 760 | ||
@@ -790,7 +791,7 @@ void wlc_phy_anacore(wlc_phy_t *pih, bool on) | |||
790 | } | 791 | } |
791 | } | 792 | } |
792 | 793 | ||
793 | u32 wlc_phy_clk_bwbits(wlc_phy_t *pih) | 794 | u32 wlc_phy_clk_bwbits(struct brcms_phy_pub *pih) |
794 | { | 795 | { |
795 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 796 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
796 | 797 | ||
@@ -815,14 +816,14 @@ u32 wlc_phy_clk_bwbits(wlc_phy_t *pih) | |||
815 | return phy_bw_clkbits; | 816 | return phy_bw_clkbits; |
816 | } | 817 | } |
817 | 818 | ||
818 | void WLBANDINITFN(wlc_phy_por_inform) (wlc_phy_t *ppi) | 819 | void WLBANDINITFN(wlc_phy_por_inform) (struct brcms_phy_pub *ppi) |
819 | { | 820 | { |
820 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 821 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
821 | 822 | ||
822 | pi->phy_init_por = true; | 823 | pi->phy_init_por = true; |
823 | } | 824 | } |
824 | 825 | ||
825 | void wlc_phy_edcrs_lock(wlc_phy_t *pih, bool lock) | 826 | void wlc_phy_edcrs_lock(struct brcms_phy_pub *pih, bool lock) |
826 | { | 827 | { |
827 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 828 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
828 | 829 | ||
@@ -834,14 +835,14 @@ void wlc_phy_edcrs_lock(wlc_phy_t *pih, bool lock) | |||
834 | write_phy_reg(pi, 0x22f, 0x3c0); | 835 | write_phy_reg(pi, 0x22f, 0x3c0); |
835 | } | 836 | } |
836 | 837 | ||
837 | void wlc_phy_initcal_enable(wlc_phy_t *pih, bool initcal) | 838 | void wlc_phy_initcal_enable(struct brcms_phy_pub *pih, bool initcal) |
838 | { | 839 | { |
839 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 840 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
840 | 841 | ||
841 | pi->do_initcal = initcal; | 842 | pi->do_initcal = initcal; |
842 | } | 843 | } |
843 | 844 | ||
844 | void wlc_phy_hw_clk_state_upd(wlc_phy_t *pih, bool newstate) | 845 | void wlc_phy_hw_clk_state_upd(struct brcms_phy_pub *pih, bool newstate) |
845 | { | 846 | { |
846 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 847 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
847 | 848 | ||
@@ -851,7 +852,7 @@ void wlc_phy_hw_clk_state_upd(wlc_phy_t *pih, bool newstate) | |||
851 | pi->sh->clk = newstate; | 852 | pi->sh->clk = newstate; |
852 | } | 853 | } |
853 | 854 | ||
854 | void wlc_phy_hw_state_upd(wlc_phy_t *pih, bool newstate) | 855 | void wlc_phy_hw_state_upd(struct brcms_phy_pub *pih, bool newstate) |
855 | { | 856 | { |
856 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 857 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
857 | 858 | ||
@@ -861,7 +862,7 @@ void wlc_phy_hw_state_upd(wlc_phy_t *pih, bool newstate) | |||
861 | pi->sh->up = newstate; | 862 | pi->sh->up = newstate; |
862 | } | 863 | } |
863 | 864 | ||
864 | void WLBANDINITFN(wlc_phy_init) (wlc_phy_t *pih, chanspec_t chanspec) | 865 | void WLBANDINITFN(wlc_phy_init) (struct brcms_phy_pub *pih, chanspec_t chanspec) |
865 | { | 866 | { |
866 | u32 mc; | 867 | u32 mc; |
867 | initfn_t phy_init = NULL; | 868 | initfn_t phy_init = NULL; |
@@ -900,7 +901,7 @@ void WLBANDINITFN(wlc_phy_init) (wlc_phy_t *pih, chanspec_t chanspec) | |||
900 | 901 | ||
901 | pi->nphy_gain_boost = true; | 902 | pi->nphy_gain_boost = true; |
902 | 903 | ||
903 | wlc_phy_switch_radio((wlc_phy_t *) pi, ON); | 904 | wlc_phy_switch_radio((struct brcms_phy_pub *) pi, ON); |
904 | 905 | ||
905 | (*phy_init) (pi); | 906 | (*phy_init) (pi); |
906 | 907 | ||
@@ -912,12 +913,12 @@ void WLBANDINITFN(wlc_phy_init) (wlc_phy_t *pih, chanspec_t chanspec) | |||
912 | if (!(ISNPHY(pi))) | 913 | if (!(ISNPHY(pi))) |
913 | wlc_phy_txpower_update_shm(pi); | 914 | wlc_phy_txpower_update_shm(pi); |
914 | 915 | ||
915 | wlc_phy_ant_rxdiv_set((wlc_phy_t *) pi, pi->sh->rx_antdiv); | 916 | wlc_phy_ant_rxdiv_set((struct brcms_phy_pub *) pi, pi->sh->rx_antdiv); |
916 | 917 | ||
917 | pi->init_in_progress = false; | 918 | pi->init_in_progress = false; |
918 | } | 919 | } |
919 | 920 | ||
920 | void wlc_phy_cal_init(wlc_phy_t *pih) | 921 | void wlc_phy_cal_init(struct brcms_phy_pub *pih) |
921 | { | 922 | { |
922 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 923 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
923 | initfn_t cal_init = NULL; | 924 | initfn_t cal_init = NULL; |
@@ -935,7 +936,7 @@ void wlc_phy_cal_init(wlc_phy_t *pih) | |||
935 | } | 936 | } |
936 | } | 937 | } |
937 | 938 | ||
938 | int wlc_phy_down(wlc_phy_t *pih) | 939 | int wlc_phy_down(struct brcms_phy_pub *pih) |
939 | { | 940 | { |
940 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 941 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
941 | int callbacks = 0; | 942 | int callbacks = 0; |
@@ -1206,7 +1207,7 @@ void wlc_phy_do_dummy_tx(struct brcms_phy *pi, bool ofdm, bool pa_on) | |||
1206 | } | 1207 | } |
1207 | } | 1208 | } |
1208 | 1209 | ||
1209 | void wlc_phy_hold_upd(wlc_phy_t *pih, mbool id, bool set) | 1210 | void wlc_phy_hold_upd(struct brcms_phy_pub *pih, mbool id, bool set) |
1210 | { | 1211 | { |
1211 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 1212 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
1212 | 1213 | ||
@@ -1219,7 +1220,7 @@ void wlc_phy_hold_upd(wlc_phy_t *pih, mbool id, bool set) | |||
1219 | return; | 1220 | return; |
1220 | } | 1221 | } |
1221 | 1222 | ||
1222 | void wlc_phy_mute_upd(wlc_phy_t *pih, bool mute, mbool flags) | 1223 | void wlc_phy_mute_upd(struct brcms_phy_pub *pih, bool mute, mbool flags) |
1223 | { | 1224 | { |
1224 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 1225 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
1225 | 1226 | ||
@@ -1234,7 +1235,7 @@ void wlc_phy_mute_upd(wlc_phy_t *pih, bool mute, mbool flags) | |||
1234 | return; | 1235 | return; |
1235 | } | 1236 | } |
1236 | 1237 | ||
1237 | void wlc_phy_clear_tssi(wlc_phy_t *pih) | 1238 | void wlc_phy_clear_tssi(struct brcms_phy_pub *pih) |
1238 | { | 1239 | { |
1239 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 1240 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
1240 | 1241 | ||
@@ -1253,7 +1254,7 @@ static bool wlc_phy_cal_txpower_recalc_sw(struct brcms_phy *pi) | |||
1253 | return false; | 1254 | return false; |
1254 | } | 1255 | } |
1255 | 1256 | ||
1256 | void wlc_phy_switch_radio(wlc_phy_t *pih, bool on) | 1257 | void wlc_phy_switch_radio(struct brcms_phy_pub *pih, bool on) |
1257 | { | 1258 | { |
1258 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 1259 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
1259 | 1260 | ||
@@ -1296,35 +1297,35 @@ void wlc_phy_switch_radio(wlc_phy_t *pih, bool on) | |||
1296 | } | 1297 | } |
1297 | } | 1298 | } |
1298 | 1299 | ||
1299 | u16 wlc_phy_bw_state_get(wlc_phy_t *ppi) | 1300 | u16 wlc_phy_bw_state_get(struct brcms_phy_pub *ppi) |
1300 | { | 1301 | { |
1301 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 1302 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
1302 | 1303 | ||
1303 | return pi->bw; | 1304 | return pi->bw; |
1304 | } | 1305 | } |
1305 | 1306 | ||
1306 | void wlc_phy_bw_state_set(wlc_phy_t *ppi, u16 bw) | 1307 | void wlc_phy_bw_state_set(struct brcms_phy_pub *ppi, u16 bw) |
1307 | { | 1308 | { |
1308 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 1309 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
1309 | 1310 | ||
1310 | pi->bw = bw; | 1311 | pi->bw = bw; |
1311 | } | 1312 | } |
1312 | 1313 | ||
1313 | void wlc_phy_chanspec_radio_set(wlc_phy_t *ppi, chanspec_t newch) | 1314 | void wlc_phy_chanspec_radio_set(struct brcms_phy_pub *ppi, chanspec_t newch) |
1314 | { | 1315 | { |
1315 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 1316 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
1316 | pi->radio_chanspec = newch; | 1317 | pi->radio_chanspec = newch; |
1317 | 1318 | ||
1318 | } | 1319 | } |
1319 | 1320 | ||
1320 | chanspec_t wlc_phy_chanspec_get(wlc_phy_t *ppi) | 1321 | chanspec_t wlc_phy_chanspec_get(struct brcms_phy_pub *ppi) |
1321 | { | 1322 | { |
1322 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 1323 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
1323 | 1324 | ||
1324 | return pi->radio_chanspec; | 1325 | return pi->radio_chanspec; |
1325 | } | 1326 | } |
1326 | 1327 | ||
1327 | void wlc_phy_chanspec_set(wlc_phy_t *ppi, chanspec_t chanspec) | 1328 | void wlc_phy_chanspec_set(struct brcms_phy_pub *ppi, chanspec_t chanspec) |
1328 | { | 1329 | { |
1329 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 1330 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
1330 | u16 m_cur_channel; | 1331 | u16 m_cur_channel; |
@@ -1374,7 +1375,8 @@ int wlc_phy_chanspec_bandrange_get(struct brcms_phy *pi, chanspec_t chanspec) | |||
1374 | return range; | 1375 | return range; |
1375 | } | 1376 | } |
1376 | 1377 | ||
1377 | void wlc_phy_chanspec_ch14_widefilter_set(wlc_phy_t *ppi, bool wide_filter) | 1378 | void wlc_phy_chanspec_ch14_widefilter_set(struct brcms_phy_pub *ppi, |
1379 | bool wide_filter) | ||
1378 | { | 1380 | { |
1379 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 1381 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
1380 | 1382 | ||
@@ -1393,7 +1395,8 @@ int wlc_phy_channel2freq(uint channel) | |||
1393 | } | 1395 | } |
1394 | 1396 | ||
1395 | void | 1397 | void |
1396 | wlc_phy_chanspec_band_validch(wlc_phy_t *ppi, uint band, chanvec_t *channels) | 1398 | wlc_phy_chanspec_band_validch(struct brcms_phy_pub *ppi, uint band, |
1399 | chanvec_t *channels) | ||
1397 | { | 1400 | { |
1398 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 1401 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
1399 | uint i; | 1402 | uint i; |
@@ -1414,7 +1417,7 @@ wlc_phy_chanspec_band_validch(wlc_phy_t *ppi, uint band, chanvec_t *channels) | |||
1414 | } | 1417 | } |
1415 | } | 1418 | } |
1416 | 1419 | ||
1417 | chanspec_t wlc_phy_chanspec_band_firstch(wlc_phy_t *ppi, uint band) | 1420 | chanspec_t wlc_phy_chanspec_band_firstch(struct brcms_phy_pub *ppi, uint band) |
1418 | { | 1421 | { |
1419 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 1422 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
1420 | uint i; | 1423 | uint i; |
@@ -1459,7 +1462,7 @@ chanspec_t wlc_phy_chanspec_band_firstch(wlc_phy_t *ppi, uint band) | |||
1459 | return (chanspec_t) INVCHANSPEC; | 1462 | return (chanspec_t) INVCHANSPEC; |
1460 | } | 1463 | } |
1461 | 1464 | ||
1462 | int wlc_phy_txpower_get(wlc_phy_t *ppi, uint *qdbm, bool *override) | 1465 | int wlc_phy_txpower_get(struct brcms_phy_pub *ppi, uint *qdbm, bool *override) |
1463 | { | 1466 | { |
1464 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 1467 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
1465 | 1468 | ||
@@ -1469,7 +1472,8 @@ int wlc_phy_txpower_get(wlc_phy_t *ppi, uint *qdbm, bool *override) | |||
1469 | return 0; | 1472 | return 0; |
1470 | } | 1473 | } |
1471 | 1474 | ||
1472 | void wlc_phy_txpower_target_set(wlc_phy_t *ppi, struct txpwr_limits *txpwr) | 1475 | void wlc_phy_txpower_target_set(struct brcms_phy_pub *ppi, |
1476 | struct txpwr_limits *txpwr) | ||
1473 | { | 1477 | { |
1474 | bool mac_enabled = false; | 1478 | bool mac_enabled = false; |
1475 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 1479 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
@@ -1518,7 +1522,7 @@ void wlc_phy_txpower_target_set(wlc_phy_t *ppi, struct txpwr_limits *txpwr) | |||
1518 | wlapi_enable_mac(pi->sh->physhim); | 1522 | wlapi_enable_mac(pi->sh->physhim); |
1519 | } | 1523 | } |
1520 | 1524 | ||
1521 | int wlc_phy_txpower_set(wlc_phy_t *ppi, uint qdbm, bool override) | 1525 | int wlc_phy_txpower_set(struct brcms_phy_pub *ppi, uint qdbm, bool override) |
1522 | { | 1526 | { |
1523 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 1527 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
1524 | int i; | 1528 | int i; |
@@ -1554,7 +1558,7 @@ int wlc_phy_txpower_set(wlc_phy_t *ppi, uint qdbm, bool override) | |||
1554 | } | 1558 | } |
1555 | 1559 | ||
1556 | void | 1560 | void |
1557 | wlc_phy_txpower_sromlimit(wlc_phy_t *ppi, uint channel, u8 *min_pwr, | 1561 | wlc_phy_txpower_sromlimit(struct brcms_phy_pub *ppi, uint channel, u8 *min_pwr, |
1558 | u8 *max_pwr, int txp_rate_idx) | 1562 | u8 *max_pwr, int txp_rate_idx) |
1559 | { | 1563 | { |
1560 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 1564 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
@@ -1604,8 +1608,8 @@ wlc_phy_txpower_sromlimit(wlc_phy_t *ppi, uint channel, u8 *min_pwr, | |||
1604 | } | 1608 | } |
1605 | 1609 | ||
1606 | void | 1610 | void |
1607 | wlc_phy_txpower_sromlimit_max_get(wlc_phy_t *ppi, uint chan, u8 *max_txpwr, | 1611 | wlc_phy_txpower_sromlimit_max_get(struct brcms_phy_pub *ppi, uint chan, |
1608 | u8 *min_txpwr) | 1612 | u8 *max_txpwr, u8 *min_txpwr) |
1609 | { | 1613 | { |
1610 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 1614 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
1611 | u8 tx_pwr_max = 0; | 1615 | u8 tx_pwr_max = 0; |
@@ -1635,20 +1639,20 @@ wlc_phy_txpower_sromlimit_max_get(wlc_phy_t *ppi, uint chan, u8 *max_txpwr, | |||
1635 | } | 1639 | } |
1636 | 1640 | ||
1637 | void | 1641 | void |
1638 | wlc_phy_txpower_boardlimit_band(wlc_phy_t *ppi, uint bandunit, s32 *max_pwr, | 1642 | wlc_phy_txpower_boardlimit_band(struct brcms_phy_pub *ppi, uint bandunit, |
1639 | s32 *min_pwr, u32 *step_pwr) | 1643 | s32 *max_pwr, s32 *min_pwr, u32 *step_pwr) |
1640 | { | 1644 | { |
1641 | return; | 1645 | return; |
1642 | } | 1646 | } |
1643 | 1647 | ||
1644 | u8 wlc_phy_txpower_get_target_min(wlc_phy_t *ppi) | 1648 | u8 wlc_phy_txpower_get_target_min(struct brcms_phy_pub *ppi) |
1645 | { | 1649 | { |
1646 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 1650 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
1647 | 1651 | ||
1648 | return pi->tx_power_min; | 1652 | return pi->tx_power_min; |
1649 | } | 1653 | } |
1650 | 1654 | ||
1651 | u8 wlc_phy_txpower_get_target_max(wlc_phy_t *ppi) | 1655 | u8 wlc_phy_txpower_get_target_max(struct brcms_phy_pub *ppi) |
1652 | { | 1656 | { |
1653 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 1657 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
1654 | 1658 | ||
@@ -1723,7 +1727,8 @@ void wlc_phy_txpower_recalc_target(struct brcms_phy *pi) | |||
1723 | 1727 | ||
1724 | { | 1728 | { |
1725 | 1729 | ||
1726 | wlc_phy_txpower_sromlimit((wlc_phy_t *) pi, target_chan, | 1730 | wlc_phy_txpower_sromlimit((struct brcms_phy_pub *) pi, |
1731 | target_chan, | ||
1727 | &mintxpwr, &maxtxpwr, rate); | 1732 | &mintxpwr, &maxtxpwr, rate); |
1728 | 1733 | ||
1729 | maxtxpwr = min(maxtxpwr, pi->txpwr_limit[rate]); | 1734 | maxtxpwr = min(maxtxpwr, pi->txpwr_limit[rate]); |
@@ -1926,21 +1931,21 @@ wlc_phy_txpower_reg_limit_calc(struct brcms_phy *pi, struct txpwr_limits *txpwr, | |||
1926 | } | 1931 | } |
1927 | } | 1932 | } |
1928 | 1933 | ||
1929 | void wlc_phy_txpwr_percent_set(wlc_phy_t *ppi, u8 txpwr_percent) | 1934 | void wlc_phy_txpwr_percent_set(struct brcms_phy_pub *ppi, u8 txpwr_percent) |
1930 | { | 1935 | { |
1931 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 1936 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
1932 | 1937 | ||
1933 | pi->txpwr_percent = txpwr_percent; | 1938 | pi->txpwr_percent = txpwr_percent; |
1934 | } | 1939 | } |
1935 | 1940 | ||
1936 | void wlc_phy_machwcap_set(wlc_phy_t *ppi, u32 machwcap) | 1941 | void wlc_phy_machwcap_set(struct brcms_phy_pub *ppi, u32 machwcap) |
1937 | { | 1942 | { |
1938 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 1943 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
1939 | 1944 | ||
1940 | pi->sh->machwcap = machwcap; | 1945 | pi->sh->machwcap = machwcap; |
1941 | } | 1946 | } |
1942 | 1947 | ||
1943 | void wlc_phy_runbist_config(wlc_phy_t *ppi, bool start_end) | 1948 | void wlc_phy_runbist_config(struct brcms_phy_pub *ppi, bool start_end) |
1944 | { | 1949 | { |
1945 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 1950 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
1946 | u16 rxc; | 1951 | u16 rxc; |
@@ -1971,7 +1976,7 @@ void wlc_phy_runbist_config(wlc_phy_t *ppi, bool start_end) | |||
1971 | } | 1976 | } |
1972 | 1977 | ||
1973 | void | 1978 | void |
1974 | wlc_phy_txpower_limit_set(wlc_phy_t *ppi, struct txpwr_limits *txpwr, | 1979 | wlc_phy_txpower_limit_set(struct brcms_phy_pub *ppi, struct txpwr_limits *txpwr, |
1975 | chanspec_t chanspec) | 1980 | chanspec_t chanspec) |
1976 | { | 1981 | { |
1977 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 1982 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
@@ -1996,14 +2001,14 @@ wlc_phy_txpower_limit_set(wlc_phy_t *ppi, struct txpwr_limits *txpwr, | |||
1996 | wlapi_enable_mac(pi->sh->physhim); | 2001 | wlapi_enable_mac(pi->sh->physhim); |
1997 | } | 2002 | } |
1998 | 2003 | ||
1999 | void wlc_phy_ofdm_rateset_war(wlc_phy_t *pih, bool war) | 2004 | void wlc_phy_ofdm_rateset_war(struct brcms_phy_pub *pih, bool war) |
2000 | { | 2005 | { |
2001 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 2006 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
2002 | 2007 | ||
2003 | pi->ofdm_rateset_war = war; | 2008 | pi->ofdm_rateset_war = war; |
2004 | } | 2009 | } |
2005 | 2010 | ||
2006 | void wlc_phy_bf_preempt_enable(wlc_phy_t *pih, bool bf_preempt) | 2011 | void wlc_phy_bf_preempt_enable(struct brcms_phy_pub *pih, bool bf_preempt) |
2007 | { | 2012 | { |
2008 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 2013 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
2009 | 2014 | ||
@@ -2061,7 +2066,7 @@ void wlc_phy_txpower_update_shm(struct brcms_phy *pi) | |||
2061 | } | 2066 | } |
2062 | } | 2067 | } |
2063 | 2068 | ||
2064 | bool wlc_phy_txpower_hw_ctrl_get(wlc_phy_t *ppi) | 2069 | bool wlc_phy_txpower_hw_ctrl_get(struct brcms_phy_pub *ppi) |
2065 | { | 2070 | { |
2066 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 2071 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
2067 | 2072 | ||
@@ -2072,7 +2077,7 @@ bool wlc_phy_txpower_hw_ctrl_get(wlc_phy_t *ppi) | |||
2072 | } | 2077 | } |
2073 | } | 2078 | } |
2074 | 2079 | ||
2075 | void wlc_phy_txpower_hw_ctrl_set(wlc_phy_t *ppi, bool hwpwrctrl) | 2080 | void wlc_phy_txpower_hw_ctrl_set(struct brcms_phy_pub *ppi, bool hwpwrctrl) |
2076 | { | 2081 | { |
2077 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 2082 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
2078 | bool cur_hwpwrctrl = pi->hwpwrctrl; | 2083 | bool cur_hwpwrctrl = pi->hwpwrctrl; |
@@ -2174,7 +2179,8 @@ static u32 wlc_phy_txpower_est_power_nphy(struct brcms_phy *pi) | |||
2174 | } | 2179 | } |
2175 | 2180 | ||
2176 | void | 2181 | void |
2177 | wlc_phy_txpower_get_current(wlc_phy_t *ppi, tx_power_t *power, uint channel) | 2182 | wlc_phy_txpower_get_current(struct brcms_phy_pub *ppi, tx_power_t *power, |
2183 | uint channel) | ||
2178 | { | 2184 | { |
2179 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 2185 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
2180 | uint rate, num_rates; | 2186 | uint rate, num_rates; |
@@ -2215,9 +2221,9 @@ wlc_phy_txpower_get_current(wlc_phy_t *ppi, tx_power_t *power, uint channel) | |||
2215 | u32 est_pout; | 2221 | u32 est_pout; |
2216 | 2222 | ||
2217 | wlapi_suspend_mac_and_wait(pi->sh->physhim); | 2223 | wlapi_suspend_mac_and_wait(pi->sh->physhim); |
2218 | wlc_phyreg_enter((wlc_phy_t *) pi); | 2224 | wlc_phyreg_enter((struct brcms_phy_pub *) pi); |
2219 | est_pout = wlc_phy_txpower_est_power_nphy(pi); | 2225 | est_pout = wlc_phy_txpower_est_power_nphy(pi); |
2220 | wlc_phyreg_exit((wlc_phy_t *) pi); | 2226 | wlc_phyreg_exit((struct brcms_phy_pub *) pi); |
2221 | wlapi_enable_mac(pi->sh->physhim); | 2227 | wlapi_enable_mac(pi->sh->physhim); |
2222 | 2228 | ||
2223 | power->est_Pout[0] = (est_pout >> 8) & 0xff; | 2229 | power->est_Pout[0] = (est_pout >> 8) & 0xff; |
@@ -2271,21 +2277,21 @@ wlc_phy_txpower_get_current(wlc_phy_t *ppi, tx_power_t *power, uint channel) | |||
2271 | } | 2277 | } |
2272 | } | 2278 | } |
2273 | 2279 | ||
2274 | void wlc_phy_antsel_type_set(wlc_phy_t *ppi, u8 antsel_type) | 2280 | void wlc_phy_antsel_type_set(struct brcms_phy_pub *ppi, u8 antsel_type) |
2275 | { | 2281 | { |
2276 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 2282 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
2277 | 2283 | ||
2278 | pi->antsel_type = antsel_type; | 2284 | pi->antsel_type = antsel_type; |
2279 | } | 2285 | } |
2280 | 2286 | ||
2281 | bool wlc_phy_test_ison(wlc_phy_t *ppi) | 2287 | bool wlc_phy_test_ison(struct brcms_phy_pub *ppi) |
2282 | { | 2288 | { |
2283 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 2289 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
2284 | 2290 | ||
2285 | return pi->phytest_on; | 2291 | return pi->phytest_on; |
2286 | } | 2292 | } |
2287 | 2293 | ||
2288 | void wlc_phy_ant_rxdiv_set(wlc_phy_t *ppi, u8 val) | 2294 | void wlc_phy_ant_rxdiv_set(struct brcms_phy_pub *ppi, u8 val) |
2289 | { | 2295 | { |
2290 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 2296 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
2291 | bool suspend; | 2297 | bool suspend; |
@@ -2359,7 +2365,7 @@ wlc_phy_noise_calc_phy(struct brcms_phy *pi, u32 *cmplx_pwr, s8 *pwr_ant) | |||
2359 | } | 2365 | } |
2360 | 2366 | ||
2361 | static void | 2367 | static void |
2362 | wlc_phy_noise_sample_request(wlc_phy_t *pih, u8 reason, u8 ch) | 2368 | wlc_phy_noise_sample_request(struct brcms_phy_pub *pih, u8 reason, u8 ch) |
2363 | { | 2369 | { |
2364 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 2370 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
2365 | s8 noise_dbm = PHY_NOISE_FIXED_VAL_NPHY; | 2371 | s8 noise_dbm = PHY_NOISE_FIXED_VAL_NPHY; |
@@ -2493,7 +2499,7 @@ wlc_phy_noise_sample_request(wlc_phy_t *pih, u8 reason, u8 ch) | |||
2493 | 2499 | ||
2494 | } | 2500 | } |
2495 | 2501 | ||
2496 | void wlc_phy_noise_sample_request_external(wlc_phy_t *pih) | 2502 | void wlc_phy_noise_sample_request_external(struct brcms_phy_pub *pih) |
2497 | { | 2503 | { |
2498 | u8 channel; | 2504 | u8 channel; |
2499 | 2505 | ||
@@ -2564,7 +2570,7 @@ static s8 wlc_phy_noise_read_shmem(struct brcms_phy *pi) | |||
2564 | 2570 | ||
2565 | } | 2571 | } |
2566 | 2572 | ||
2567 | void wlc_phy_noise_sample_intr(wlc_phy_t *pih) | 2573 | void wlc_phy_noise_sample_intr(struct brcms_phy_pub *pih) |
2568 | { | 2574 | { |
2569 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 2575 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
2570 | u16 jssi_aux; | 2576 | u16 jssi_aux; |
@@ -2675,7 +2681,7 @@ void wlc_phy_compute_dB(u32 *cmplx_pwr, s8 *p_cmplx_pwr_dB, u8 core) | |||
2675 | } | 2681 | } |
2676 | } | 2682 | } |
2677 | 2683 | ||
2678 | void wlc_phy_rssi_compute(wlc_phy_t *pih, void *ctx) | 2684 | void wlc_phy_rssi_compute(struct brcms_phy_pub *pih, void *ctx) |
2679 | { | 2685 | { |
2680 | struct brcms_d11rxhdr *wlc_rxhdr = (struct brcms_d11rxhdr *) ctx; | 2686 | struct brcms_d11rxhdr *wlc_rxhdr = (struct brcms_d11rxhdr *) ctx; |
2681 | struct d11rxhdr *rxh = &wlc_rxhdr->rxhdr; | 2687 | struct d11rxhdr *rxh = &wlc_rxhdr->rxhdr; |
@@ -2724,17 +2730,17 @@ void wlc_phy_rssi_compute(wlc_phy_t *pih, void *ctx) | |||
2724 | wlc_rxhdr->rssi = (s8) rssi; | 2730 | wlc_rxhdr->rssi = (s8) rssi; |
2725 | } | 2731 | } |
2726 | 2732 | ||
2727 | void wlc_phy_freqtrack_start(wlc_phy_t *pih) | 2733 | void wlc_phy_freqtrack_start(struct brcms_phy_pub *pih) |
2728 | { | 2734 | { |
2729 | return; | 2735 | return; |
2730 | } | 2736 | } |
2731 | 2737 | ||
2732 | void wlc_phy_freqtrack_end(wlc_phy_t *pih) | 2738 | void wlc_phy_freqtrack_end(struct brcms_phy_pub *pih) |
2733 | { | 2739 | { |
2734 | return; | 2740 | return; |
2735 | } | 2741 | } |
2736 | 2742 | ||
2737 | void wlc_phy_set_deaf(wlc_phy_t *ppi, bool user_flag) | 2743 | void wlc_phy_set_deaf(struct brcms_phy_pub *ppi, bool user_flag) |
2738 | { | 2744 | { |
2739 | struct brcms_phy *pi; | 2745 | struct brcms_phy *pi; |
2740 | pi = (struct brcms_phy *) ppi; | 2746 | pi = (struct brcms_phy *) ppi; |
@@ -2745,7 +2751,7 @@ void wlc_phy_set_deaf(wlc_phy_t *ppi, bool user_flag) | |||
2745 | wlc_nphy_deaf_mode(pi, true); | 2751 | wlc_nphy_deaf_mode(pi, true); |
2746 | } | 2752 | } |
2747 | 2753 | ||
2748 | void wlc_phy_watchdog(wlc_phy_t *pih) | 2754 | void wlc_phy_watchdog(struct brcms_phy_pub *pih) |
2749 | { | 2755 | { |
2750 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 2756 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
2751 | bool delay_phy_cal = false; | 2757 | bool delay_phy_cal = false; |
@@ -2755,7 +2761,7 @@ void wlc_phy_watchdog(wlc_phy_t *pih) | |||
2755 | return; | 2761 | return; |
2756 | 2762 | ||
2757 | if (!(SCAN_RM_IN_PROGRESS(pi) || PLT_INPROG_PHY(pi))) { | 2763 | if (!(SCAN_RM_IN_PROGRESS(pi) || PLT_INPROG_PHY(pi))) { |
2758 | wlc_phy_noise_sample_request((wlc_phy_t *) pi, | 2764 | wlc_phy_noise_sample_request((struct brcms_phy_pub *) pi, |
2759 | PHY_NOISE_SAMPLE_MON, | 2765 | PHY_NOISE_SAMPLE_MON, |
2760 | CHSPEC_CHANNEL(pi-> | 2766 | CHSPEC_CHANNEL(pi-> |
2761 | radio_chanspec)); | 2767 | radio_chanspec)); |
@@ -2786,7 +2792,7 @@ void wlc_phy_watchdog(wlc_phy_t *pih) | |||
2786 | (pi->nphy_perical != PHY_PERICAL_MANUAL) && | 2792 | (pi->nphy_perical != PHY_PERICAL_MANUAL) && |
2787 | ((pi->sh->now - pi->nphy_perical_last) >= | 2793 | ((pi->sh->now - pi->nphy_perical_last) >= |
2788 | pi->sh->glacial_timer)) | 2794 | pi->sh->glacial_timer)) |
2789 | wlc_phy_cal_perical((wlc_phy_t *) pi, | 2795 | wlc_phy_cal_perical((struct brcms_phy_pub *) pi, |
2790 | PHY_PERICAL_WATCHDOG); | 2796 | PHY_PERICAL_WATCHDOG); |
2791 | 2797 | ||
2792 | wlc_phy_txpwr_papd_cal_nphy(pi); | 2798 | wlc_phy_txpwr_papd_cal_nphy(pi); |
@@ -2810,7 +2816,7 @@ void wlc_phy_watchdog(wlc_phy_t *pih) | |||
2810 | } | 2816 | } |
2811 | } | 2817 | } |
2812 | 2818 | ||
2813 | void wlc_phy_BSSinit(wlc_phy_t *pih, bool bonlyap, int rssi) | 2819 | void wlc_phy_BSSinit(struct brcms_phy_pub *pih, bool bonlyap, int rssi) |
2814 | { | 2820 | { |
2815 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 2821 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
2816 | uint i; | 2822 | uint i; |
@@ -2931,7 +2937,7 @@ wlc_phy_cal_perical_mphase_schedule(struct brcms_phy *pi, uint delay) | |||
2931 | wlapi_add_timer(pi->sh->physhim, pi->phycal_timer, delay, 0); | 2937 | wlapi_add_timer(pi->sh->physhim, pi->phycal_timer, delay, 0); |
2932 | } | 2938 | } |
2933 | 2939 | ||
2934 | void wlc_phy_cal_perical(wlc_phy_t *pih, u8 reason) | 2940 | void wlc_phy_cal_perical(struct brcms_phy_pub *pih, u8 reason) |
2935 | { | 2941 | { |
2936 | s16 nphy_currtemp = 0; | 2942 | s16 nphy_currtemp = 0; |
2937 | s16 delta_temp = 0; | 2943 | s16 delta_temp = 0; |
@@ -3029,7 +3035,7 @@ u8 wlc_phy_nbits(s32 value) | |||
3029 | return nbits; | 3035 | return nbits; |
3030 | } | 3036 | } |
3031 | 3037 | ||
3032 | void wlc_phy_stf_chain_init(wlc_phy_t *pih, u8 txchain, u8 rxchain) | 3038 | void wlc_phy_stf_chain_init(struct brcms_phy_pub *pih, u8 txchain, u8 rxchain) |
3033 | { | 3039 | { |
3034 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 3040 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
3035 | 3041 | ||
@@ -3040,7 +3046,7 @@ void wlc_phy_stf_chain_init(wlc_phy_t *pih, u8 txchain, u8 rxchain) | |||
3040 | pi->pubpi.phy_corenum = (u8) PHY_BITSCNT(pi->sh->phyrxchain); | 3046 | pi->pubpi.phy_corenum = (u8) PHY_BITSCNT(pi->sh->phyrxchain); |
3041 | } | 3047 | } |
3042 | 3048 | ||
3043 | void wlc_phy_stf_chain_set(wlc_phy_t *pih, u8 txchain, u8 rxchain) | 3049 | void wlc_phy_stf_chain_set(struct brcms_phy_pub *pih, u8 txchain, u8 rxchain) |
3044 | { | 3050 | { |
3045 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 3051 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
3046 | 3052 | ||
@@ -3052,7 +3058,7 @@ void wlc_phy_stf_chain_set(wlc_phy_t *pih, u8 txchain, u8 rxchain) | |||
3052 | pi->pubpi.phy_corenum = (u8) PHY_BITSCNT(pi->sh->phyrxchain); | 3058 | pi->pubpi.phy_corenum = (u8) PHY_BITSCNT(pi->sh->phyrxchain); |
3053 | } | 3059 | } |
3054 | 3060 | ||
3055 | void wlc_phy_stf_chain_get(wlc_phy_t *pih, u8 *txchain, u8 *rxchain) | 3061 | void wlc_phy_stf_chain_get(struct brcms_phy_pub *pih, u8 *txchain, u8 *rxchain) |
3056 | { | 3062 | { |
3057 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 3063 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
3058 | 3064 | ||
@@ -3060,7 +3066,7 @@ void wlc_phy_stf_chain_get(wlc_phy_t *pih, u8 *txchain, u8 *rxchain) | |||
3060 | *rxchain = pi->sh->phyrxchain; | 3066 | *rxchain = pi->sh->phyrxchain; |
3061 | } | 3067 | } |
3062 | 3068 | ||
3063 | u8 wlc_phy_stf_chain_active_get(wlc_phy_t *pih) | 3069 | u8 wlc_phy_stf_chain_active_get(struct brcms_phy_pub *pih) |
3064 | { | 3070 | { |
3065 | s16 nphy_currtemp; | 3071 | s16 nphy_currtemp; |
3066 | u8 active_bitmap; | 3072 | u8 active_bitmap; |
@@ -3092,7 +3098,7 @@ u8 wlc_phy_stf_chain_active_get(wlc_phy_t *pih) | |||
3092 | return active_bitmap; | 3098 | return active_bitmap; |
3093 | } | 3099 | } |
3094 | 3100 | ||
3095 | s8 wlc_phy_stf_ssmode_get(wlc_phy_t *pih, chanspec_t chanspec) | 3101 | s8 wlc_phy_stf_ssmode_get(struct brcms_phy_pub *pih, chanspec_t chanspec) |
3096 | { | 3102 | { |
3097 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 3103 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
3098 | u8 siso_mcs_id, cdd_mcs_id; | 3104 | u8 siso_mcs_id, cdd_mcs_id; |
@@ -3193,7 +3199,7 @@ static void wlc_phy_upd_env_txpwr_rate_limits(struct brcms_phy *pi, u32 band) | |||
3193 | 3199 | ||
3194 | } | 3200 | } |
3195 | 3201 | ||
3196 | void wlc_phy_ldpc_override_set(wlc_phy_t *ppi, bool ldpc) | 3202 | void wlc_phy_ldpc_override_set(struct brcms_phy_pub *ppi, bool ldpc) |
3197 | { | 3203 | { |
3198 | return; | 3204 | return; |
3199 | } | 3205 | } |
@@ -3211,7 +3217,7 @@ s8 wlc_phy_upd_rssi_offset(struct brcms_phy *pi, s8 rssi, chanspec_t chanspec) | |||
3211 | return rssi; | 3217 | return rssi; |
3212 | } | 3218 | } |
3213 | 3219 | ||
3214 | bool wlc_phy_txpower_ipa_ison(wlc_phy_t *ppi) | 3220 | bool wlc_phy_txpower_ipa_ison(struct brcms_phy_pub *ppi) |
3215 | { | 3221 | { |
3216 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 3222 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
3217 | 3223 | ||
diff --git a/drivers/staging/brcm80211/brcmsmac/phy/phy_hal.h b/drivers/staging/brcm80211/brcmsmac/phy/phy_hal.h index d1d03a624ef..a2df6b42afe 100644 --- a/drivers/staging/brcm80211/brcmsmac/phy/phy_hal.h +++ b/drivers/staging/brcm80211/brcmsmac/phy/phy_hal.h | |||
@@ -177,107 +177,118 @@ struct shared_phy_params { | |||
177 | 177 | ||
178 | 178 | ||
179 | extern struct shared_phy *wlc_phy_shared_attach(struct shared_phy_params *shp); | 179 | extern struct shared_phy *wlc_phy_shared_attach(struct shared_phy_params *shp); |
180 | extern wlc_phy_t *wlc_phy_attach(struct shared_phy *sh, void *regs, | 180 | extern struct brcms_phy_pub *wlc_phy_attach(struct shared_phy *sh, void *regs, |
181 | int bandtype, char *vars, struct wiphy *wiphy); | 181 | int bandtype, char *vars, struct wiphy *wiphy); |
182 | extern void wlc_phy_detach(wlc_phy_t *ppi); | 182 | extern void wlc_phy_detach(struct brcms_phy_pub *ppi); |
183 | 183 | ||
184 | extern bool wlc_phy_get_phyversion(wlc_phy_t *pih, u16 *phytype, | 184 | extern bool wlc_phy_get_phyversion(struct brcms_phy_pub *pih, u16 *phytype, |
185 | u16 *phyrev, u16 *radioid, | 185 | u16 *phyrev, u16 *radioid, |
186 | u16 *radiover); | 186 | u16 *radiover); |
187 | extern bool wlc_phy_get_encore(wlc_phy_t *pih); | 187 | extern bool wlc_phy_get_encore(struct brcms_phy_pub *pih); |
188 | extern u32 wlc_phy_get_coreflags(wlc_phy_t *pih); | 188 | extern u32 wlc_phy_get_coreflags(struct brcms_phy_pub *pih); |
189 | 189 | ||
190 | extern void wlc_phy_hw_clk_state_upd(wlc_phy_t *ppi, bool newstate); | 190 | extern void wlc_phy_hw_clk_state_upd(struct brcms_phy_pub *ppi, bool newstate); |
191 | extern void wlc_phy_hw_state_upd(wlc_phy_t *ppi, bool newstate); | 191 | extern void wlc_phy_hw_state_upd(struct brcms_phy_pub *ppi, bool newstate); |
192 | extern void wlc_phy_init(wlc_phy_t *ppi, chanspec_t chanspec); | 192 | extern void wlc_phy_init(struct brcms_phy_pub *ppi, chanspec_t chanspec); |
193 | extern void wlc_phy_watchdog(wlc_phy_t *ppi); | 193 | extern void wlc_phy_watchdog(struct brcms_phy_pub *ppi); |
194 | extern int wlc_phy_down(wlc_phy_t *ppi); | 194 | extern int wlc_phy_down(struct brcms_phy_pub *ppi); |
195 | extern u32 wlc_phy_clk_bwbits(wlc_phy_t *pih); | 195 | extern u32 wlc_phy_clk_bwbits(struct brcms_phy_pub *pih); |
196 | extern void wlc_phy_cal_init(wlc_phy_t *ppi); | 196 | extern void wlc_phy_cal_init(struct brcms_phy_pub *ppi); |
197 | extern void wlc_phy_antsel_init(wlc_phy_t *ppi, bool lut_init); | 197 | extern void wlc_phy_antsel_init(struct brcms_phy_pub *ppi, bool lut_init); |
198 | 198 | ||
199 | extern void wlc_phy_chanspec_set(wlc_phy_t *ppi, chanspec_t chanspec); | 199 | extern void wlc_phy_chanspec_set(struct brcms_phy_pub *ppi, |
200 | extern chanspec_t wlc_phy_chanspec_get(wlc_phy_t *ppi); | 200 | chanspec_t chanspec); |
201 | extern void wlc_phy_chanspec_radio_set(wlc_phy_t *ppi, chanspec_t newch); | 201 | extern chanspec_t wlc_phy_chanspec_get(struct brcms_phy_pub *ppi); |
202 | extern u16 wlc_phy_bw_state_get(wlc_phy_t *ppi); | 202 | extern void wlc_phy_chanspec_radio_set(struct brcms_phy_pub *ppi, |
203 | extern void wlc_phy_bw_state_set(wlc_phy_t *ppi, u16 bw); | 203 | chanspec_t newch); |
204 | extern u16 wlc_phy_bw_state_get(struct brcms_phy_pub *ppi); | ||
205 | extern void wlc_phy_bw_state_set(struct brcms_phy_pub *ppi, u16 bw); | ||
204 | 206 | ||
205 | extern void wlc_phy_rssi_compute(wlc_phy_t *pih, void *ctx); | 207 | extern void wlc_phy_rssi_compute(struct brcms_phy_pub *pih, void *ctx); |
206 | extern void wlc_phy_por_inform(wlc_phy_t *ppi); | 208 | extern void wlc_phy_por_inform(struct brcms_phy_pub *ppi); |
207 | extern void wlc_phy_noise_sample_intr(wlc_phy_t *ppi); | 209 | extern void wlc_phy_noise_sample_intr(struct brcms_phy_pub *ppi); |
208 | extern bool wlc_phy_bist_check_phy(wlc_phy_t *ppi); | 210 | extern bool wlc_phy_bist_check_phy(struct brcms_phy_pub *ppi); |
209 | 211 | ||
210 | extern void wlc_phy_set_deaf(wlc_phy_t *ppi, bool user_flag); | 212 | extern void wlc_phy_set_deaf(struct brcms_phy_pub *ppi, bool user_flag); |
211 | 213 | ||
212 | extern void wlc_phy_switch_radio(wlc_phy_t *ppi, bool on); | 214 | extern void wlc_phy_switch_radio(struct brcms_phy_pub *ppi, bool on); |
213 | extern void wlc_phy_anacore(wlc_phy_t *ppi, bool on); | 215 | extern void wlc_phy_anacore(struct brcms_phy_pub *ppi, bool on); |
214 | 216 | ||
215 | 217 | ||
216 | extern void wlc_phy_BSSinit(wlc_phy_t *ppi, bool bonlyap, int rssi); | 218 | extern void wlc_phy_BSSinit(struct brcms_phy_pub *ppi, bool bonlyap, int rssi); |
217 | 219 | ||
218 | extern void wlc_phy_chanspec_ch14_widefilter_set(wlc_phy_t *ppi, | 220 | extern void wlc_phy_chanspec_ch14_widefilter_set(struct brcms_phy_pub *ppi, |
219 | bool wide_filter); | 221 | bool wide_filter); |
220 | extern void wlc_phy_chanspec_band_validch(wlc_phy_t *ppi, uint band, | 222 | extern void wlc_phy_chanspec_band_validch(struct brcms_phy_pub *ppi, uint band, |
221 | chanvec_t *channels); | 223 | chanvec_t *channels); |
222 | extern chanspec_t wlc_phy_chanspec_band_firstch(wlc_phy_t *ppi, uint band); | 224 | extern chanspec_t wlc_phy_chanspec_band_firstch(struct brcms_phy_pub *ppi, |
225 | uint band); | ||
223 | 226 | ||
224 | extern void wlc_phy_txpower_sromlimit(wlc_phy_t *ppi, uint chan, | 227 | extern void wlc_phy_txpower_sromlimit(struct brcms_phy_pub *ppi, uint chan, |
225 | u8 *_min_, u8 *_max_, int rate); | 228 | u8 *_min_, u8 *_max_, int rate); |
226 | extern void wlc_phy_txpower_sromlimit_max_get(wlc_phy_t *ppi, uint chan, | 229 | extern void wlc_phy_txpower_sromlimit_max_get(struct brcms_phy_pub *ppi, |
227 | u8 *_max_, u8 *_min_); | 230 | uint chan, u8 *_max_, u8 *_min_); |
228 | extern void wlc_phy_txpower_boardlimit_band(wlc_phy_t *ppi, uint band, s32 *, | 231 | extern void wlc_phy_txpower_boardlimit_band(struct brcms_phy_pub *ppi, |
229 | s32 *, u32 *); | 232 | uint band, s32 *, s32 *, u32 *); |
230 | extern void wlc_phy_txpower_limit_set(wlc_phy_t *ppi, struct txpwr_limits *, | 233 | extern void wlc_phy_txpower_limit_set(struct brcms_phy_pub *ppi, |
234 | struct txpwr_limits *, | ||
231 | chanspec_t chanspec); | 235 | chanspec_t chanspec); |
232 | extern int wlc_phy_txpower_get(wlc_phy_t *ppi, uint *qdbm, bool *override); | 236 | extern int wlc_phy_txpower_get(struct brcms_phy_pub *ppi, uint *qdbm, |
233 | extern int wlc_phy_txpower_set(wlc_phy_t *ppi, uint qdbm, bool override); | 237 | bool *override); |
234 | extern void wlc_phy_txpower_target_set(wlc_phy_t *ppi, struct txpwr_limits *); | 238 | extern int wlc_phy_txpower_set(struct brcms_phy_pub *ppi, uint qdbm, |
235 | extern bool wlc_phy_txpower_hw_ctrl_get(wlc_phy_t *ppi); | 239 | bool override); |
236 | extern void wlc_phy_txpower_hw_ctrl_set(wlc_phy_t *ppi, bool hwpwrctrl); | 240 | extern void wlc_phy_txpower_target_set(struct brcms_phy_pub *ppi, |
237 | extern u8 wlc_phy_txpower_get_target_min(wlc_phy_t *ppi); | 241 | struct txpwr_limits *); |
238 | extern u8 wlc_phy_txpower_get_target_max(wlc_phy_t *ppi); | 242 | extern bool wlc_phy_txpower_hw_ctrl_get(struct brcms_phy_pub *ppi); |
239 | extern bool wlc_phy_txpower_ipa_ison(wlc_phy_t *pih); | 243 | extern void wlc_phy_txpower_hw_ctrl_set(struct brcms_phy_pub *ppi, |
240 | 244 | bool hwpwrctrl); | |
241 | extern void wlc_phy_stf_chain_init(wlc_phy_t *pih, u8 txchain, | 245 | extern u8 wlc_phy_txpower_get_target_min(struct brcms_phy_pub *ppi); |
246 | extern u8 wlc_phy_txpower_get_target_max(struct brcms_phy_pub *ppi); | ||
247 | extern bool wlc_phy_txpower_ipa_ison(struct brcms_phy_pub *pih); | ||
248 | |||
249 | extern void wlc_phy_stf_chain_init(struct brcms_phy_pub *pih, u8 txchain, | ||
242 | u8 rxchain); | 250 | u8 rxchain); |
243 | extern void wlc_phy_stf_chain_set(wlc_phy_t *pih, u8 txchain, | 251 | extern void wlc_phy_stf_chain_set(struct brcms_phy_pub *pih, u8 txchain, |
244 | u8 rxchain); | 252 | u8 rxchain); |
245 | extern void wlc_phy_stf_chain_get(wlc_phy_t *pih, u8 *txchain, | 253 | extern void wlc_phy_stf_chain_get(struct brcms_phy_pub *pih, u8 *txchain, |
246 | u8 *rxchain); | 254 | u8 *rxchain); |
247 | extern u8 wlc_phy_stf_chain_active_get(wlc_phy_t *pih); | 255 | extern u8 wlc_phy_stf_chain_active_get(struct brcms_phy_pub *pih); |
248 | extern s8 wlc_phy_stf_ssmode_get(wlc_phy_t *pih, chanspec_t chanspec); | 256 | extern s8 wlc_phy_stf_ssmode_get(struct brcms_phy_pub *pih, |
249 | extern void wlc_phy_ldpc_override_set(wlc_phy_t *ppi, bool val); | 257 | chanspec_t chanspec); |
258 | extern void wlc_phy_ldpc_override_set(struct brcms_phy_pub *ppi, bool val); | ||
250 | 259 | ||
251 | extern void wlc_phy_cal_perical(wlc_phy_t *ppi, u8 reason); | 260 | extern void wlc_phy_cal_perical(struct brcms_phy_pub *ppi, u8 reason); |
252 | extern void wlc_phy_noise_sample_request_external(wlc_phy_t *ppi); | 261 | extern void wlc_phy_noise_sample_request_external(struct brcms_phy_pub *ppi); |
253 | extern void wlc_phy_edcrs_lock(wlc_phy_t *pih, bool lock); | 262 | extern void wlc_phy_edcrs_lock(struct brcms_phy_pub *pih, bool lock); |
254 | extern void wlc_phy_cal_papd_recal(wlc_phy_t *ppi); | 263 | extern void wlc_phy_cal_papd_recal(struct brcms_phy_pub *ppi); |
255 | 264 | ||
256 | extern void wlc_phy_ant_rxdiv_set(wlc_phy_t *ppi, u8 val); | 265 | extern void wlc_phy_ant_rxdiv_set(struct brcms_phy_pub *ppi, u8 val); |
257 | extern void wlc_phy_clear_tssi(wlc_phy_t *ppi); | 266 | extern void wlc_phy_clear_tssi(struct brcms_phy_pub *ppi); |
258 | extern void wlc_phy_hold_upd(wlc_phy_t *ppi, mbool id, bool val); | 267 | extern void wlc_phy_hold_upd(struct brcms_phy_pub *ppi, mbool id, bool val); |
259 | extern void wlc_phy_mute_upd(wlc_phy_t *ppi, bool val, mbool flags); | 268 | extern void wlc_phy_mute_upd(struct brcms_phy_pub *ppi, bool val, mbool flags); |
260 | 269 | ||
261 | extern void wlc_phy_antsel_type_set(wlc_phy_t *ppi, u8 antsel_type); | 270 | extern void wlc_phy_antsel_type_set(struct brcms_phy_pub *ppi, u8 antsel_type); |
262 | 271 | ||
263 | extern void wlc_phy_txpower_get_current(wlc_phy_t *ppi, tx_power_t *power, | 272 | extern void wlc_phy_txpower_get_current(struct brcms_phy_pub *ppi, |
264 | uint channel); | 273 | tx_power_t *power, uint channel); |
265 | 274 | ||
266 | extern void wlc_phy_initcal_enable(wlc_phy_t *pih, bool initcal); | 275 | extern void wlc_phy_initcal_enable(struct brcms_phy_pub *pih, bool initcal); |
267 | extern bool wlc_phy_test_ison(wlc_phy_t *ppi); | 276 | extern bool wlc_phy_test_ison(struct brcms_phy_pub *ppi); |
268 | extern void wlc_phy_txpwr_percent_set(wlc_phy_t *ppi, u8 txpwr_percent); | 277 | extern void wlc_phy_txpwr_percent_set(struct brcms_phy_pub *ppi, |
269 | extern void wlc_phy_ofdm_rateset_war(wlc_phy_t *pih, bool war); | 278 | u8 txpwr_percent); |
270 | extern void wlc_phy_bf_preempt_enable(wlc_phy_t *pih, bool bf_preempt); | 279 | extern void wlc_phy_ofdm_rateset_war(struct brcms_phy_pub *pih, bool war); |
271 | extern void wlc_phy_machwcap_set(wlc_phy_t *ppi, u32 machwcap); | 280 | extern void wlc_phy_bf_preempt_enable(struct brcms_phy_pub *pih, |
281 | bool bf_preempt); | ||
282 | extern void wlc_phy_machwcap_set(struct brcms_phy_pub *ppi, u32 machwcap); | ||
272 | 283 | ||
273 | extern void wlc_phy_runbist_config(wlc_phy_t *ppi, bool start_end); | 284 | extern void wlc_phy_runbist_config(struct brcms_phy_pub *ppi, bool start_end); |
274 | 285 | ||
275 | extern void wlc_phy_freqtrack_start(wlc_phy_t *ppi); | 286 | extern void wlc_phy_freqtrack_start(struct brcms_phy_pub *ppi); |
276 | extern void wlc_phy_freqtrack_end(wlc_phy_t *ppi); | 287 | extern void wlc_phy_freqtrack_end(struct brcms_phy_pub *ppi); |
277 | 288 | ||
278 | extern const u8 *wlc_phy_get_ofdm_rate_lookup(void); | 289 | extern const u8 *wlc_phy_get_ofdm_rate_lookup(void); |
279 | 290 | ||
280 | extern s8 wlc_phy_get_tx_power_offset_by_mcs(wlc_phy_t *ppi, | 291 | extern s8 wlc_phy_get_tx_power_offset_by_mcs(struct brcms_phy_pub *ppi, |
281 | u8 mcs_offset); | 292 | u8 mcs_offset); |
282 | extern s8 wlc_phy_get_tx_power_offset(wlc_phy_t *ppi, u8 tbl_offset); | 293 | extern s8 wlc_phy_get_tx_power_offset(struct brcms_phy_pub *ppi, u8 tbl_offset); |
283 | #endif /* _BRCM_PHY_HAL_H_ */ | 294 | #endif /* _BRCM_PHY_HAL_H_ */ |
diff --git a/drivers/staging/brcm80211/brcmsmac/phy/phy_int.h b/drivers/staging/brcm80211/brcmsmac/phy/phy_int.h index 6e4c2b140d7..46595039f58 100644 --- a/drivers/staging/brcm80211/brcmsmac/phy/phy_int.h +++ b/drivers/staging/brcm80211/brcmsmac/phy/phy_int.h | |||
@@ -565,7 +565,7 @@ struct shared_phy { | |||
565 | bool _rifs_phy; | 565 | bool _rifs_phy; |
566 | }; | 566 | }; |
567 | 567 | ||
568 | struct phy_pub { | 568 | struct brcms_phy_pub { |
569 | uint phy_type; | 569 | uint phy_type; |
570 | uint phy_rev; | 570 | uint phy_rev; |
571 | u8 phy_corenum; | 571 | u8 phy_corenum; |
@@ -594,7 +594,7 @@ struct phy_func_ptr { | |||
594 | }; | 594 | }; |
595 | 595 | ||
596 | struct brcms_phy { | 596 | struct brcms_phy { |
597 | wlc_phy_t pubpi_ro; | 597 | struct brcms_phy_pub pubpi_ro; |
598 | struct shared_phy *sh; | 598 | struct shared_phy *sh; |
599 | struct phy_func_ptr pi_fptr; | 599 | struct phy_func_ptr pi_fptr; |
600 | void *pi_ptr; | 600 | void *pi_ptr; |
@@ -607,7 +607,7 @@ struct brcms_phy { | |||
607 | d11regs_t *regs; | 607 | d11regs_t *regs; |
608 | struct brcms_phy *next; | 608 | struct brcms_phy *next; |
609 | char *vars; | 609 | char *vars; |
610 | wlc_phy_t pubpi; | 610 | struct brcms_phy_pub pubpi; |
611 | 611 | ||
612 | bool do_initcal; | 612 | bool do_initcal; |
613 | bool phytest_on; | 613 | bool phytest_on; |
@@ -1002,10 +1002,10 @@ extern void xor_radio_reg(struct brcms_phy *pi, u16 addr, u16 mask); | |||
1002 | 1002 | ||
1003 | extern void write_radio_reg(struct brcms_phy *pi, u16 addr, u16 val); | 1003 | extern void write_radio_reg(struct brcms_phy *pi, u16 addr, u16 val); |
1004 | 1004 | ||
1005 | extern void wlc_phyreg_enter(wlc_phy_t *pih); | 1005 | extern void wlc_phyreg_enter(struct brcms_phy_pub *pih); |
1006 | extern void wlc_phyreg_exit(wlc_phy_t *pih); | 1006 | extern void wlc_phyreg_exit(struct brcms_phy_pub *pih); |
1007 | extern void wlc_radioreg_enter(wlc_phy_t *pih); | 1007 | extern void wlc_radioreg_enter(struct brcms_phy_pub *pih); |
1008 | extern void wlc_radioreg_exit(wlc_phy_t *pih); | 1008 | extern void wlc_radioreg_exit(struct brcms_phy_pub *pih); |
1009 | 1009 | ||
1010 | extern void wlc_phy_read_table(struct brcms_phy *pi, | 1010 | extern void wlc_phy_read_table(struct brcms_phy *pi, |
1011 | const struct phytbl_info *ptbl_info, | 1011 | const struct phytbl_info *ptbl_info, |
@@ -1125,7 +1125,7 @@ extern void wlc_lcnphy_tx_pwr_update_npt(struct brcms_phy *pi); | |||
1125 | extern s32 wlc_lcnphy_tssi2dbm(s32 tssi, s32 a1, s32 b0, s32 b1); | 1125 | extern s32 wlc_lcnphy_tssi2dbm(s32 tssi, s32 a1, s32 b0, s32 b1); |
1126 | extern void wlc_lcnphy_get_tssi(struct brcms_phy *pi, s8 *ofdm_pwr, | 1126 | extern void wlc_lcnphy_get_tssi(struct brcms_phy *pi, s8 *ofdm_pwr, |
1127 | s8 *cck_pwr); | 1127 | s8 *cck_pwr); |
1128 | extern void wlc_lcnphy_tx_power_adjustment(wlc_phy_t *ppi); | 1128 | extern void wlc_lcnphy_tx_power_adjustment(struct brcms_phy_pub *ppi); |
1129 | 1129 | ||
1130 | extern s32 wlc_lcnphy_rx_signal_power(struct brcms_phy *pi, s32 gain_index); | 1130 | extern s32 wlc_lcnphy_rx_signal_power(struct brcms_phy *pi, s32 gain_index); |
1131 | 1131 | ||
@@ -1185,8 +1185,9 @@ extern void wlc_phy_rx_iq_coeffs_nphy(struct brcms_phy *pi, u8 write, | |||
1185 | struct nphy_iq_comp *comp); | 1185 | struct nphy_iq_comp *comp); |
1186 | extern void wlc_phy_aci_and_noise_reduction_nphy(struct brcms_phy *pi); | 1186 | extern void wlc_phy_aci_and_noise_reduction_nphy(struct brcms_phy *pi); |
1187 | 1187 | ||
1188 | extern void wlc_phy_rxcore_setstate_nphy(wlc_phy_t *pih, u8 rxcore_bitmask); | 1188 | extern void wlc_phy_rxcore_setstate_nphy(struct brcms_phy_pub *pih, |
1189 | extern u8 wlc_phy_rxcore_getstate_nphy(wlc_phy_t *pih); | 1189 | u8 rxcore_bitmask); |
1190 | extern u8 wlc_phy_rxcore_getstate_nphy(struct brcms_phy_pub *pih); | ||
1190 | 1191 | ||
1191 | extern void wlc_phy_txpwrctrl_enable_nphy(struct brcms_phy *pi, u8 ctrl_type); | 1192 | extern void wlc_phy_txpwrctrl_enable_nphy(struct brcms_phy *pi, u8 ctrl_type); |
1192 | extern void wlc_phy_txpwr_fixpower_nphy(struct brcms_phy *pi); | 1193 | extern void wlc_phy_txpwr_fixpower_nphy(struct brcms_phy *pi); |
diff --git a/drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c b/drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c index 0c9ceb7b314..70e79fc00e7 100644 --- a/drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c +++ b/drivers/staging/brcm80211/brcmsmac/phy/phy_lcn.c | |||
@@ -991,7 +991,7 @@ static bool wlc_lcnphy_rx_iq_est(struct brcms_phy *pi, u16 num_samps, | |||
991 | static bool wlc_lcnphy_calc_rx_iq_comp(struct brcms_phy *pi, u16 num_samps); | 991 | static bool wlc_lcnphy_calc_rx_iq_comp(struct brcms_phy *pi, u16 num_samps); |
992 | static u16 wlc_lcnphy_get_pa_gain(struct brcms_phy *pi); | 992 | static u16 wlc_lcnphy_get_pa_gain(struct brcms_phy *pi); |
993 | static void wlc_lcnphy_afe_clk_init(struct brcms_phy *pi, u8 mode); | 993 | static void wlc_lcnphy_afe_clk_init(struct brcms_phy *pi, u8 mode); |
994 | extern void wlc_lcnphy_tx_pwr_ctrl_init(wlc_phy_t *ppi); | 994 | extern void wlc_lcnphy_tx_pwr_ctrl_init(struct brcms_phy_pub *ppi); |
995 | static void wlc_lcnphy_radio_2064_channel_tune_4313(struct brcms_phy *pi, | 995 | static void wlc_lcnphy_radio_2064_channel_tune_4313(struct brcms_phy *pi, |
996 | u8 channel); | 996 | u8 channel); |
997 | 997 | ||
@@ -1210,7 +1210,7 @@ void wlc_phy_chanspec_set_lcnphy(struct brcms_phy *pi, chanspec_t chanspec) | |||
1210 | { | 1210 | { |
1211 | u8 channel = CHSPEC_CHANNEL(chanspec); | 1211 | u8 channel = CHSPEC_CHANNEL(chanspec); |
1212 | 1212 | ||
1213 | wlc_phy_chanspec_radio_set((wlc_phy_t *) pi, chanspec); | 1213 | wlc_phy_chanspec_radio_set((struct brcms_phy_pub *) pi, chanspec); |
1214 | 1214 | ||
1215 | wlc_lcnphy_set_chanspec_tweaks(pi, pi->radio_chanspec); | 1215 | wlc_lcnphy_set_chanspec_tweaks(pi, pi->radio_chanspec); |
1216 | 1216 | ||
@@ -2067,7 +2067,7 @@ wlc_lcnphy_tx_iqlo_cal(struct brcms_phy *pi, | |||
2067 | 2067 | ||
2068 | } | 2068 | } |
2069 | 2069 | ||
2070 | static void wlc_lcnphy_idle_tssi_est(wlc_phy_t *ppi) | 2070 | static void wlc_lcnphy_idle_tssi_est(struct brcms_phy_pub *ppi) |
2071 | { | 2071 | { |
2072 | bool suspend, tx_gain_override_old; | 2072 | bool suspend, tx_gain_override_old; |
2073 | struct lcnphy_txgains old_gains; | 2073 | struct lcnphy_txgains old_gains; |
@@ -2275,7 +2275,7 @@ static void wlc_lcnphy_vbat_temp_sense_setup(struct brcms_phy *pi, u8 mode) | |||
2275 | udelay(999); | 2275 | udelay(999); |
2276 | } | 2276 | } |
2277 | 2277 | ||
2278 | void WLBANDINITFN(wlc_lcnphy_tx_pwr_ctrl_init) (wlc_phy_t *ppi) | 2278 | void WLBANDINITFN(wlc_lcnphy_tx_pwr_ctrl_init) (struct brcms_phy_pub *ppi) |
2279 | { | 2279 | { |
2280 | struct lcnphy_txgains tx_gains; | 2280 | struct lcnphy_txgains tx_gains; |
2281 | u8 bbmult; | 2281 | u8 bbmult; |
@@ -3501,7 +3501,7 @@ static void wlc_lcnphy_periodic_cal(struct brcms_phy *pi) | |||
3501 | 3501 | ||
3502 | if (wlc_lcnphy_tssi_based_pwr_ctrl_enabled(pi)) { | 3502 | if (wlc_lcnphy_tssi_based_pwr_ctrl_enabled(pi)) { |
3503 | 3503 | ||
3504 | wlc_lcnphy_idle_tssi_est((wlc_phy_t *) pi); | 3504 | wlc_lcnphy_idle_tssi_est((struct brcms_phy_pub *) pi); |
3505 | 3505 | ||
3506 | b0 = pi->txpa_2g[0]; | 3506 | b0 = pi->txpa_2g[0]; |
3507 | b1 = pi->txpa_2g[1]; | 3507 | b1 = pi->txpa_2g[1]; |
@@ -3563,7 +3563,8 @@ void wlc_lcnphy_calib_modes(struct brcms_phy *pi, uint mode) | |||
3563 | break; | 3563 | break; |
3564 | case LCNPHY_PERICAL_TEMPBASED_TXPWRCTRL: | 3564 | case LCNPHY_PERICAL_TEMPBASED_TXPWRCTRL: |
3565 | if (wlc_lcnphy_tempsense_based_pwr_ctrl_enabled(pi)) | 3565 | if (wlc_lcnphy_tempsense_based_pwr_ctrl_enabled(pi)) |
3566 | wlc_lcnphy_tx_power_adjustment((wlc_phy_t *) pi); | 3566 | wlc_lcnphy_tx_power_adjustment( |
3567 | (struct brcms_phy_pub *) pi); | ||
3567 | break; | 3568 | break; |
3568 | } | 3569 | } |
3569 | } | 3570 | } |
@@ -3649,7 +3650,7 @@ wlc_lcnphy_set_chanspec_tweaks(struct brcms_phy *pi, chanspec_t chanspec) | |||
3649 | write_phy_reg(pi, 0x44a, 0x80); | 3650 | write_phy_reg(pi, 0x44a, 0x80); |
3650 | } | 3651 | } |
3651 | 3652 | ||
3652 | void wlc_lcnphy_tx_power_adjustment(wlc_phy_t *ppi) | 3653 | void wlc_lcnphy_tx_power_adjustment(struct brcms_phy_pub *ppi) |
3653 | { | 3654 | { |
3654 | s8 index; | 3655 | s8 index; |
3655 | u16 index2; | 3656 | u16 index2; |
@@ -3705,9 +3706,9 @@ void WLBANDINITFN(wlc_phy_init_lcnphy) (struct brcms_phy *pi) | |||
3705 | wlc_lcnphy_radio_init(pi); | 3706 | wlc_lcnphy_radio_init(pi); |
3706 | 3707 | ||
3707 | if (CHSPEC_IS2G(pi->radio_chanspec)) | 3708 | if (CHSPEC_IS2G(pi->radio_chanspec)) |
3708 | wlc_lcnphy_tx_pwr_ctrl_init((wlc_phy_t *) pi); | 3709 | wlc_lcnphy_tx_pwr_ctrl_init((struct brcms_phy_pub *) pi); |
3709 | 3710 | ||
3710 | wlc_phy_chanspec_set((wlc_phy_t *) pi, pi->radio_chanspec); | 3711 | wlc_phy_chanspec_set((struct brcms_phy_pub *) pi, pi->radio_chanspec); |
3711 | 3712 | ||
3712 | si_pmu_regcontrol(pi->sh->sih, 0, 0xf, 0x9); | 3713 | si_pmu_regcontrol(pi->sh->sih, 0, 0xf, 0x9); |
3713 | 3714 | ||
@@ -4808,7 +4809,7 @@ static bool wlc_phy_txpwr_srom_read_lcnphy(struct brcms_phy *pi) | |||
4808 | pi_lcn->lcnphy_freqoffset_corr = | 4809 | pi_lcn->lcnphy_freqoffset_corr = |
4809 | (u8) PHY_GETINTVAR(pi, "freqoffset_corr"); | 4810 | (u8) PHY_GETINTVAR(pi, "freqoffset_corr"); |
4810 | if ((u8) getintvar(pi->vars, "aa2g") > 1) | 4811 | if ((u8) getintvar(pi->vars, "aa2g") > 1) |
4811 | wlc_phy_ant_rxdiv_set((wlc_phy_t *) pi, | 4812 | wlc_phy_ant_rxdiv_set((struct brcms_phy_pub *) pi, |
4812 | (u8) getintvar(pi->vars, | 4813 | (u8) getintvar(pi->vars, |
4813 | "aa2g")); | 4814 | "aa2g")); |
4814 | } | 4815 | } |
diff --git a/drivers/staging/brcm80211/brcmsmac/phy/phy_n.c b/drivers/staging/brcm80211/brcmsmac/phy/phy_n.c index 6e2417e9e44..bc66c7fbb01 100644 --- a/drivers/staging/brcm80211/brcmsmac/phy/phy_n.c +++ b/drivers/staging/brcm80211/brcmsmac/phy/phy_n.c | |||
@@ -14194,7 +14194,7 @@ static void wlc_phy_runsamples_nphy(struct brcms_phy *pi, u16 n, u16 lps, | |||
14194 | u16 wait, u8 iq, u8 dac_test_mode, | 14194 | u16 wait, u8 iq, u8 dac_test_mode, |
14195 | bool modify_bbmult); | 14195 | bool modify_bbmult); |
14196 | 14196 | ||
14197 | bool wlc_phy_bist_check_phy(wlc_phy_t *pih) | 14197 | bool wlc_phy_bist_check_phy(struct brcms_phy_pub *pih) |
14198 | { | 14198 | { |
14199 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 14199 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
14200 | u32 phybist0, phybist1, phybist2, phybist3, phybist4; | 14200 | u32 phybist0, phybist1, phybist2, phybist3, phybist4; |
@@ -14832,7 +14832,7 @@ void WLBANDINITFN(wlc_phy_init_nphy) (struct brcms_phy *pi) | |||
14832 | } | 14832 | } |
14833 | 14833 | ||
14834 | if (pi->sh->phyrxchain != 0x3) { | 14834 | if (pi->sh->phyrxchain != 0x3) { |
14835 | wlc_phy_rxcore_setstate_nphy((wlc_phy_t *) pi, | 14835 | wlc_phy_rxcore_setstate_nphy((struct brcms_phy_pub *) pi, |
14836 | pi->sh->phyrxchain); | 14836 | pi->sh->phyrxchain); |
14837 | } | 14837 | } |
14838 | 14838 | ||
@@ -14871,7 +14871,8 @@ void WLBANDINITFN(wlc_phy_init_nphy) (struct brcms_phy *pi) | |||
14871 | target_gain = wlc_phy_get_tx_gain_nphy(pi); | 14871 | target_gain = wlc_phy_get_tx_gain_nphy(pi); |
14872 | 14872 | ||
14873 | if (pi->antsel_type == ANTSEL_2x3) | 14873 | if (pi->antsel_type == ANTSEL_2x3) |
14874 | wlc_phy_antsel_init((wlc_phy_t *) pi, true); | 14874 | wlc_phy_antsel_init((struct brcms_phy_pub *) pi, |
14875 | true); | ||
14875 | 14876 | ||
14876 | if (pi->nphy_perical != PHY_PERICAL_MPHASE) { | 14877 | if (pi->nphy_perical != PHY_PERICAL_MPHASE) { |
14877 | wlc_phy_rssi_cal_nphy(pi); | 14878 | wlc_phy_rssi_cal_nphy(pi); |
@@ -14901,7 +14902,7 @@ void WLBANDINITFN(wlc_phy_init_nphy) (struct brcms_phy *pi) | |||
14901 | } else if (pi->mphase_cal_phase_id == | 14902 | } else if (pi->mphase_cal_phase_id == |
14902 | MPHASE_CAL_STATE_IDLE) { | 14903 | MPHASE_CAL_STATE_IDLE) { |
14903 | 14904 | ||
14904 | wlc_phy_cal_perical((wlc_phy_t *) pi, | 14905 | wlc_phy_cal_perical((struct brcms_phy_pub *) pi, |
14905 | PHY_PERICAL_PHYINIT); | 14906 | PHY_PERICAL_PHYINIT); |
14906 | } | 14907 | } |
14907 | } else { | 14908 | } else { |
@@ -15024,7 +15025,7 @@ void wlc_phy_stf_chain_upd_nphy(struct brcms_phy *pi) | |||
15024 | } | 15025 | } |
15025 | } | 15026 | } |
15026 | 15027 | ||
15027 | void wlc_phy_rxcore_setstate_nphy(wlc_phy_t *pih, u8 rxcore_bitmask) | 15028 | void wlc_phy_rxcore_setstate_nphy(struct brcms_phy_pub *pih, u8 rxcore_bitmask) |
15028 | { | 15029 | { |
15029 | u16 regval; | 15030 | u16 regval; |
15030 | u16 tbl_buf[16]; | 15031 | u16 tbl_buf[16]; |
@@ -15105,7 +15106,7 @@ void wlc_phy_rxcore_setstate_nphy(wlc_phy_t *pih, u8 rxcore_bitmask) | |||
15105 | wlapi_enable_mac(pi->sh->physhim); | 15106 | wlapi_enable_mac(pi->sh->physhim); |
15106 | } | 15107 | } |
15107 | 15108 | ||
15108 | u8 wlc_phy_rxcore_getstate_nphy(wlc_phy_t *pih) | 15109 | u8 wlc_phy_rxcore_getstate_nphy(struct brcms_phy_pub *pih) |
15109 | { | 15110 | { |
15110 | u16 regval, rxen_bits; | 15111 | u16 regval, rxen_bits; |
15111 | struct brcms_phy *pi = (struct brcms_phy *) pih; | 15112 | struct brcms_phy *pi = (struct brcms_phy *) pih; |
@@ -17281,14 +17282,14 @@ void wlc_phy_switch_radio_nphy(struct brcms_phy *pi, bool on) | |||
17281 | wlc_phy_radio_postinit_2057(pi); | 17282 | wlc_phy_radio_postinit_2057(pi); |
17282 | } | 17283 | } |
17283 | 17284 | ||
17284 | wlc_phy_chanspec_set((wlc_phy_t *) pi, | 17285 | wlc_phy_chanspec_set((struct brcms_phy_pub *) pi, |
17285 | pi->radio_chanspec); | 17286 | pi->radio_chanspec); |
17286 | } else if (NREV_GE(pi->pubpi.phy_rev, 3)) { | 17287 | } else if (NREV_GE(pi->pubpi.phy_rev, 3)) { |
17287 | wlc_phy_radio_preinit_205x(pi); | 17288 | wlc_phy_radio_preinit_205x(pi); |
17288 | wlc_phy_radio_init_2056(pi); | 17289 | wlc_phy_radio_init_2056(pi); |
17289 | wlc_phy_radio_postinit_2056(pi); | 17290 | wlc_phy_radio_postinit_2056(pi); |
17290 | 17291 | ||
17291 | wlc_phy_chanspec_set((wlc_phy_t *) pi, | 17292 | wlc_phy_chanspec_set((struct brcms_phy_pub *) pi, |
17292 | pi->radio_chanspec); | 17293 | pi->radio_chanspec); |
17293 | } else { | 17294 | } else { |
17294 | wlc_phy_radio_preinit_2055(pi); | 17295 | wlc_phy_radio_preinit_2055(pi); |
@@ -17406,7 +17407,7 @@ static void wlc_phy_radio_postinit_2055(struct brcms_phy *pi) | |||
17406 | and_radio_reg(pi, RADIO_2055_CAL_LPO_CNTRL, | 17407 | and_radio_reg(pi, RADIO_2055_CAL_LPO_CNTRL, |
17407 | ~(RADIO_2055_CAL_LPO_ENABLE)); | 17408 | ~(RADIO_2055_CAL_LPO_ENABLE)); |
17408 | 17409 | ||
17409 | wlc_phy_chanspec_set((wlc_phy_t *) pi, pi->radio_chanspec); | 17410 | wlc_phy_chanspec_set((struct brcms_phy_pub *) pi, pi->radio_chanspec); |
17410 | 17411 | ||
17411 | write_radio_reg(pi, RADIO_2055_CORE1_RXBB_LPF, 9); | 17412 | write_radio_reg(pi, RADIO_2055_CORE1_RXBB_LPF, 9); |
17412 | write_radio_reg(pi, RADIO_2055_CORE2_RXBB_LPF, 9); | 17413 | write_radio_reg(pi, RADIO_2055_CORE2_RXBB_LPF, 9); |
@@ -19065,7 +19066,7 @@ void wlc_phy_chanspec_set_nphy(struct brcms_phy *pi, chanspec_t chanspec) | |||
19065 | (pi, CHSPEC_CHANNEL(chanspec), &freq, &t0, &t1, &t2, &t3)) | 19066 | (pi, CHSPEC_CHANNEL(chanspec), &freq, &t0, &t1, &t2, &t3)) |
19066 | return; | 19067 | return; |
19067 | 19068 | ||
19068 | wlc_phy_chanspec_radio_set((wlc_phy_t *) pi, chanspec); | 19069 | wlc_phy_chanspec_radio_set((struct brcms_phy_pub *) pi, chanspec); |
19069 | 19070 | ||
19070 | if (CHSPEC_BW(chanspec) != pi->bw) | 19071 | if (CHSPEC_BW(chanspec) != pi->bw) |
19071 | wlapi_bmac_bw_set(pi->sh->physhim, CHSPEC_BW(chanspec)); | 19072 | wlapi_bmac_bw_set(pi->sh->physhim, CHSPEC_BW(chanspec)); |
@@ -19480,7 +19481,7 @@ static void wlc_phy_restorecal_nphy(struct brcms_phy *pi) | |||
19480 | } | 19481 | } |
19481 | } | 19482 | } |
19482 | 19483 | ||
19483 | void wlc_phy_antsel_init(wlc_phy_t *ppi, bool lut_init) | 19484 | void wlc_phy_antsel_init(struct brcms_phy_pub *ppi, bool lut_init) |
19484 | { | 19485 | { |
19485 | struct brcms_phy *pi = (struct brcms_phy *) ppi; | 19486 | struct brcms_phy *pi = (struct brcms_phy *) ppi; |
19486 | u16 mask = 0xfc00; | 19487 | u16 mask = 0xfc00; |
@@ -21784,7 +21785,8 @@ static void wlc_phy_rssi_cal_nphy_rev3(struct brcms_phy *pi) | |||
21784 | } | 21785 | } |
21785 | } | 21786 | } |
21786 | 21787 | ||
21787 | rxcore_state = wlc_phy_rxcore_getstate_nphy((wlc_phy_t *) pi); | 21788 | rxcore_state = wlc_phy_rxcore_getstate_nphy( |
21789 | (struct brcms_phy_pub *) pi); | ||
21788 | 21790 | ||
21789 | vcm_level_max = 8; | 21791 | vcm_level_max = 8; |
21790 | 21792 | ||
@@ -23774,7 +23776,7 @@ void wlc_phy_cal_perical_nphy_run(struct brcms_phy *pi, u8 caltype) | |||
23774 | 23776 | ||
23775 | wlapi_suspend_mac_and_wait(pi->sh->physhim); | 23777 | wlapi_suspend_mac_and_wait(pi->sh->physhim); |
23776 | 23778 | ||
23777 | wlc_phyreg_enter((wlc_phy_t *) pi); | 23779 | wlc_phyreg_enter((struct brcms_phy_pub *) pi); |
23778 | 23780 | ||
23779 | if ((pi->mphase_cal_phase_id == MPHASE_CAL_STATE_IDLE) || | 23781 | if ((pi->mphase_cal_phase_id == MPHASE_CAL_STATE_IDLE) || |
23780 | (pi->mphase_cal_phase_id == MPHASE_CAL_STATE_INIT)) { | 23782 | (pi->mphase_cal_phase_id == MPHASE_CAL_STATE_INIT)) { |
@@ -23797,7 +23799,7 @@ void wlc_phy_cal_perical_nphy_run(struct brcms_phy *pi, u8 caltype) | |||
23797 | wlc_phy_txpwrctrl_enable_nphy(pi, PHY_TPC_HW_OFF); | 23799 | wlc_phy_txpwrctrl_enable_nphy(pi, PHY_TPC_HW_OFF); |
23798 | 23800 | ||
23799 | if (pi->antsel_type == ANTSEL_2x3) | 23801 | if (pi->antsel_type == ANTSEL_2x3) |
23800 | wlc_phy_antsel_init((wlc_phy_t *) pi, true); | 23802 | wlc_phy_antsel_init((struct brcms_phy_pub *) pi, true); |
23801 | 23803 | ||
23802 | mphase = (pi->mphase_cal_phase_id != MPHASE_CAL_STATE_IDLE); | 23804 | mphase = (pi->mphase_cal_phase_id != MPHASE_CAL_STATE_IDLE); |
23803 | if (!mphase) { | 23805 | if (!mphase) { |
@@ -23814,12 +23816,12 @@ void wlc_phy_cal_perical_nphy_run(struct brcms_phy *pi, u8 caltype) | |||
23814 | if (PHY_IPA(pi)) | 23816 | if (PHY_IPA(pi)) |
23815 | wlc_phy_a4(pi, true); | 23817 | wlc_phy_a4(pi, true); |
23816 | 23818 | ||
23817 | wlc_phyreg_exit((wlc_phy_t *) pi); | 23819 | wlc_phyreg_exit((struct brcms_phy_pub *) pi); |
23818 | wlapi_enable_mac(pi->sh->physhim); | 23820 | wlapi_enable_mac(pi->sh->physhim); |
23819 | wlapi_bmac_write_shm(pi->sh->physhim, M_CTS_DURATION, | 23821 | wlapi_bmac_write_shm(pi->sh->physhim, M_CTS_DURATION, |
23820 | 10000); | 23822 | 10000); |
23821 | wlapi_suspend_mac_and_wait(pi->sh->physhim); | 23823 | wlapi_suspend_mac_and_wait(pi->sh->physhim); |
23822 | wlc_phyreg_enter((wlc_phy_t *) pi); | 23824 | wlc_phyreg_enter((struct brcms_phy_pub *) pi); |
23823 | 23825 | ||
23824 | if (0 == wlc_phy_cal_rxiq_nphy(pi, target_gain, | 23826 | if (0 == wlc_phy_cal_rxiq_nphy(pi, target_gain, |
23825 | (pi-> | 23827 | (pi-> |
@@ -23984,7 +23986,7 @@ void wlc_phy_cal_perical_nphy_run(struct brcms_phy *pi, u8 caltype) | |||
23984 | } | 23986 | } |
23985 | 23987 | ||
23986 | wlc_phy_txpwrctrl_enable_nphy(pi, tx_pwr_ctrl_state); | 23988 | wlc_phy_txpwrctrl_enable_nphy(pi, tx_pwr_ctrl_state); |
23987 | wlc_phyreg_exit((wlc_phy_t *) pi); | 23989 | wlc_phyreg_exit((struct brcms_phy_pub *) pi); |
23988 | wlapi_enable_mac(pi->sh->physhim); | 23990 | wlapi_enable_mac(pi->sh->physhim); |
23989 | } | 23991 | } |
23990 | 23992 | ||
@@ -25694,7 +25696,8 @@ static int wlc_phy_cal_rxiq_nphy_rev3(struct brcms_phy *pi, | |||
25694 | 25696 | ||
25695 | wlc_phy_table_write_nphy(pi, NPHY_TBL_ID_RFSEQ, 2, 0x110, 16, cal_gain); | 25697 | wlc_phy_table_write_nphy(pi, NPHY_TBL_ID_RFSEQ, 2, 0x110, 16, cal_gain); |
25696 | 25698 | ||
25697 | rxcore_state = wlc_phy_rxcore_getstate_nphy((wlc_phy_t *) pi); | 25699 | rxcore_state = wlc_phy_rxcore_getstate_nphy( |
25700 | (struct brcms_phy_pub *) pi); | ||
25698 | 25701 | ||
25699 | for (rx_core = 0; rx_core < pi->pubpi.phy_corenum; rx_core++) { | 25702 | for (rx_core = 0; rx_core < pi->pubpi.phy_corenum; rx_core++) { |
25700 | 25703 | ||
@@ -25729,8 +25732,8 @@ static int wlc_phy_cal_rxiq_nphy_rev3(struct brcms_phy *pi, | |||
25729 | if (rx_core == PHY_CORE_1) { | 25732 | if (rx_core == PHY_CORE_1) { |
25730 | 25733 | ||
25731 | if (rxcore_state == 1) { | 25734 | if (rxcore_state == 1) { |
25732 | wlc_phy_rxcore_setstate_nphy((wlc_phy_t | 25735 | wlc_phy_rxcore_setstate_nphy( |
25733 | *) pi, 3); | 25736 | (struct brcms_phy_pub *) pi, 3); |
25734 | } | 25737 | } |
25735 | 25738 | ||
25736 | wlc_phy_rxcal_gainctrl_nphy(pi, rx_core, NULL, | 25739 | wlc_phy_rxcal_gainctrl_nphy(pi, rx_core, NULL, |
@@ -25741,9 +25744,9 @@ static int wlc_phy_cal_rxiq_nphy_rev3(struct brcms_phy *pi, | |||
25741 | pi->nphy_rccal_value = best_rccal[rx_core]; | 25744 | pi->nphy_rccal_value = best_rccal[rx_core]; |
25742 | 25745 | ||
25743 | if (rxcore_state == 1) { | 25746 | if (rxcore_state == 1) { |
25744 | wlc_phy_rxcore_setstate_nphy((wlc_phy_t | 25747 | wlc_phy_rxcore_setstate_nphy( |
25745 | *) pi, | 25748 | (struct brcms_phy_pub *) pi, |
25746 | rxcore_state); | 25749 | rxcore_state); |
25747 | } | 25750 | } |
25748 | } | 25751 | } |
25749 | } | 25752 | } |
diff --git a/drivers/staging/brcm80211/brcmsmac/stf.c b/drivers/staging/brcm80211/brcmsmac/stf.c index d83d3a301f7..3d5979b87b5 100644 --- a/drivers/staging/brcm80211/brcmsmac/stf.c +++ b/drivers/staging/brcm80211/brcmsmac/stf.c | |||
@@ -72,7 +72,7 @@ static void brcms_c_stf_stbc_rx_ht_update(struct brcms_c_info *wlc, int val) | |||
72 | /* every WLC_TEMPSENSE_PERIOD seconds temperature check to decide whether to turn on/off txchain */ | 72 | /* every WLC_TEMPSENSE_PERIOD seconds temperature check to decide whether to turn on/off txchain */ |
73 | void brcms_c_tempsense_upd(struct brcms_c_info *wlc) | 73 | void brcms_c_tempsense_upd(struct brcms_c_info *wlc) |
74 | { | 74 | { |
75 | wlc_phy_t *pi = wlc->band->pi; | 75 | struct brcms_phy_pub *pi = wlc->band->pi; |
76 | uint active_chains, txchain; | 76 | uint active_chains, txchain; |
77 | 77 | ||
78 | /* Check if the chip is too hot. Disable one Tx chain, if it is */ | 78 | /* Check if the chip is too hot. Disable one Tx chain, if it is */ |
diff --git a/drivers/staging/brcm80211/brcmsmac/types.h b/drivers/staging/brcm80211/brcmsmac/types.h index 32eb42981a8..9e9fe564ea1 100644 --- a/drivers/staging/brcm80211/brcmsmac/types.h +++ b/drivers/staging/brcm80211/brcmsmac/types.h | |||
@@ -385,7 +385,6 @@ typedef struct brcms_rateset wlc_rateset_t; | |||
385 | typedef u32 ratespec_t; | 385 | typedef u32 ratespec_t; |
386 | typedef struct tx_power tx_power_t; | 386 | typedef struct tx_power tx_power_t; |
387 | typedef struct chanvec chanvec_t; | 387 | typedef struct chanvec chanvec_t; |
388 | typedef struct phy_pub wlc_phy_t; | ||
389 | typedef s32 fixed; | 388 | typedef s32 fixed; |
390 | typedef struct _cs32 cs32; | 389 | typedef struct _cs32 cs32; |
391 | typedef volatile union pmqreg pmqreg_t; | 390 | typedef volatile union pmqreg pmqreg_t; |