diff options
author | Shahar Levi <shahar_levi@ti.com> | 2011-03-06 09:32:09 -0500 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-04-19 09:19:48 -0400 |
commit | 49d750ca14cd49e76ab039b33b5a621e0a92b9fd (patch) | |
tree | b3507ef118e00c21a077204c3c0a0f9b760482c7 /drivers/net/wireless/wl12xx | |
parent | a81159edf8d64011933df177ec42f82d7896a0c7 (diff) |
wl12xx: 1281/1283 support - New radio structs and functions
New general and radio parameters structures and functions.
Implemented as separate functions due to auto-detection
between wl127x and wl128x.
Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Reviewed-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx')
-rw-r--r-- | drivers/net/wireless/wl12xx/cmd.c | 86 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/cmd.h | 34 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/ini.h | 96 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/init.c | 18 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 16 |
5 files changed, 240 insertions, 10 deletions
diff --git a/drivers/net/wireless/wl12xx/cmd.c b/drivers/net/wireless/wl12xx/cmd.c index f0aa7ab97bf..37eb9f36694 100644 --- a/drivers/net/wireless/wl12xx/cmd.c +++ b/drivers/net/wireless/wl12xx/cmd.c | |||
@@ -110,7 +110,47 @@ out: | |||
110 | int wl1271_cmd_general_parms(struct wl1271 *wl) | 110 | int wl1271_cmd_general_parms(struct wl1271 *wl) |
111 | { | 111 | { |
112 | struct wl1271_general_parms_cmd *gen_parms; | 112 | struct wl1271_general_parms_cmd *gen_parms; |
113 | struct wl1271_ini_general_params *gp = &wl->nvs->general_params; | 113 | struct wl1271_ini_general_params *gp = |
114 | &((struct wl1271_nvs_file *)wl->nvs)->general_params; | ||
115 | bool answer = false; | ||
116 | int ret; | ||
117 | |||
118 | if (!wl->nvs) | ||
119 | return -ENODEV; | ||
120 | |||
121 | gen_parms = kzalloc(sizeof(*gen_parms), GFP_KERNEL); | ||
122 | if (!gen_parms) | ||
123 | return -ENOMEM; | ||
124 | |||
125 | gen_parms->test.id = TEST_CMD_INI_FILE_GENERAL_PARAM; | ||
126 | |||
127 | memcpy(&gen_parms->general_params, gp, sizeof(*gp)); | ||
128 | |||
129 | if (gp->tx_bip_fem_auto_detect) | ||
130 | answer = true; | ||
131 | |||
132 | ret = wl1271_cmd_test(wl, gen_parms, sizeof(*gen_parms), answer); | ||
133 | if (ret < 0) { | ||
134 | wl1271_warning("CMD_INI_FILE_GENERAL_PARAM failed"); | ||
135 | goto out; | ||
136 | } | ||
137 | |||
138 | gp->tx_bip_fem_manufacturer = | ||
139 | gen_parms->general_params.tx_bip_fem_manufacturer; | ||
140 | |||
141 | wl1271_debug(DEBUG_CMD, "FEM autodetect: %s, manufacturer: %d\n", | ||
142 | answer ? "auto" : "manual", gp->tx_bip_fem_manufacturer); | ||
143 | |||
144 | out: | ||
145 | kfree(gen_parms); | ||
146 | return ret; | ||
147 | } | ||
148 | |||
149 | int wl128x_cmd_general_parms(struct wl1271 *wl) | ||
150 | { | ||
151 | struct wl128x_general_parms_cmd *gen_parms; | ||
152 | struct wl128x_ini_general_params *gp = | ||
153 | &((struct wl128x_nvs_file *)wl->nvs)->general_params; | ||
114 | bool answer = false; | 154 | bool answer = false; |
115 | int ret; | 155 | int ret; |
116 | 156 | ||
@@ -186,6 +226,50 @@ int wl1271_cmd_radio_parms(struct wl1271 *wl) | |||
186 | return ret; | 226 | return ret; |
187 | } | 227 | } |
188 | 228 | ||
229 | int wl128x_cmd_radio_parms(struct wl1271 *wl) | ||
230 | { | ||
231 | struct wl128x_nvs_file *nvs = (struct wl128x_nvs_file *)wl->nvs; | ||
232 | struct wl128x_radio_parms_cmd *radio_parms; | ||
233 | struct wl128x_ini_general_params *gp = &nvs->general_params; | ||
234 | int ret; | ||
235 | |||
236 | if (!wl->nvs) | ||
237 | return -ENODEV; | ||
238 | |||
239 | radio_parms = kzalloc(sizeof(*radio_parms), GFP_KERNEL); | ||
240 | if (!radio_parms) | ||
241 | return -ENOMEM; | ||
242 | |||
243 | radio_parms->test.id = TEST_CMD_INI_FILE_RADIO_PARAM; | ||
244 | |||
245 | /* 2.4GHz parameters */ | ||
246 | memcpy(&radio_parms->static_params_2, &nvs->stat_radio_params_2, | ||
247 | sizeof(struct wl128x_ini_band_params_2)); | ||
248 | memcpy(&radio_parms->dyn_params_2, | ||
249 | &nvs->dyn_radio_params_2[gp->tx_bip_fem_manufacturer].params, | ||
250 | sizeof(struct wl128x_ini_fem_params_2)); | ||
251 | |||
252 | /* 5GHz parameters */ | ||
253 | memcpy(&radio_parms->static_params_5, | ||
254 | &nvs->stat_radio_params_5, | ||
255 | sizeof(struct wl128x_ini_band_params_5)); | ||
256 | memcpy(&radio_parms->dyn_params_5, | ||
257 | &nvs->dyn_radio_params_5[gp->tx_bip_fem_manufacturer].params, | ||
258 | sizeof(struct wl128x_ini_fem_params_5)); | ||
259 | |||
260 | radio_parms->fem_vendor_and_options = nvs->fem_vendor_and_options; | ||
261 | |||
262 | wl1271_dump(DEBUG_CMD, "TEST_CMD_INI_FILE_RADIO_PARAM: ", | ||
263 | radio_parms, sizeof(*radio_parms)); | ||
264 | |||
265 | ret = wl1271_cmd_test(wl, radio_parms, sizeof(*radio_parms), 0); | ||
266 | if (ret < 0) | ||
267 | wl1271_warning("CMD_INI_FILE_RADIO_PARAM failed"); | ||
268 | |||
269 | kfree(radio_parms); | ||
270 | return ret; | ||
271 | } | ||
272 | |||
189 | int wl1271_cmd_ext_radio_parms(struct wl1271 *wl) | 273 | int wl1271_cmd_ext_radio_parms(struct wl1271 *wl) |
190 | { | 274 | { |
191 | struct wl1271_ext_radio_parms_cmd *ext_radio_parms; | 275 | struct wl1271_ext_radio_parms_cmd *ext_radio_parms; |
diff --git a/drivers/net/wireless/wl12xx/cmd.h b/drivers/net/wireless/wl12xx/cmd.h index 54c12e71417..5cac95d9480 100644 --- a/drivers/net/wireless/wl12xx/cmd.h +++ b/drivers/net/wireless/wl12xx/cmd.h | |||
@@ -32,7 +32,9 @@ struct acx_header; | |||
32 | int wl1271_cmd_send(struct wl1271 *wl, u16 id, void *buf, size_t len, | 32 | int wl1271_cmd_send(struct wl1271 *wl, u16 id, void *buf, size_t len, |
33 | size_t res_len); | 33 | size_t res_len); |
34 | int wl1271_cmd_general_parms(struct wl1271 *wl); | 34 | int wl1271_cmd_general_parms(struct wl1271 *wl); |
35 | int wl128x_cmd_general_parms(struct wl1271 *wl); | ||
35 | int wl1271_cmd_radio_parms(struct wl1271 *wl); | 36 | int wl1271_cmd_radio_parms(struct wl1271 *wl); |
37 | int wl128x_cmd_radio_parms(struct wl1271 *wl); | ||
36 | int wl1271_cmd_ext_radio_parms(struct wl1271 *wl); | 38 | int wl1271_cmd_ext_radio_parms(struct wl1271 *wl); |
37 | int wl1271_cmd_join(struct wl1271 *wl, u8 bss_type); | 39 | int wl1271_cmd_join(struct wl1271 *wl, u8 bss_type); |
38 | int wl1271_cmd_test(struct wl1271 *wl, void *buf, size_t buf_len, u8 answer); | 40 | int wl1271_cmd_test(struct wl1271 *wl, void *buf, size_t buf_len, u8 answer); |
@@ -415,6 +417,21 @@ struct wl1271_general_parms_cmd { | |||
415 | u8 padding[3]; | 417 | u8 padding[3]; |
416 | } __packed; | 418 | } __packed; |
417 | 419 | ||
420 | struct wl128x_general_parms_cmd { | ||
421 | struct wl1271_cmd_header header; | ||
422 | |||
423 | struct wl1271_cmd_test_header test; | ||
424 | |||
425 | struct wl128x_ini_general_params general_params; | ||
426 | |||
427 | u8 sr_debug_table[WL1271_INI_MAX_SMART_REFLEX_PARAM]; | ||
428 | u8 sr_sen_n_p; | ||
429 | u8 sr_sen_n_p_gain; | ||
430 | u8 sr_sen_nrn; | ||
431 | u8 sr_sen_prn; | ||
432 | u8 padding[3]; | ||
433 | } __packed; | ||
434 | |||
418 | struct wl1271_radio_parms_cmd { | 435 | struct wl1271_radio_parms_cmd { |
419 | struct wl1271_cmd_header header; | 436 | struct wl1271_cmd_header header; |
420 | 437 | ||
@@ -431,6 +448,23 @@ struct wl1271_radio_parms_cmd { | |||
431 | u8 padding3[2]; | 448 | u8 padding3[2]; |
432 | } __packed; | 449 | } __packed; |
433 | 450 | ||
451 | struct wl128x_radio_parms_cmd { | ||
452 | struct wl1271_cmd_header header; | ||
453 | |||
454 | struct wl1271_cmd_test_header test; | ||
455 | |||
456 | /* Static radio parameters */ | ||
457 | struct wl128x_ini_band_params_2 static_params_2; | ||
458 | struct wl128x_ini_band_params_5 static_params_5; | ||
459 | |||
460 | u8 fem_vendor_and_options; | ||
461 | |||
462 | /* Dynamic radio parameters */ | ||
463 | struct wl128x_ini_fem_params_2 dyn_params_2; | ||
464 | u8 padding2; | ||
465 | struct wl128x_ini_fem_params_5 dyn_params_5; | ||
466 | } __packed; | ||
467 | |||
434 | struct wl1271_ext_radio_parms_cmd { | 468 | struct wl1271_ext_radio_parms_cmd { |
435 | struct wl1271_cmd_header header; | 469 | struct wl1271_cmd_header header; |
436 | 470 | ||
diff --git a/drivers/net/wireless/wl12xx/ini.h b/drivers/net/wireless/wl12xx/ini.h index c330a2583df..30efcd6643b 100644 --- a/drivers/net/wireless/wl12xx/ini.h +++ b/drivers/net/wireless/wl12xx/ini.h | |||
@@ -41,6 +41,28 @@ struct wl1271_ini_general_params { | |||
41 | u8 srf3[WL1271_INI_MAX_SMART_REFLEX_PARAM]; | 41 | u8 srf3[WL1271_INI_MAX_SMART_REFLEX_PARAM]; |
42 | } __packed; | 42 | } __packed; |
43 | 43 | ||
44 | #define WL128X_INI_MAX_SETTINGS_PARAM 4 | ||
45 | |||
46 | struct wl128x_ini_general_params { | ||
47 | u8 ref_clock; | ||
48 | u8 settling_time; | ||
49 | u8 clk_valid_on_wakeup; | ||
50 | u8 tcxo_ref_clock; | ||
51 | u8 tcxo_settling_time; | ||
52 | u8 tcxo_valid_on_wakeup; | ||
53 | u8 tcxo_ldo_voltage; | ||
54 | u8 xtal_itrim_val; | ||
55 | u8 platform_conf; | ||
56 | u8 dual_mode_select; | ||
57 | u8 tx_bip_fem_auto_detect; | ||
58 | u8 tx_bip_fem_manufacturer; | ||
59 | u8 general_settings[WL128X_INI_MAX_SETTINGS_PARAM]; | ||
60 | u8 sr_state; | ||
61 | u8 srf1[WL1271_INI_MAX_SMART_REFLEX_PARAM]; | ||
62 | u8 srf2[WL1271_INI_MAX_SMART_REFLEX_PARAM]; | ||
63 | u8 srf3[WL1271_INI_MAX_SMART_REFLEX_PARAM]; | ||
64 | } __packed; | ||
65 | |||
44 | #define WL1271_INI_RSSI_PROCESS_COMPENS_SIZE 15 | 66 | #define WL1271_INI_RSSI_PROCESS_COMPENS_SIZE 15 |
45 | 67 | ||
46 | struct wl1271_ini_band_params_2 { | 68 | struct wl1271_ini_band_params_2 { |
@@ -49,9 +71,16 @@ struct wl1271_ini_band_params_2 { | |||
49 | u8 rx_rssi_process_compens[WL1271_INI_RSSI_PROCESS_COMPENS_SIZE]; | 71 | u8 rx_rssi_process_compens[WL1271_INI_RSSI_PROCESS_COMPENS_SIZE]; |
50 | } __packed; | 72 | } __packed; |
51 | 73 | ||
52 | #define WL1271_INI_RATE_GROUP_COUNT 6 | ||
53 | #define WL1271_INI_CHANNEL_COUNT_2 14 | 74 | #define WL1271_INI_CHANNEL_COUNT_2 14 |
54 | 75 | ||
76 | struct wl128x_ini_band_params_2 { | ||
77 | u8 rx_trace_insertion_loss; | ||
78 | u8 tx_trace_loss[WL1271_INI_CHANNEL_COUNT_2]; | ||
79 | u8 rx_rssi_process_compens[WL1271_INI_RSSI_PROCESS_COMPENS_SIZE]; | ||
80 | } __packed; | ||
81 | |||
82 | #define WL1271_INI_RATE_GROUP_COUNT 6 | ||
83 | |||
55 | struct wl1271_ini_fem_params_2 { | 84 | struct wl1271_ini_fem_params_2 { |
56 | __le16 tx_bip_ref_pd_voltage; | 85 | __le16 tx_bip_ref_pd_voltage; |
57 | u8 tx_bip_ref_power; | 86 | u8 tx_bip_ref_power; |
@@ -68,6 +97,28 @@ struct wl1271_ini_fem_params_2 { | |||
68 | u8 normal_to_degraded_high_thr; | 97 | u8 normal_to_degraded_high_thr; |
69 | } __packed; | 98 | } __packed; |
70 | 99 | ||
100 | #define WL128X_INI_RATE_GROUP_COUNT 7 | ||
101 | /* low and high temperatures */ | ||
102 | #define WL128X_INI_PD_VS_TEMPERATURE_RANGES 2 | ||
103 | |||
104 | struct wl128x_ini_fem_params_2 { | ||
105 | __le16 tx_bip_ref_pd_voltage; | ||
106 | u8 tx_bip_ref_power; | ||
107 | u8 tx_bip_ref_offset; | ||
108 | u8 tx_per_rate_pwr_limits_normal[WL128X_INI_RATE_GROUP_COUNT]; | ||
109 | u8 tx_per_rate_pwr_limits_degraded[WL128X_INI_RATE_GROUP_COUNT]; | ||
110 | u8 tx_per_rate_pwr_limits_extreme[WL128X_INI_RATE_GROUP_COUNT]; | ||
111 | u8 tx_per_chan_pwr_limits_11b[WL1271_INI_CHANNEL_COUNT_2]; | ||
112 | u8 tx_per_chan_pwr_limits_ofdm[WL1271_INI_CHANNEL_COUNT_2]; | ||
113 | u8 tx_pd_vs_rate_offsets[WL128X_INI_RATE_GROUP_COUNT]; | ||
114 | u8 tx_ibias[WL128X_INI_RATE_GROUP_COUNT + 1]; | ||
115 | u8 tx_pd_vs_chan_offsets[WL1271_INI_CHANNEL_COUNT_2]; | ||
116 | u8 tx_pd_vs_temperature[WL128X_INI_PD_VS_TEMPERATURE_RANGES]; | ||
117 | u8 rx_fem_insertion_loss; | ||
118 | u8 degraded_low_to_normal_thr; | ||
119 | u8 normal_to_degraded_high_thr; | ||
120 | } __packed; | ||
121 | |||
71 | #define WL1271_INI_CHANNEL_COUNT_5 35 | 122 | #define WL1271_INI_CHANNEL_COUNT_5 35 |
72 | #define WL1271_INI_SUB_BAND_COUNT_5 7 | 123 | #define WL1271_INI_SUB_BAND_COUNT_5 7 |
73 | 124 | ||
@@ -77,6 +128,12 @@ struct wl1271_ini_band_params_5 { | |||
77 | u8 rx_rssi_process_compens[WL1271_INI_RSSI_PROCESS_COMPENS_SIZE]; | 128 | u8 rx_rssi_process_compens[WL1271_INI_RSSI_PROCESS_COMPENS_SIZE]; |
78 | } __packed; | 129 | } __packed; |
79 | 130 | ||
131 | struct wl128x_ini_band_params_5 { | ||
132 | u8 rx_trace_insertion_loss[WL1271_INI_SUB_BAND_COUNT_5]; | ||
133 | u8 tx_trace_loss[WL1271_INI_CHANNEL_COUNT_5]; | ||
134 | u8 rx_rssi_process_compens[WL1271_INI_RSSI_PROCESS_COMPENS_SIZE]; | ||
135 | } __packed; | ||
136 | |||
80 | struct wl1271_ini_fem_params_5 { | 137 | struct wl1271_ini_fem_params_5 { |
81 | __le16 tx_bip_ref_pd_voltage[WL1271_INI_SUB_BAND_COUNT_5]; | 138 | __le16 tx_bip_ref_pd_voltage[WL1271_INI_SUB_BAND_COUNT_5]; |
82 | u8 tx_bip_ref_power[WL1271_INI_SUB_BAND_COUNT_5]; | 139 | u8 tx_bip_ref_power[WL1271_INI_SUB_BAND_COUNT_5]; |
@@ -92,6 +149,23 @@ struct wl1271_ini_fem_params_5 { | |||
92 | u8 normal_to_degraded_high_thr; | 149 | u8 normal_to_degraded_high_thr; |
93 | } __packed; | 150 | } __packed; |
94 | 151 | ||
152 | struct wl128x_ini_fem_params_5 { | ||
153 | __le16 tx_bip_ref_pd_voltage[WL1271_INI_SUB_BAND_COUNT_5]; | ||
154 | u8 tx_bip_ref_power[WL1271_INI_SUB_BAND_COUNT_5]; | ||
155 | u8 tx_bip_ref_offset[WL1271_INI_SUB_BAND_COUNT_5]; | ||
156 | u8 tx_per_rate_pwr_limits_normal[WL128X_INI_RATE_GROUP_COUNT]; | ||
157 | u8 tx_per_rate_pwr_limits_degraded[WL128X_INI_RATE_GROUP_COUNT]; | ||
158 | u8 tx_per_rate_pwr_limits_extreme[WL128X_INI_RATE_GROUP_COUNT]; | ||
159 | u8 tx_per_chan_pwr_limits_ofdm[WL1271_INI_CHANNEL_COUNT_5]; | ||
160 | u8 tx_pd_vs_rate_offsets[WL128X_INI_RATE_GROUP_COUNT]; | ||
161 | u8 tx_ibias[WL128X_INI_RATE_GROUP_COUNT]; | ||
162 | u8 tx_pd_vs_chan_offsets[WL1271_INI_CHANNEL_COUNT_5]; | ||
163 | u8 tx_pd_vs_temperature[WL1271_INI_SUB_BAND_COUNT_5 * | ||
164 | WL128X_INI_PD_VS_TEMPERATURE_RANGES]; | ||
165 | u8 rx_fem_insertion_loss[WL1271_INI_SUB_BAND_COUNT_5]; | ||
166 | u8 degraded_low_to_normal_thr; | ||
167 | u8 normal_to_degraded_high_thr; | ||
168 | } __packed; | ||
95 | 169 | ||
96 | /* NVS data structure */ | 170 | /* NVS data structure */ |
97 | #define WL1271_INI_NVS_SECTION_SIZE 468 | 171 | #define WL1271_INI_NVS_SECTION_SIZE 468 |
@@ -120,4 +194,24 @@ struct wl1271_nvs_file { | |||
120 | } dyn_radio_params_5[WL1271_INI_FEM_MODULE_COUNT]; | 194 | } dyn_radio_params_5[WL1271_INI_FEM_MODULE_COUNT]; |
121 | } __packed; | 195 | } __packed; |
122 | 196 | ||
197 | struct wl128x_nvs_file { | ||
198 | /* NVS section */ | ||
199 | u8 nvs[WL1271_INI_NVS_SECTION_SIZE]; | ||
200 | |||
201 | /* INI section */ | ||
202 | struct wl128x_ini_general_params general_params; | ||
203 | u8 fem_vendor_and_options; | ||
204 | struct wl128x_ini_band_params_2 stat_radio_params_2; | ||
205 | u8 padding2; | ||
206 | struct { | ||
207 | struct wl128x_ini_fem_params_2 params; | ||
208 | u8 padding; | ||
209 | } dyn_radio_params_2[WL1271_INI_FEM_MODULE_COUNT]; | ||
210 | struct wl128x_ini_band_params_5 stat_radio_params_5; | ||
211 | u8 padding3; | ||
212 | struct { | ||
213 | struct wl128x_ini_fem_params_5 params; | ||
214 | u8 padding; | ||
215 | } dyn_radio_params_5[WL1271_INI_FEM_MODULE_COUNT]; | ||
216 | } __packed; | ||
123 | #endif | 217 | #endif |
diff --git a/drivers/net/wireless/wl12xx/init.c b/drivers/net/wireless/wl12xx/init.c index 34c41084bcf..2dbc08331ca 100644 --- a/drivers/net/wireless/wl12xx/init.c +++ b/drivers/net/wireless/wl12xx/init.c | |||
@@ -322,9 +322,11 @@ static int wl1271_sta_hw_init(struct wl1271 *wl) | |||
322 | { | 322 | { |
323 | int ret; | 323 | int ret; |
324 | 324 | ||
325 | ret = wl1271_cmd_ext_radio_parms(wl); | 325 | if (wl->chip.id != CHIP_ID_1283_PG20) { |
326 | if (ret < 0) | 326 | ret = wl1271_cmd_ext_radio_parms(wl); |
327 | return ret; | 327 | if (ret < 0) |
328 | return ret; | ||
329 | } | ||
328 | 330 | ||
329 | /* PS config */ | 331 | /* PS config */ |
330 | ret = wl1271_acx_config_ps(wl); | 332 | ret = wl1271_acx_config_ps(wl); |
@@ -533,11 +535,17 @@ int wl1271_hw_init(struct wl1271 *wl) | |||
533 | int ret, i; | 535 | int ret, i; |
534 | bool is_ap = (wl->bss_type == BSS_TYPE_AP_BSS); | 536 | bool is_ap = (wl->bss_type == BSS_TYPE_AP_BSS); |
535 | 537 | ||
536 | ret = wl1271_cmd_general_parms(wl); | 538 | if (wl->chip.id == CHIP_ID_1283_PG20) |
539 | ret = wl128x_cmd_general_parms(wl); | ||
540 | else | ||
541 | ret = wl1271_cmd_general_parms(wl); | ||
537 | if (ret < 0) | 542 | if (ret < 0) |
538 | return ret; | 543 | return ret; |
539 | 544 | ||
540 | ret = wl1271_cmd_radio_parms(wl); | 545 | if (wl->chip.id == CHIP_ID_1283_PG20) |
546 | ret = wl128x_cmd_radio_parms(wl); | ||
547 | else | ||
548 | ret = wl1271_cmd_radio_parms(wl); | ||
541 | if (ret < 0) | 549 | if (ret < 0) |
542 | return ret; | 550 | return ret; |
543 | 551 | ||
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index f24906f54a7..e1fd005dd04 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -438,15 +438,25 @@ static int wl1271_plt_init(struct wl1271 *wl) | |||
438 | struct conf_tx_tid *conf_tid; | 438 | struct conf_tx_tid *conf_tid; |
439 | int ret, i; | 439 | int ret, i; |
440 | 440 | ||
441 | ret = wl1271_cmd_general_parms(wl); | 441 | if (wl->chip.id == CHIP_ID_1283_PG20) |
442 | ret = wl128x_cmd_general_parms(wl); | ||
443 | else | ||
444 | ret = wl1271_cmd_general_parms(wl); | ||
442 | if (ret < 0) | 445 | if (ret < 0) |
443 | return ret; | 446 | return ret; |
444 | 447 | ||
445 | ret = wl1271_cmd_radio_parms(wl); | 448 | if (wl->chip.id == CHIP_ID_1283_PG20) |
449 | ret = wl128x_cmd_radio_parms(wl); | ||
450 | else | ||
451 | ret = wl1271_cmd_radio_parms(wl); | ||
446 | if (ret < 0) | 452 | if (ret < 0) |
447 | return ret; | 453 | return ret; |
448 | 454 | ||
449 | ret = wl1271_cmd_ext_radio_parms(wl); | 455 | if (wl->chip.id != CHIP_ID_1283_PG20) { |
456 | ret = wl1271_cmd_ext_radio_parms(wl); | ||
457 | if (ret < 0) | ||
458 | return ret; | ||
459 | } | ||
450 | if (ret < 0) | 460 | if (ret < 0) |
451 | return ret; | 461 | return ret; |
452 | 462 | ||