wow.c (e5451c8f8330e03ad3cfa16048b4daf961af434f) | wow.c (c4cdf753ed4287467248126a4fac072fbba53b31) |
---|---|
1/* 2 * Copyright (c) 2015 Qualcomm Atheros, 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 --- 219 unchanged lines hidden (view full) --- 228 struct cfg80211_wowlan *wowlan) 229{ 230 struct ath10k *ar = hw->priv; 231 int ret; 232 233 mutex_lock(&ar->conf_mutex); 234 235 if (WARN_ON(!test_bit(ATH10K_FW_FEATURE_WOWLAN_SUPPORT, | 1/* 2 * Copyright (c) 2015 Qualcomm Atheros, 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 --- 219 unchanged lines hidden (view full) --- 228 struct cfg80211_wowlan *wowlan) 229{ 230 struct ath10k *ar = hw->priv; 231 int ret; 232 233 mutex_lock(&ar->conf_mutex); 234 235 if (WARN_ON(!test_bit(ATH10K_FW_FEATURE_WOWLAN_SUPPORT, |
236 ar->fw_features))) { | 236 ar->running_fw->fw_file.fw_features))) { |
237 ret = 1; 238 goto exit; 239 } 240 241 ret = ath10k_wow_cleanup(ar); 242 if (ret) { 243 ath10k_warn(ar, "failed to clear wow wakeup events: %d\n", 244 ret); --- 35 unchanged lines hidden (view full) --- 280int ath10k_wow_op_resume(struct ieee80211_hw *hw) 281{ 282 struct ath10k *ar = hw->priv; 283 int ret; 284 285 mutex_lock(&ar->conf_mutex); 286 287 if (WARN_ON(!test_bit(ATH10K_FW_FEATURE_WOWLAN_SUPPORT, | 237 ret = 1; 238 goto exit; 239 } 240 241 ret = ath10k_wow_cleanup(ar); 242 if (ret) { 243 ath10k_warn(ar, "failed to clear wow wakeup events: %d\n", 244 ret); --- 35 unchanged lines hidden (view full) --- 280int ath10k_wow_op_resume(struct ieee80211_hw *hw) 281{ 282 struct ath10k *ar = hw->priv; 283 int ret; 284 285 mutex_lock(&ar->conf_mutex); 286 287 if (WARN_ON(!test_bit(ATH10K_FW_FEATURE_WOWLAN_SUPPORT, |
288 ar->fw_features))) { | 288 ar->running_fw->fw_file.fw_features))) { |
289 ret = 1; 290 goto exit; 291 } 292 293 ret = ath10k_hif_resume(ar); 294 if (ret) { 295 ath10k_warn(ar, "failed to resume hif: %d\n", ret); 296 goto exit; --- 23 unchanged lines hidden (view full) --- 320 } 321 322 mutex_unlock(&ar->conf_mutex); 323 return ret; 324} 325 326int ath10k_wow_init(struct ath10k *ar) 327{ | 289 ret = 1; 290 goto exit; 291 } 292 293 ret = ath10k_hif_resume(ar); 294 if (ret) { 295 ath10k_warn(ar, "failed to resume hif: %d\n", ret); 296 goto exit; --- 23 unchanged lines hidden (view full) --- 320 } 321 322 mutex_unlock(&ar->conf_mutex); 323 return ret; 324} 325 326int ath10k_wow_init(struct ath10k *ar) 327{ |
328 if (!test_bit(ATH10K_FW_FEATURE_WOWLAN_SUPPORT, ar->fw_features)) | 328 if (!test_bit(ATH10K_FW_FEATURE_WOWLAN_SUPPORT, 329 ar->running_fw->fw_file.fw_features)) |
329 return 0; 330 331 if (WARN_ON(!test_bit(WMI_SERVICE_WOW, ar->wmi.svc_map))) 332 return -EINVAL; 333 334 ar->wow.wowlan_support = ath10k_wowlan_support; 335 ar->wow.wowlan_support.n_patterns = ar->wow.max_num_patterns; 336 ar->hw->wiphy->wowlan = &ar->wow.wowlan_support; 337 338 return 0; 339} | 330 return 0; 331 332 if (WARN_ON(!test_bit(WMI_SERVICE_WOW, ar->wmi.svc_map))) 333 return -EINVAL; 334 335 ar->wow.wowlan_support = ath10k_wowlan_support; 336 ar->wow.wowlan_support.n_patterns = ar->wow.max_num_patterns; 337 ar->hw->wiphy->wowlan = &ar->wow.wowlan_support; 338 339 return 0; 340} |