main.c (498495dba268b20e8eadd7fe93c140c68b6cc9d2) | main.c (a5dc688392737bbab3699d63f26e853a40c52d2d) |
---|---|
1/* 2 * Copyright (c) 2012-2017 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 --- 565 unchanged lines hidden (view full) --- 574 if (rx_ring_overflow_thrsh == WIL6210_RX_HIGH_TRSH_INIT) 575 rx_ring_overflow_thrsh = WIL6210_RX_HIGH_TRSH_DEFAULT; 576 577 wil->ps_profile = WMI_PS_PROFILE_TYPE_DEFAULT; 578 579 wil->wakeup_trigger = WMI_WAKEUP_TRIGGER_UCAST | 580 WMI_WAKEUP_TRIGGER_BCAST; 581 memset(&wil->suspend_stats, 0, sizeof(wil->suspend_stats)); | 1/* 2 * Copyright (c) 2012-2017 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 --- 565 unchanged lines hidden (view full) --- 574 if (rx_ring_overflow_thrsh == WIL6210_RX_HIGH_TRSH_INIT) 575 rx_ring_overflow_thrsh = WIL6210_RX_HIGH_TRSH_DEFAULT; 576 577 wil->ps_profile = WMI_PS_PROFILE_TYPE_DEFAULT; 578 579 wil->wakeup_trigger = WMI_WAKEUP_TRIGGER_UCAST | 580 WMI_WAKEUP_TRIGGER_BCAST; 581 memset(&wil->suspend_stats, 0, sizeof(wil->suspend_stats)); |
582 wil->suspend_stats.min_suspend_time = ULONG_MAX; | |
583 wil->vring_idle_trsh = 16; 584 585 return 0; 586 587out_wmi_wq: 588 destroy_workqueue(wil->wmi_wq); 589 590 return -EAGAIN; --- 164 unchanged lines hidden (view full) --- 755} 756 757static void wil_collect_fw_info(struct wil6210_priv *wil) 758{ 759 struct wiphy *wiphy = wil_to_wiphy(wil); 760 u8 retry_short; 761 int rc; 762 | 582 wil->vring_idle_trsh = 16; 583 584 return 0; 585 586out_wmi_wq: 587 destroy_workqueue(wil->wmi_wq); 588 589 return -EAGAIN; --- 164 unchanged lines hidden (view full) --- 754} 755 756static void wil_collect_fw_info(struct wil6210_priv *wil) 757{ 758 struct wiphy *wiphy = wil_to_wiphy(wil); 759 u8 retry_short; 760 int rc; 761 |
762 wil_refresh_fw_capabilities(wil); 763 |
|
763 rc = wmi_get_mgmt_retry(wil, &retry_short); 764 if (!rc) { 765 wiphy->retry_short = retry_short; 766 wil_dbg_misc(wil, "FW retry_short: %d\n", retry_short); 767 } 768} 769 | 764 rc = wmi_get_mgmt_retry(wil, &retry_short); 765 if (!rc) { 766 wiphy->retry_short = retry_short; 767 wil_dbg_misc(wil, "FW retry_short: %d\n", retry_short); 768 } 769} 770 |
771void wil_refresh_fw_capabilities(struct wil6210_priv *wil) 772{ 773 struct wiphy *wiphy = wil_to_wiphy(wil); 774 775 wil->keep_radio_on_during_sleep = 776 wil->platform_ops.keep_radio_on_during_sleep && 777 wil->platform_ops.keep_radio_on_during_sleep( 778 wil->platform_handle) && 779 test_bit(WMI_FW_CAPABILITY_D3_SUSPEND, wil->fw_capabilities); 780 781 wil_info(wil, "keep_radio_on_during_sleep (%d)\n", 782 wil->keep_radio_on_during_sleep); 783 784 if (test_bit(WMI_FW_CAPABILITY_RSSI_REPORTING, wil->fw_capabilities)) 785 wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; 786 else 787 wiphy->signal_type = CFG80211_SIGNAL_TYPE_UNSPEC; 788 789 if (test_bit(WMI_FW_CAPABILITY_PNO, wil->fw_capabilities)) { 790 wiphy->max_sched_scan_reqs = 1; 791 wiphy->max_sched_scan_ssids = WMI_MAX_PNO_SSID_NUM; 792 wiphy->max_match_sets = WMI_MAX_PNO_SSID_NUM; 793 wiphy->max_sched_scan_ie_len = WMI_MAX_IE_LEN; 794 wiphy->max_sched_scan_plans = WMI_MAX_PLANS_NUM; 795 } 796} 797 |
|
770void wil_mbox_ring_le2cpus(struct wil6210_mbox_ring *r) 771{ 772 le32_to_cpus(&r->base); 773 le16_to_cpus(&r->entry_size); 774 le16_to_cpus(&r->size); 775 le32_to_cpus(&r->tail); 776 le32_to_cpus(&r->head); 777} --- 288 unchanged lines hidden (view full) --- 1066 1067 /* check FW is responsive */ 1068 rc = wmi_echo(wil); 1069 if (rc) { 1070 wil_err(wil, "wmi_echo failed, rc %d\n", rc); 1071 return rc; 1072 } 1073 | 798void wil_mbox_ring_le2cpus(struct wil6210_mbox_ring *r) 799{ 800 le32_to_cpus(&r->base); 801 le16_to_cpus(&r->entry_size); 802 le16_to_cpus(&r->size); 803 le32_to_cpus(&r->tail); 804 le32_to_cpus(&r->head); 805} --- 288 unchanged lines hidden (view full) --- 1094 1095 /* check FW is responsive */ 1096 rc = wmi_echo(wil); 1097 if (rc) { 1098 wil_err(wil, "wmi_echo failed, rc %d\n", rc); 1099 return rc; 1100 } 1101 |
1102 wil_collect_fw_info(wil); 1103 |
|
1074 if (wil->ps_profile != WMI_PS_PROFILE_TYPE_DEFAULT) 1075 wil_ps_update(wil, wil->ps_profile); 1076 | 1104 if (wil->ps_profile != WMI_PS_PROFILE_TYPE_DEFAULT) 1105 wil_ps_update(wil, wil->ps_profile); 1106 |
1077 wil_collect_fw_info(wil); 1078 | |
1079 if (wil->platform_ops.notify) { 1080 rc = wil->platform_ops.notify(wil->platform_handle, 1081 WIL_PLATFORM_EVT_FW_RDY); 1082 if (rc) { 1083 wil_err(wil, "FW_RDY notify failed, rc %d\n", 1084 rc); 1085 rc = 0; 1086 } --- 194 unchanged lines hidden --- | 1107 if (wil->platform_ops.notify) { 1108 rc = wil->platform_ops.notify(wil->platform_handle, 1109 WIL_PLATFORM_EVT_FW_RDY); 1110 if (rc) { 1111 wil_err(wil, "FW_RDY notify failed, rc %d\n", 1112 rc); 1113 rc = 0; 1114 } --- 194 unchanged lines hidden --- |