diff options
Diffstat (limited to 'drivers/net/wimax/i2400m/control.c')
-rw-r--r-- | drivers/net/wimax/i2400m/control.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/drivers/net/wimax/i2400m/control.c b/drivers/net/wimax/i2400m/control.c index bd193ae2178b..07308686dbcf 100644 --- a/drivers/net/wimax/i2400m/control.c +++ b/drivers/net/wimax/i2400m/control.c | |||
@@ -505,8 +505,15 @@ void i2400m_report_hook(struct i2400m *i2400m, | |||
505 | * it. */ | 505 | * it. */ |
506 | case I2400M_MT_REPORT_POWERSAVE_READY: /* zzzzz */ | 506 | case I2400M_MT_REPORT_POWERSAVE_READY: /* zzzzz */ |
507 | if (l3l4_hdr->status == cpu_to_le16(I2400M_MS_DONE_OK)) { | 507 | if (l3l4_hdr->status == cpu_to_le16(I2400M_MS_DONE_OK)) { |
508 | d_printf(1, dev, "ready for powersave, requesting\n"); | 508 | if (i2400m_power_save_disabled) |
509 | i2400m_cmd_enter_powersave(i2400m); | 509 | d_printf(1, dev, "ready for powersave, " |
510 | "not requesting (disabled by module " | ||
511 | "parameter)\n"); | ||
512 | else { | ||
513 | d_printf(1, dev, "ready for powersave, " | ||
514 | "requesting\n"); | ||
515 | i2400m_cmd_enter_powersave(i2400m); | ||
516 | } | ||
510 | } | 517 | } |
511 | break; | 518 | break; |
512 | }; | 519 | }; |
@@ -688,8 +695,9 @@ struct sk_buff *i2400m_msg_to_dev(struct i2400m *i2400m, | |||
688 | d_fnstart(3, dev, "(i2400m %p buf %p len %zu)\n", | 695 | d_fnstart(3, dev, "(i2400m %p buf %p len %zu)\n", |
689 | i2400m, buf, buf_len); | 696 | i2400m, buf, buf_len); |
690 | 697 | ||
698 | rmb(); /* Make sure we see what i2400m_dev_reset_handle() */ | ||
691 | if (i2400m->boot_mode) | 699 | if (i2400m->boot_mode) |
692 | return ERR_PTR(-ENODEV); | 700 | return ERR_PTR(-EL3RST); |
693 | 701 | ||
694 | msg_l3l4_hdr = buf; | 702 | msg_l3l4_hdr = buf; |
695 | /* Check msg & payload consistency */ | 703 | /* Check msg & payload consistency */ |
@@ -1389,16 +1397,16 @@ error: | |||
1389 | * | 1397 | * |
1390 | * @i2400m: device descriptor | 1398 | * @i2400m: device descriptor |
1391 | * | 1399 | * |
1392 | * Gracefully stops the device, moving it to the lowest power | 1400 | * Release resources acquired during the running of the device; in |
1393 | * consumption state possible. | 1401 | * theory, should also tell the device to go to sleep, switch off the |
1402 | * radio, all that, but at this point, in most cases (driver | ||
1403 | * disconnection, reset handling) we can't even talk to the device. | ||
1394 | */ | 1404 | */ |
1395 | void i2400m_dev_shutdown(struct i2400m *i2400m) | 1405 | void i2400m_dev_shutdown(struct i2400m *i2400m) |
1396 | { | 1406 | { |
1397 | int result = -ENODEV; | ||
1398 | struct device *dev = i2400m_dev(i2400m); | 1407 | struct device *dev = i2400m_dev(i2400m); |
1399 | 1408 | ||
1400 | d_fnstart(3, dev, "(i2400m %p)\n", i2400m); | 1409 | d_fnstart(3, dev, "(i2400m %p)\n", i2400m); |
1401 | result = i2400m->bus_reset(i2400m, I2400M_RT_WARM); | 1410 | d_fnend(3, dev, "(i2400m %p) = void\n", i2400m); |
1402 | d_fnend(3, dev, "(i2400m %p) = void [%d]\n", i2400m, result); | ||
1403 | return; | 1411 | return; |
1404 | } | 1412 | } |