cfg80211.c (b8fa3bfb14e78dbfcfbd2fac1d81a0e666eb8f42) cfg80211.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

--- 1737 unchanged lines hidden (view full) ---

1746{
1747 struct wil6210_priv *wil = wiphy_to_wil(wiphy);
1748
1749 wil_dbg_pm(wil, "resuming\n");
1750
1751 return 0;
1752}
1753
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

--- 1737 unchanged lines hidden (view full) ---

1746{
1747 struct wil6210_priv *wil = wiphy_to_wil(wiphy);
1748
1749 wil_dbg_pm(wil, "resuming\n");
1750
1751 return 0;
1752}
1753
1754static int
1755wil_cfg80211_sched_scan_start(struct wiphy *wiphy,
1756 struct net_device *dev,
1757 struct cfg80211_sched_scan_request *request)
1758{
1759 struct wil6210_priv *wil = wiphy_to_wil(wiphy);
1760 int i, rc;
1761
1762 wil_dbg_misc(wil,
1763 "sched scan start: n_ssids %d, ie_len %zu, flags 0x%x\n",
1764 request->n_ssids, request->ie_len, request->flags);
1765 for (i = 0; i < request->n_ssids; i++) {
1766 wil_dbg_misc(wil, "SSID[%d]:", i);
1767 wil_hex_dump_misc("SSID ", DUMP_PREFIX_OFFSET, 16, 1,
1768 request->ssids[i].ssid,
1769 request->ssids[i].ssid_len, true);
1770 }
1771 wil_dbg_misc(wil, "channels:");
1772 for (i = 0; i < request->n_channels; i++)
1773 wil_dbg_misc(wil, " %d%s", request->channels[i]->hw_value,
1774 i == request->n_channels - 1 ? "\n" : "");
1775 wil_dbg_misc(wil, "n_match_sets %d, min_rssi_thold %d, delay %d\n",
1776 request->n_match_sets, request->min_rssi_thold,
1777 request->delay);
1778 for (i = 0; i < request->n_match_sets; i++) {
1779 struct cfg80211_match_set *ms = &request->match_sets[i];
1780
1781 wil_dbg_misc(wil, "MATCHSET[%d]: rssi_thold %d\n",
1782 i, ms->rssi_thold);
1783 wil_hex_dump_misc("SSID ", DUMP_PREFIX_OFFSET, 16, 1,
1784 ms->ssid.ssid,
1785 ms->ssid.ssid_len, true);
1786 }
1787 wil_dbg_misc(wil, "n_scan_plans %d\n", request->n_scan_plans);
1788 for (i = 0; i < request->n_scan_plans; i++) {
1789 struct cfg80211_sched_scan_plan *sp = &request->scan_plans[i];
1790
1791 wil_dbg_misc(wil, "SCAN PLAN[%d]: interval %d iterations %d\n",
1792 i, sp->interval, sp->iterations);
1793 }
1794
1795 rc = wmi_set_ie(wil, WMI_FRAME_PROBE_REQ, request->ie_len, request->ie);
1796 if (rc)
1797 return rc;
1798 return wmi_start_sched_scan(wil, request);
1799}
1800
1801static int
1802wil_cfg80211_sched_scan_stop(struct wiphy *wiphy, struct net_device *dev,
1803 u64 reqid)
1804{
1805 struct wil6210_priv *wil = wiphy_to_wil(wiphy);
1806 int rc;
1807
1808 rc = wmi_stop_sched_scan(wil);
1809 /* device would return error if it thinks PNO is already stopped.
1810 * ignore the return code so user space and driver gets back in-sync
1811 */
1812 wil_dbg_misc(wil, "sched scan stopped (%d)\n", rc);
1813
1814 return 0;
1815}
1816
1754static const struct cfg80211_ops wil_cfg80211_ops = {
1755 .add_virtual_intf = wil_cfg80211_add_iface,
1756 .del_virtual_intf = wil_cfg80211_del_iface,
1757 .scan = wil_cfg80211_scan,
1758 .abort_scan = wil_cfg80211_abort_scan,
1759 .connect = wil_cfg80211_connect,
1760 .disconnect = wil_cfg80211_disconnect,
1761 .set_wiphy_params = wil_cfg80211_set_wiphy_params,

--- 17 unchanged lines hidden (view full) ---

1779 .probe_client = wil_cfg80211_probe_client,
1780 .change_bss = wil_cfg80211_change_bss,
1781 /* P2P device */
1782 .start_p2p_device = wil_cfg80211_start_p2p_device,
1783 .stop_p2p_device = wil_cfg80211_stop_p2p_device,
1784 .set_power_mgmt = wil_cfg80211_set_power_mgmt,
1785 .suspend = wil_cfg80211_suspend,
1786 .resume = wil_cfg80211_resume,
1817static const struct cfg80211_ops wil_cfg80211_ops = {
1818 .add_virtual_intf = wil_cfg80211_add_iface,
1819 .del_virtual_intf = wil_cfg80211_del_iface,
1820 .scan = wil_cfg80211_scan,
1821 .abort_scan = wil_cfg80211_abort_scan,
1822 .connect = wil_cfg80211_connect,
1823 .disconnect = wil_cfg80211_disconnect,
1824 .set_wiphy_params = wil_cfg80211_set_wiphy_params,

--- 17 unchanged lines hidden (view full) ---

1842 .probe_client = wil_cfg80211_probe_client,
1843 .change_bss = wil_cfg80211_change_bss,
1844 /* P2P device */
1845 .start_p2p_device = wil_cfg80211_start_p2p_device,
1846 .stop_p2p_device = wil_cfg80211_stop_p2p_device,
1847 .set_power_mgmt = wil_cfg80211_set_power_mgmt,
1848 .suspend = wil_cfg80211_suspend,
1849 .resume = wil_cfg80211_resume,
1850 .sched_scan_start = wil_cfg80211_sched_scan_start,
1851 .sched_scan_stop = wil_cfg80211_sched_scan_stop,
1787};
1788
1789static void wil_wiphy_init(struct wiphy *wiphy)
1790{
1791 wiphy->max_scan_ssids = 1;
1792 wiphy->max_scan_ie_len = WMI_MAX_IE_LEN;
1793 wiphy->max_remain_on_channel_duration = WIL_MAX_ROC_DURATION_MS;
1794 wiphy->max_num_pmkids = 0 /* TODO: */;

--- 541 unchanged lines hidden ---
1852};
1853
1854static void wil_wiphy_init(struct wiphy *wiphy)
1855{
1856 wiphy->max_scan_ssids = 1;
1857 wiphy->max_scan_ie_len = WMI_MAX_IE_LEN;
1858 wiphy->max_remain_on_channel_duration = WIL_MAX_ROC_DURATION_MS;
1859 wiphy->max_num_pmkids = 0 /* TODO: */;

--- 541 unchanged lines hidden ---