diff options
Diffstat (limited to 'drivers/net/wireless/wl12xx/testmode.c')
| -rw-r--r-- | drivers/net/wireless/wl12xx/testmode.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/drivers/net/wireless/wl12xx/testmode.c b/drivers/net/wireless/wl12xx/testmode.c index 88add68bd9ac..4ae8effaee22 100644 --- a/drivers/net/wireless/wl12xx/testmode.c +++ b/drivers/net/wireless/wl12xx/testmode.c | |||
| @@ -36,7 +36,6 @@ enum wl1271_tm_commands { | |||
| 36 | WL1271_TM_CMD_TEST, | 36 | WL1271_TM_CMD_TEST, |
| 37 | WL1271_TM_CMD_INTERROGATE, | 37 | WL1271_TM_CMD_INTERROGATE, |
| 38 | WL1271_TM_CMD_CONFIGURE, | 38 | WL1271_TM_CMD_CONFIGURE, |
| 39 | WL1271_TM_CMD_NVS_PUSH, | ||
| 40 | WL1271_TM_CMD_SET_PLT_MODE, | 39 | WL1271_TM_CMD_SET_PLT_MODE, |
| 41 | WL1271_TM_CMD_RECOVER, | 40 | WL1271_TM_CMD_RECOVER, |
| 42 | 41 | ||
| @@ -190,48 +189,6 @@ static int wl1271_tm_cmd_configure(struct wl1271 *wl, struct nlattr *tb[]) | |||
| 190 | return 0; | 189 | return 0; |
| 191 | } | 190 | } |
| 192 | 191 | ||
| 193 | static int wl1271_tm_cmd_nvs_push(struct wl1271 *wl, struct nlattr *tb[]) | ||
| 194 | { | ||
| 195 | int ret = 0; | ||
| 196 | size_t len; | ||
| 197 | void *buf; | ||
| 198 | |||
| 199 | wl1271_debug(DEBUG_TESTMODE, "testmode cmd nvs push"); | ||
| 200 | |||
| 201 | if (!tb[WL1271_TM_ATTR_DATA]) | ||
| 202 | return -EINVAL; | ||
| 203 | |||
| 204 | buf = nla_data(tb[WL1271_TM_ATTR_DATA]); | ||
| 205 | len = nla_len(tb[WL1271_TM_ATTR_DATA]); | ||
| 206 | |||
| 207 | mutex_lock(&wl->mutex); | ||
| 208 | |||
| 209 | kfree(wl->nvs); | ||
| 210 | |||
| 211 | if ((wl->chip.id == CHIP_ID_1283_PG20) && | ||
| 212 | (len != sizeof(struct wl128x_nvs_file))) | ||
| 213 | return -EINVAL; | ||
| 214 | else if (len != sizeof(struct wl1271_nvs_file)) | ||
| 215 | return -EINVAL; | ||
| 216 | |||
| 217 | wl->nvs = kzalloc(len, GFP_KERNEL); | ||
| 218 | if (!wl->nvs) { | ||
| 219 | wl1271_error("could not allocate memory for the nvs file"); | ||
| 220 | ret = -ENOMEM; | ||
| 221 | goto out; | ||
| 222 | } | ||
| 223 | |||
| 224 | memcpy(wl->nvs, buf, len); | ||
| 225 | wl->nvs_len = len; | ||
| 226 | |||
| 227 | wl1271_debug(DEBUG_TESTMODE, "testmode pushed nvs"); | ||
| 228 | |||
| 229 | out: | ||
| 230 | mutex_unlock(&wl->mutex); | ||
| 231 | |||
| 232 | return ret; | ||
| 233 | } | ||
| 234 | |||
| 235 | static int wl1271_tm_cmd_set_plt_mode(struct wl1271 *wl, struct nlattr *tb[]) | 192 | static int wl1271_tm_cmd_set_plt_mode(struct wl1271 *wl, struct nlattr *tb[]) |
| 236 | { | 193 | { |
| 237 | u32 val; | 194 | u32 val; |
| @@ -288,8 +245,6 @@ int wl1271_tm_cmd(struct ieee80211_hw *hw, void *data, int len) | |||
| 288 | return wl1271_tm_cmd_interrogate(wl, tb); | 245 | return wl1271_tm_cmd_interrogate(wl, tb); |
| 289 | case WL1271_TM_CMD_CONFIGURE: | 246 | case WL1271_TM_CMD_CONFIGURE: |
| 290 | return wl1271_tm_cmd_configure(wl, tb); | 247 | return wl1271_tm_cmd_configure(wl, tb); |
| 291 | case WL1271_TM_CMD_NVS_PUSH: | ||
| 292 | return wl1271_tm_cmd_nvs_push(wl, tb); | ||
| 293 | case WL1271_TM_CMD_SET_PLT_MODE: | 248 | case WL1271_TM_CMD_SET_PLT_MODE: |
| 294 | return wl1271_tm_cmd_set_plt_mode(wl, tb); | 249 | return wl1271_tm_cmd_set_plt_mode(wl, tb); |
| 295 | case WL1271_TM_CMD_RECOVER: | 250 | case WL1271_TM_CMD_RECOVER: |
