Skip to content

Commit 720f7d4

Browse files
author
Adham Abozaeid
committed
staging: wilc1000: Failure to start PS mode
Removed wilc->enable_ps. FW should take care of powersave in case AP is enabled Signed-off-by: Adham Abozaeid <[email protected]>
1 parent efe02b8 commit 720f7d4

File tree

3 files changed

+3
-13
lines changed

3 files changed

+3
-13
lines changed

wilc/linux_wlan.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ void handle_pwrsave_for_IP(struct wilc_vif *vif, uint8_t state)
6767

6868
vif->obtaining_ip = false;
6969

70-
/* Recover PS previous state */
71-
if (vif->wilc->enable_ps == true)
72-
wilc_set_power_mgmt(vif, vif->pwrsave_current_state, 0);
70+
wilc_set_power_mgmt(vif, vif->pwrsave_current_state, 0);
7371

7472
del_timer(&vif->during_ip_timer);
7573

@@ -128,8 +126,7 @@ void clear_during_ip(unsigned long arg)
128126
vif->pwrsave_current_state);
129127

130128
/* Recover PS previous state */
131-
if (vif->wilc->enable_ps == true)
132-
wilc_set_power_mgmt(vif, vif->pwrsave_current_state, 0);
129+
wilc_set_power_mgmt(vif, vif->pwrsave_current_state, 0);
133130
}
134131
#endif /* DISABLE_PWRSAVE_AND_SCAN_DURING_IP */
135132

wilc/wilc_wfi_cfgoperations.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2166,8 +2166,7 @@ static int set_power_mgmt(struct wiphy *wiphy, struct net_device *dev,
21662166
" Power save Enabled= %d , TimeOut = %d\n", enabled,
21672167
timeout);
21682168

2169-
if (vif->wilc->enable_ps)
2170-
wilc_set_power_mgmt(vif, enabled, timeout);
2169+
wilc_set_power_mgmt(vif, enabled, timeout);
21712170

21722171
return 0;
21732172
}
@@ -2219,7 +2218,6 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
22192218
memset(priv->assoc_stainfo.sta_associated_bss, 0,
22202219
MAX_NUM_STA * ETH_ALEN);
22212220

2222-
wl->enable_ps = true;
22232221
wilc_set_power_mgmt(vif_1, 1, 0);
22242222
wilc_set_power_mgmt(vif_2, 1, 0);
22252223
break;
@@ -2232,7 +2230,6 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
22322230
priv->wdev->iftype = type;
22332231
vif->monitor_flag = 0;
22342232
vif->iftype = CLIENT_MODE;
2235-
wl->enable_ps = false;
22362233
wilc_set_wfi_drv_handler(vif, wilc_get_vif_idx(vif),
22372234
STATION_MODE, vif->ifc_id, false);
22382235
wilc_set_operation_mode(vif, STATION_MODE);
@@ -2247,7 +2244,6 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
22472244
dev->ieee80211_ptr->iftype = type;
22482245
priv->wdev->iftype = type;
22492246
vif->iftype = AP_MODE;
2250-
wl->enable_ps = false;
22512247
if (wl->initialized) {
22522248
wilc_set_wfi_drv_handler(vif, wilc_get_vif_idx(vif),
22532249
AP_MODE, vif->ifc_id, false);
@@ -2271,7 +2267,6 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
22712267
wilc_set_wfi_drv_handler(vif, wilc_get_vif_idx(vif),
22722268
AP_MODE, vif->ifc_id, false);
22732269
wilc_set_operation_mode(vif, AP_MODE);
2274-
wl->enable_ps = false;
22752270
wilc_set_power_mgmt(vif_1, 0, 0);
22762271
wilc_set_power_mgmt(vif_2, 0, 0);
22772272
break;
@@ -2282,7 +2277,6 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
22822277
dev->type = ARPHRD_IEEE80211_RADIOTAP;
22832278
priv->wdev->iftype = type;
22842279
vif->iftype = MONITOR_MODE;
2285-
wl->enable_ps = false;
22862280
if (wl->initialized) {
22872281
wilc_set_wfi_drv_handler(vif, wilc_get_vif_idx(vif),
22882282
MONITOR_MODE, vif->ifc_id,

wilc/wilc_wfi_netdevice.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,6 @@ struct wilc {
240240
struct device *dev;
241241
struct device *dt_dev;
242242

243-
bool enable_ps;
244243
enum wilc_chip_type chip;
245244

246245
uint8_t power_status[DEV_MAX];

0 commit comments

Comments
 (0)