cfg80211.c (52d81a6883fb36c4304fb5619bfa5f61eb7986ef) | cfg80211.c (76a9fbe27ec04420844ddf49b9e7a2f872222983) |
---|---|
1/* 2 * Copyright (c) 2004-2011 Atheros Communications Inc. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 1657 unchanged lines hidden (view full) --- 1666 ar->wmi->saved_pwr_mode = ar->wmi->pwr_mode; 1667 1668 ret = ath6kl_wmi_powermode_cmd(ar->wmi, 0, REC_POWER); 1669 if (ret) { 1670 ath6kl_warn("wmi powermode command failed during suspend: %d\n", 1671 ret); 1672 } 1673 | 1/* 2 * Copyright (c) 2004-2011 Atheros Communications Inc. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- 1657 unchanged lines hidden (view full) --- 1666 ar->wmi->saved_pwr_mode = ar->wmi->pwr_mode; 1667 1668 ret = ath6kl_wmi_powermode_cmd(ar->wmi, 0, REC_POWER); 1669 if (ret) { 1670 ath6kl_warn("wmi powermode command failed during suspend: %d\n", 1671 ret); 1672 } 1673 |
1674 ar->state = ATH6KL_STATE_DEEPSLEEP; 1675 |
|
1674 break; 1675 } 1676 1677 return 0; 1678} 1679 1680int ath6kl_cfg80211_resume(struct ath6kl *ar) 1681{ | 1676 break; 1677 } 1678 1679 return 0; 1680} 1681 1682int ath6kl_cfg80211_resume(struct ath6kl *ar) 1683{ |
1682 if (ar->wmi->pwr_mode != ar->wmi->saved_pwr_mode) { 1683 if (ath6kl_wmi_powermode_cmd(ar->wmi, 0, 1684 ar->wmi->saved_pwr_mode) != 0) 1685 ath6kl_warn("ath6kl_sdio_resume: " 1686 "wmi_powermode_cmd failed\n"); | 1684 int ret; 1685 1686 switch (ar->state) { 1687 case ATH6KL_STATE_DEEPSLEEP: 1688 if (ar->wmi->pwr_mode != ar->wmi->saved_pwr_mode) { 1689 ret = ath6kl_wmi_powermode_cmd(ar->wmi, 0, 1690 ar->wmi->saved_pwr_mode); 1691 if (ret) { 1692 ath6kl_warn("wmi powermode command failed during resume: %d\n", 1693 ret); 1694 } 1695 } 1696 1697 ar->state = ATH6KL_STATE_ON; 1698 1699 break; 1700 1701 default: 1702 break; |
1687 } 1688 1689 return 0; 1690} 1691 1692#ifdef CONFIG_PM 1693 1694/* hif layer decides what suspend mode to use */ --- 554 unchanged lines hidden (view full) --- 2249 ar->tx_pwr = 0; 2250 2251 ar->intra_bss = 1; 2252 memset(&ar->sc_params, 0, sizeof(ar->sc_params)); 2253 ar->sc_params.short_scan_ratio = WMI_SHORTSCANRATIO_DEFAULT; 2254 ar->sc_params.scan_ctrl_flags = DEFAULT_SCAN_CTRL_FLAGS; 2255 ar->lrssi_roam_threshold = DEF_LRSSI_ROAM_THRESHOLD; 2256 | 1703 } 1704 1705 return 0; 1706} 1707 1708#ifdef CONFIG_PM 1709 1710/* hif layer decides what suspend mode to use */ --- 554 unchanged lines hidden (view full) --- 2265 ar->tx_pwr = 0; 2266 2267 ar->intra_bss = 1; 2268 memset(&ar->sc_params, 0, sizeof(ar->sc_params)); 2269 ar->sc_params.short_scan_ratio = WMI_SHORTSCANRATIO_DEFAULT; 2270 ar->sc_params.scan_ctrl_flags = DEFAULT_SCAN_CTRL_FLAGS; 2271 ar->lrssi_roam_threshold = DEF_LRSSI_ROAM_THRESHOLD; 2272 |
2273 ar->state = ATH6KL_STATE_OFF; 2274 |
|
2257 memset((u8 *)ar->sta_list, 0, 2258 AP_MAX_NUM_STA * sizeof(struct ath6kl_sta)); 2259 2260 /* Init the PS queues */ 2261 for (ctr = 0; ctr < AP_MAX_NUM_STA; ctr++) { 2262 spin_lock_init(&ar->sta_list[ctr].psq_lock); 2263 skb_queue_head_init(&ar->sta_list[ctr].psq); 2264 } --- 143 unchanged lines hidden --- | 2275 memset((u8 *)ar->sta_list, 0, 2276 AP_MAX_NUM_STA * sizeof(struct ath6kl_sta)); 2277 2278 /* Init the PS queues */ 2279 for (ctr = 0; ctr < AP_MAX_NUM_STA; ctr++) { 2280 spin_lock_init(&ar->sta_list[ctr].psq_lock); 2281 skb_queue_head_init(&ar->sta_list[ctr].psq); 2282 } --- 143 unchanged lines hidden --- |