| .. | .. |
|---|
| 63 | 63 | */ |
|---|
| 64 | 64 | vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_GO2DOZE); |
|---|
| 65 | 65 | |
|---|
| 66 | | - if (listen_interval >= 2) { |
|---|
| 67 | | - /* clear always listen beacon */ |
|---|
| 68 | | - vnt_mac_reg_bits_off(priv, MAC_REG_PSCTL, PSCTL_ALBCN); |
|---|
| 69 | | - |
|---|
| 70 | | - /* first time set listen next beacon */ |
|---|
| 71 | | - vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_LNBCN); |
|---|
| 72 | | - } else { |
|---|
| 73 | | - /* always listen beacon */ |
|---|
| 74 | | - vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_ALBCN); |
|---|
| 75 | | - } |
|---|
| 66 | + /* always listen beacon */ |
|---|
| 67 | + vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_ALBCN); |
|---|
| 76 | 68 | |
|---|
| 77 | 69 | dev_dbg(&priv->usb->dev, "PS:Power Saving Mode Enable...\n"); |
|---|
| 78 | 70 | } |
|---|
| 79 | 71 | |
|---|
| 80 | | -/* |
|---|
| 81 | | - * |
|---|
| 82 | | - * Routine Description: |
|---|
| 83 | | - * Disable hw power saving functions |
|---|
| 84 | | - * |
|---|
| 85 | | - * Return Value: |
|---|
| 86 | | - * None. |
|---|
| 87 | | - * |
|---|
| 88 | | - */ |
|---|
| 89 | | - |
|---|
| 90 | | -void vnt_disable_power_saving(struct vnt_private *priv) |
|---|
| 72 | +int vnt_disable_power_saving(struct vnt_private *priv) |
|---|
| 91 | 73 | { |
|---|
| 74 | + int ret; |
|---|
| 75 | + |
|---|
| 92 | 76 | /* disable power saving hw function */ |
|---|
| 93 | | - vnt_control_out(priv, MESSAGE_TYPE_DISABLE_PS, 0, |
|---|
| 94 | | - 0, 0, NULL); |
|---|
| 77 | + ret = vnt_control_out(priv, MESSAGE_TYPE_DISABLE_PS, 0, |
|---|
| 78 | + 0, 0, NULL); |
|---|
| 79 | + if (ret) |
|---|
| 80 | + return ret; |
|---|
| 95 | 81 | |
|---|
| 96 | 82 | /* clear AutoSleep */ |
|---|
| 97 | 83 | vnt_mac_reg_bits_off(priv, MAC_REG_PSCFG, PSCFG_AUTOSLEEP); |
|---|
| 98 | 84 | |
|---|
| 99 | 85 | /* set always listen beacon */ |
|---|
| 100 | 86 | vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_ALBCN); |
|---|
| 87 | + |
|---|
| 88 | + return 0; |
|---|
| 101 | 89 | } |
|---|
| 102 | 90 | |
|---|
| 103 | 91 | /* |
|---|