aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/brcm80211/brcmsmac/phy/phy_int.h
diff options
context:
space:
mode:
authorRoland Vossen <rvossen@broadcom.com>2011-06-09 10:44:41 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-06-28 16:02:37 -0400
commit939e1ef5d92920b2056c5d63618c8f998ae942e9 (patch)
tree3578d4bfe1de8c10dab7c40a25fda600fe302e9a /drivers/staging/brcm80211/brcmsmac/phy/phy_int.h
parentdc5a18941b4226846f0c5994e4f45bc685f7bcfe (diff)
staging: brcm80211: moved typedefs to decrease header file dependencies
Code cleanup. Moved the typedefs to brcmsmac/types.h for source files that only require opaque pointer definitions. Next patches will decrease the number of #includes for each file. Signed-off-by: Roland Vossen <rvossen@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/brcm80211/brcmsmac/phy/phy_int.h')
-rw-r--r--drivers/staging/brcm80211/brcmsmac/phy/phy_int.h88
1 files changed, 40 insertions, 48 deletions
diff --git a/drivers/staging/brcm80211/brcmsmac/phy/phy_int.h b/drivers/staging/brcm80211/brcmsmac/phy/phy_int.h
index f3fddfcf604..48149a7d3e8 100644
--- a/drivers/staging/brcm80211/brcmsmac/phy/phy_int.h
+++ b/drivers/staging/brcm80211/brcmsmac/phy/phy_int.h
@@ -43,16 +43,15 @@ extern u32 phyhal_msg_level;
43 43
44#define LCNXN_BASEREV 16 44#define LCNXN_BASEREV 16
45 45
46typedef struct { 46struct wlc_phy_srom_fem {
47 u8 tssipos; /* TSSI positive slope, 1: positive, 0: negative */ 47 u8 tssipos; /* TSSI positive slope, 1: positive, 0: negative */
48 u8 extpagain; /* Ext PA gain-type: full-gain: 0, pa-lite: 1, no_pa: 2 */ 48 u8 extpagain; /* Ext PA gain-type: full-gain: 0, pa-lite: 1, no_pa: 2 */
49 u8 pdetrange; /* support 32 combinations of different Pdet dynamic ranges */ 49 u8 pdetrange; /* support 32 combinations of different Pdet dynamic ranges */
50 u8 triso; /* TR switch isolation */ 50 u8 triso; /* TR switch isolation */
51 u8 antswctrllut; /* antswctrl lookup table configuration: 32 possible choices */ 51 u8 antswctrllut; /* antswctrl lookup table configuration: 32 possible choices */
52} wlc_phy_srom_fem_t; 52};
53 53
54struct wlc_hw_info; 54struct wlc_hw_info;
55typedef struct phy_info phy_info_t;
56typedef void (*initfn_t) (phy_info_t *); 55typedef void (*initfn_t) (phy_info_t *);
57typedef void (*chansetfn_t) (phy_info_t *, chanspec_t); 56typedef void (*chansetfn_t) (phy_info_t *, chanspec_t);
58typedef int (*longtrnfn_t) (phy_info_t *, int); 57typedef int (*longtrnfn_t) (phy_info_t *, int);
@@ -224,7 +223,7 @@ enum {
224 MPHASE_CAL_STATE_IDLETSSI 223 MPHASE_CAL_STATE_IDLETSSI
225}; 224};
226 225
227typedef enum { 226enum phy_cal_mode {
228 CAL_FULL, 227 CAL_FULL,
229 CAL_RECAL, 228 CAL_RECAL,
230 CAL_CURRECAL, 229 CAL_CURRECAL,
@@ -232,7 +231,7 @@ typedef enum {
232 CAL_GCTRL, 231 CAL_GCTRL,
233 CAL_SOFT, 232 CAL_SOFT,
234 CAL_DIGLO 233 CAL_DIGLO
235} phy_cal_mode_t; 234};
236 235
237#define RDR_NTIERS 1 236#define RDR_NTIERS 1
238#define RDR_TIER_SIZE 64 237#define RDR_TIER_SIZE 64
@@ -294,21 +293,21 @@ typedef enum {
294#define PHY_LTRN_LIST_LEN 64 293#define PHY_LTRN_LIST_LEN 64
295extern u16 ltrn_list[PHY_LTRN_LIST_LEN]; 294extern u16 ltrn_list[PHY_LTRN_LIST_LEN];
296 295
297typedef struct _phy_table_info { 296struct phy_table_info {
298 uint table; 297 uint table;
299 int q; 298 int q;
300 uint max; 299 uint max;
301} phy_table_info_t; 300};
302 301
303typedef struct phytbl_info { 302struct phytbl_info {
304 const void *tbl_ptr; 303 const void *tbl_ptr;
305 u32 tbl_len; 304 u32 tbl_len;
306 u32 tbl_id; 305 u32 tbl_id;
307 u32 tbl_offset; 306 u32 tbl_offset;
308 u32 tbl_width; 307 u32 tbl_width;
309} phytbl_info_t; 308};
310 309
311typedef struct { 310struct interference_info {
312 u8 curr_home_channel; 311 u8 curr_home_channel;
313 u16 crsminpwrthld_40_stored; 312 u16 crsminpwrthld_40_stored;
314 u16 crsminpwrthld_20L_stored; 313 u16 crsminpwrthld_20L_stored;
@@ -378,10 +377,9 @@ typedef struct {
378 u16 radio_2057_core2_rssi_wb2_gc_stored; 377 u16 radio_2057_core2_rssi_wb2_gc_stored;
379 u16 radio_2057_core1_rssi_nb_gc_stored; 378 u16 radio_2057_core1_rssi_nb_gc_stored;
380 u16 radio_2057_core2_rssi_nb_gc_stored; 379 u16 radio_2057_core2_rssi_nb_gc_stored;
380};
381 381
382} interference_info_t; 382struct aci_save_gphy {
383
384typedef struct {
385 u16 rc_cal_ovr; 383 u16 rc_cal_ovr;
386 u16 phycrsth1; 384 u16 phycrsth1;
387 u16 phycrsth2; 385 u16 phycrsth2;
@@ -415,21 +413,21 @@ typedef struct {
415 u16 div_srch_gn_back; 413 u16 div_srch_gn_back;
416 u16 ant_dwell; 414 u16 ant_dwell;
417 u16 ant_wr_settle; 415 u16 ant_wr_settle;
418} aci_save_gphy_t; 416};
419 417
420typedef struct _lo_complex_t { 418struct lo_complex_abgphy_info {
421 s8 i; 419 s8 i;
422 s8 q; 420 s8 q;
423} lo_complex_abgphy_info_t; 421};
424 422
425typedef struct _nphy_iq_comp { 423struct nphy_iq_comp {
426 s16 a0; 424 s16 a0;
427 s16 b0; 425 s16 b0;
428 s16 a1; 426 s16 a1;
429 s16 b1; 427 s16 b1;
430} nphy_iq_comp_t; 428};
431 429
432typedef struct _nphy_txpwrindex { 430struct nphy_txpwrindex {
433 s8 index; 431 s8 index;
434 s8 index_internal; 432 s8 index_internal;
435 s8 index_internal_save; 433 s8 index_internal_save;
@@ -440,9 +438,9 @@ typedef struct _nphy_txpwrindex {
440 u16 iqcomp_a; 438 u16 iqcomp_a;
441 u16 iqcomp_b; 439 u16 iqcomp_b;
442 u16 locomp; 440 u16 locomp;
443} phy_txpwrindex_t; 441};
444 442
445typedef struct { 443struct txiqcal_cache {
446 444
447 u16 txcal_coeffs_2G[8]; 445 u16 txcal_coeffs_2G[8];
448 u16 txcal_radio_regs_2G[8]; 446 u16 txcal_radio_regs_2G[8];
@@ -451,9 +449,9 @@ typedef struct {
451 u16 txcal_coeffs_5G[8]; 449 u16 txcal_coeffs_5G[8];
452 u16 txcal_radio_regs_5G[8]; 450 u16 txcal_radio_regs_5G[8];
453 nphy_iq_comp_t rxcal_coeffs_5G; 451 nphy_iq_comp_t rxcal_coeffs_5G;
454} txiqcal_cache_t; 452};
455 453
456typedef struct _nphy_pwrctrl { 454struct nphy_pwrctrl {
457 s8 max_pwr_2g; 455 s8 max_pwr_2g;
458 s8 idle_targ_2g; 456 s8 idle_targ_2g;
459 s16 pwrdet_2g_a1; 457 s16 pwrdet_2g_a1;
@@ -480,34 +478,34 @@ typedef struct _nphy_pwrctrl {
480 s16 a1; 478 s16 a1;
481 s16 b0; 479 s16 b0;
482 s16 b1; 480 s16 b1;
483} phy_pwrctrl_t; 481};
484 482
485typedef struct _nphy_txgains { 483struct nphy_txgains {
486 u16 txlpf[2]; 484 u16 txlpf[2];
487 u16 txgm[2]; 485 u16 txgm[2];
488 u16 pga[2]; 486 u16 pga[2];
489 u16 pad[2]; 487 u16 pad[2];
490 u16 ipa[2]; 488 u16 ipa[2];
491} nphy_txgains_t; 489};
492 490
493#define PHY_NOISEVAR_BUFSIZE 10 491#define PHY_NOISEVAR_BUFSIZE 10
494 492
495typedef struct _nphy_noisevar_buf { 493struct nphy_noisevar_buf {
496 int bufcount; 494 int bufcount;
497 int tone_id[PHY_NOISEVAR_BUFSIZE]; 495 int tone_id[PHY_NOISEVAR_BUFSIZE];
498 u32 noise_vars[PHY_NOISEVAR_BUFSIZE]; 496 u32 noise_vars[PHY_NOISEVAR_BUFSIZE];
499 u32 min_noise_vars[PHY_NOISEVAR_BUFSIZE]; 497 u32 min_noise_vars[PHY_NOISEVAR_BUFSIZE];
500} phy_noisevar_buf_t; 498};
501 499
502typedef struct { 500struct rssical_cache {
503 u16 rssical_radio_regs_2G[2]; 501 u16 rssical_radio_regs_2G[2];
504 u16 rssical_phyregs_2G[12]; 502 u16 rssical_phyregs_2G[12];
505 503
506 u16 rssical_radio_regs_5G[2]; 504 u16 rssical_radio_regs_5G[2];
507 u16 rssical_phyregs_5G[12]; 505 u16 rssical_phyregs_5G[12];
508} rssical_cache_t; 506};
509 507
510typedef struct { 508struct lcnphy_cal_results {
511 509
512 u16 txiqlocal_a; 510 u16 txiqlocal_a;
513 u16 txiqlocal_b; 511 u16 txiqlocal_b;
@@ -531,7 +529,7 @@ typedef struct {
531 529
532 u16 rxiqcal_coeff_a0; 530 u16 rxiqcal_coeff_a0;
533 u16 rxiqcal_coeff_b0; 531 u16 rxiqcal_coeff_b0;
534} lcnphy_cal_results_t; 532};
535 533
536struct shared_phy { 534struct shared_phy {
537 struct phy_info *phy_head; 535 struct phy_info *phy_head;
@@ -584,10 +582,7 @@ struct phy_pub {
584}; 582};
585 583
586struct phy_info_nphy; 584struct phy_info_nphy;
587typedef struct phy_info_nphy phy_info_nphy_t;
588
589struct phy_info_lcnphy; 585struct phy_info_lcnphy;
590typedef struct phy_info_lcnphy phy_info_lcnphy_t;
591 586
592struct phy_func_ptr { 587struct phy_func_ptr {
593 initfn_t init; 588 initfn_t init;
@@ -603,7 +598,6 @@ struct phy_func_ptr {
603 rxsigpwrfn_t rxsigpwr; 598 rxsigpwrfn_t rxsigpwr;
604 detachfn_t detach; 599 detachfn_t detach;
605}; 600};
606typedef struct phy_func_ptr phy_func_ptr_t;
607 601
608struct phy_info { 602struct phy_info {
609 wlc_phy_t pubpi_ro; 603 wlc_phy_t pubpi_ro;
@@ -948,34 +942,32 @@ struct phy_info {
948 struct wiphy *wiphy; 942 struct wiphy *wiphy;
949}; 943};
950 944
951typedef s32 fixed; 945struct _cs32 {
952
953typedef struct _cs32 {
954 fixed q; 946 fixed q;
955 fixed i; 947 fixed i;
956} cs32; 948};
957 949
958typedef struct radio_regs { 950struct radio_regs {
959 u16 address; 951 u16 address;
960 u32 init_a; 952 u32 init_a;
961 u32 init_g; 953 u32 init_g;
962 u8 do_init_a; 954 u8 do_init_a;
963 u8 do_init_g; 955 u8 do_init_g;
964} radio_regs_t; 956};
965 957
966typedef struct radio_20xx_regs { 958struct radio_20xx_regs {
967 u16 address; 959 u16 address;
968 u8 init; 960 u8 init;
969 u8 do_init; 961 u8 do_init;
970} radio_20xx_regs_t; 962};
971 963
972typedef struct lcnphy_radio_regs { 964struct lcnphy_radio_regs {
973 u16 address; 965 u16 address;
974 u8 init_a; 966 u8 init_a;
975 u8 init_g; 967 u8 init_g;
976 u8 do_init_a; 968 u8 do_init_a;
977 u8 do_init_g; 969 u8 do_init_g;
978} lcnphy_radio_regs_t; 970};
979 971
980extern lcnphy_radio_regs_t lcnphy_radio_regs_2064[]; 972extern lcnphy_radio_regs_t lcnphy_radio_regs_2064[];
981extern lcnphy_radio_regs_t lcnphy_radio_regs_2066[]; 973extern lcnphy_radio_regs_t lcnphy_radio_regs_2066[];
@@ -1137,11 +1129,11 @@ extern s32 wlc_lcnphy_rx_signal_power(phy_info_t *pi, s32 gain_index);
1137#define NPHY_MAX_HPVGA1_INDEX 10 1129#define NPHY_MAX_HPVGA1_INDEX 10
1138#define NPHY_DEF_HPVGA1_INDEXLIMIT 7 1130#define NPHY_DEF_HPVGA1_INDEXLIMIT 7
1139 1131
1140typedef struct _phy_iq_est { 1132struct phy_iq_est {
1141 s32 iq_prod; 1133 s32 iq_prod;
1142 u32 i_pwr; 1134 u32 i_pwr;
1143 u32 q_pwr; 1135 u32 q_pwr;
1144} phy_iq_est_t; 1136};
1145 1137
1146extern void wlc_phy_stay_in_carriersearch_nphy(phy_info_t *pi, bool enable); 1138extern void wlc_phy_stay_in_carriersearch_nphy(phy_info_t *pi, bool enable);
1147extern void wlc_nphy_deaf_mode(phy_info_t *pi, bool mode); 1139extern void wlc_nphy_deaf_mode(phy_info_t *pi, bool mode);