diff options
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_cmd.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_cmd.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c index 4a56ab05e736..596e333919ae 100644 --- a/drivers/net/wireless/wl12xx/wl1271_cmd.c +++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c | |||
@@ -171,6 +171,39 @@ int wl1271_cmd_radio_parms(struct wl1271 *wl) | |||
171 | return ret; | 171 | return ret; |
172 | } | 172 | } |
173 | 173 | ||
174 | int wl1271_cmd_ext_radio_parms(struct wl1271 *wl) | ||
175 | { | ||
176 | struct wl1271_ext_radio_parms_cmd *ext_radio_parms; | ||
177 | struct conf_rf_settings *rf = &wl->conf.rf; | ||
178 | int ret; | ||
179 | |||
180 | if (!wl->nvs) | ||
181 | return -ENODEV; | ||
182 | |||
183 | ext_radio_parms = kzalloc(sizeof(*ext_radio_parms), GFP_KERNEL); | ||
184 | if (!ext_radio_parms) | ||
185 | return -ENOMEM; | ||
186 | |||
187 | ext_radio_parms->test.id = TEST_CMD_INI_FILE_RF_EXTENDED_PARAM; | ||
188 | |||
189 | memcpy(ext_radio_parms->tx_per_channel_power_compensation_2, | ||
190 | rf->tx_per_channel_power_compensation_2, | ||
191 | CONF_TX_PWR_COMPENSATION_LEN_2); | ||
192 | memcpy(ext_radio_parms->tx_per_channel_power_compensation_5, | ||
193 | rf->tx_per_channel_power_compensation_5, | ||
194 | CONF_TX_PWR_COMPENSATION_LEN_5); | ||
195 | |||
196 | wl1271_dump(DEBUG_CMD, "TEST_CMD_INI_FILE_EXT_RADIO_PARAM: ", | ||
197 | ext_radio_parms, sizeof(*ext_radio_parms)); | ||
198 | |||
199 | ret = wl1271_cmd_test(wl, ext_radio_parms, sizeof(*ext_radio_parms), 0); | ||
200 | if (ret < 0) | ||
201 | wl1271_warning("TEST_CMD_INI_FILE_RF_EXTENDED_PARAM failed"); | ||
202 | |||
203 | kfree(ext_radio_parms); | ||
204 | return ret; | ||
205 | } | ||
206 | |||
174 | /* | 207 | /* |
175 | * Poll the mailbox event field until any of the bits in the mask is set or a | 208 | * Poll the mailbox event field until any of the bits in the mask is set or a |
176 | * timeout occurs (WL1271_EVENT_TIMEOUT in msecs) | 209 | * timeout occurs (WL1271_EVENT_TIMEOUT in msecs) |