aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/wl1271_conf.h
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2010-02-18 06:25:42 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-02-19 15:52:43 -0500
commit152ee6e09e2ce54d7d1cc9d338b82c0bf3cbbc95 (patch)
treed6f9ffed8d59cc257f2dfd884337f946a212ea3b /drivers/net/wireless/wl12xx/wl1271_conf.h
parentc6999d831ab9ae5e368b20f3bc11b0ca9c17a7ec (diff)
wl1271: Use NVS INI file configuration
Replace the hardcoded general and radio parameter configuration in the driver with configuration taken from the NVS file directly. Also remove the driver dependency to the structures with the parameter data. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_conf.h')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_conf.h144
1 files changed, 3 insertions, 141 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_conf.h b/drivers/net/wireless/wl12xx/wl1271_conf.h
index 1993d63c214e..6f9e75cc5640 100644
--- a/drivers/net/wireless/wl12xx/wl1271_conf.h
+++ b/drivers/net/wireless/wl12xx/wl1271_conf.h
@@ -735,81 +735,6 @@ enum single_dual_band_enum {
735 CONF_DUAL_BAND 735 CONF_DUAL_BAND
736}; 736};
737 737
738
739#define CONF_MAX_SMART_REFLEX_PARAMS 16
740
741struct conf_general_parms {
742 /*
743 * RF Reference Clock type / speed
744 *
745 * Range: CONF_REF_CLK_*
746 */
747 u8 ref_clk;
748
749 /*
750 * Settling time of the reference clock after boot.
751 *
752 * Range: u8
753 */
754 u8 settling_time;
755
756 /*
757 * Flag defining whether clock is valid on wakeup.
758 *
759 * Range: 0 - not valid on wakeup, 1 - valid on wakeup
760 */
761 u8 clk_valid_on_wakeup;
762
763 /*
764 * DC-to-DC mode.
765 *
766 * Range: Unknown
767 */
768 u8 dc2dcmode;
769
770 /*
771 * Flag defining whether used as single or dual-band.
772 *
773 * Range: CONF_SINGLE_BAND, CONF_DUAL_BAND
774 */
775 u8 single_dual_band;
776
777 /*
778 * TX bip fem autodetect flag.
779 *
780 * Range: Unknown
781 */
782 u8 tx_bip_fem_autodetect;
783
784 /*
785 * TX bip gem manufacturer.
786 *
787 * Range: Unknown
788 */
789 u8 tx_bip_fem_manufacturer;
790
791 /*
792 * Settings flags.
793 *
794 * Range: Unknown
795 */
796 u8 settings;
797
798 /* Smart reflex settings */
799 u8 sr_state;
800
801 s8 srf1[CONF_MAX_SMART_REFLEX_PARAMS];
802 s8 srf2[CONF_MAX_SMART_REFLEX_PARAMS];
803 s8 srf3[CONF_MAX_SMART_REFLEX_PARAMS];
804
805 s8 sr_debug_table[CONF_MAX_SMART_REFLEX_PARAMS];
806
807 u8 sr_sen_n_p;
808 u8 sr_sen_n_p_gain;
809 u8 sr_sen_nrn;
810 u8 sr_sen_prn;
811};
812
813#define CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE 15 738#define CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE 15
814#define CONF_NUMBER_OF_SUB_BANDS_5 7 739#define CONF_NUMBER_OF_SUB_BANDS_5 7
815#define CONF_NUMBER_OF_RATE_GROUPS 6 740#define CONF_NUMBER_OF_RATE_GROUPS 6
@@ -818,78 +743,15 @@ struct conf_general_parms {
818 743
819struct conf_radio_parms { 744struct conf_radio_parms {
820 /* 745 /*
821 * Static radio parameters for 2.4GHz 746 * FEM parameter set to use
822 *
823 * Range: unknown
824 */
825 u8 rx_trace_loss;
826 u8 tx_trace_loss;
827 s8 rx_rssi_and_proc_compens[CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE];
828
829 /*
830 * Static radio parameters for 5GHz
831 *
832 * Range: unknown
833 */
834 u8 rx_trace_loss_5[CONF_NUMBER_OF_SUB_BANDS_5];
835 u8 tx_trace_loss_5[CONF_NUMBER_OF_SUB_BANDS_5];
836 s8 rx_rssi_and_proc_compens_5[CONF_RSSI_AND_PROCESS_COMPENSATION_SIZE];
837
838 /*
839 * Dynamic radio parameters for 2.4GHz
840 * 747 *
841 * Range: unknown 748 * Range: 0 or 1
842 */ 749 */
843 u16 tx_ref_pd_voltage; 750 u8 fem;
844 u8 tx_ref_power;
845 s8 tx_offset_db;
846
847 s8 tx_rate_limits_normal[CONF_NUMBER_OF_RATE_GROUPS];
848 s8 tx_rate_limits_degraded[CONF_NUMBER_OF_RATE_GROUPS];
849 s8 tx_rate_limits_extreme[CONF_NUMBER_OF_RATE_GROUPS];
850
851 s8 tx_channel_limits_11b[CONF_NUMBER_OF_CHANNELS_2_4];
852 s8 tx_channel_limits_ofdm[CONF_NUMBER_OF_CHANNELS_2_4];
853 s8 tx_pdv_rate_offsets[CONF_NUMBER_OF_RATE_GROUPS];
854
855 u8 tx_ibias[CONF_NUMBER_OF_RATE_GROUPS];
856 u8 rx_fem_insertion_loss;
857
858 u8 degraded_low_to_normal_threshold;
859 u8 degraded_normal_to_high_threshold;
860
861
862 /*
863 * Dynamic radio parameters for 5GHz
864 *
865 * Range: unknown
866 */
867 u16 tx_ref_pd_voltage_5[CONF_NUMBER_OF_SUB_BANDS_5];
868 u8 tx_ref_power_5[CONF_NUMBER_OF_SUB_BANDS_5];
869 s8 tx_offset_db_5[CONF_NUMBER_OF_SUB_BANDS_5];
870
871 s8 tx_rate_limits_normal_5[CONF_NUMBER_OF_RATE_GROUPS];
872 s8 tx_rate_limits_degraded_5[CONF_NUMBER_OF_RATE_GROUPS];
873 s8 tx_rate_limits_extreme_5[CONF_NUMBER_OF_RATE_GROUPS];
874
875 s8 tx_channel_limits_ofdm_5[CONF_NUMBER_OF_CHANNELS_5];
876 s8 tx_pdv_rate_offsets_5[CONF_NUMBER_OF_RATE_GROUPS];
877
878 /* FIXME: this is inconsistent with the types for 2.4GHz */
879 s8 tx_ibias_5[CONF_NUMBER_OF_RATE_GROUPS];
880 s8 rx_fem_insertion_loss_5[CONF_NUMBER_OF_SUB_BANDS_5];
881
882 u8 degraded_low_to_normal_threshold_5;
883 u8 degraded_normal_to_high_threshold_5;
884}; 751};
885 752
886struct conf_init_settings { 753struct conf_init_settings {
887 /* 754 /*
888 * Configure general parameters.
889 */
890 struct conf_general_parms genparam;
891
892 /*
893 * Configure radio parameters. 755 * Configure radio parameters.
894 */ 756 */
895 struct conf_radio_parms radioparam; 757 struct conf_radio_parms radioparam;