aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl/wmi.c
diff options
context:
space:
mode:
authorKalle Valo <kvalo@qca.qualcomm.com>2012-07-19 09:00:48 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2012-10-24 04:49:35 -0400
commit11f0bfcf73f4a90c8c0e0b244a272379b376adb1 (patch)
tree0a7ff3e09d0059df8ceda77cea5c059964ebe40e /drivers/net/wireless/ath/ath6kl/wmi.c
parentc8c72b74e289a3439e9c2438ca675c5a746bf929 (diff)
ath6kl: refactor wmi scan command
ATH6KL_FW_CAPABILITY_STA_P2PDEV_DUPLEX was checked in cfg80211.c which is a bit awkward when adding more callsites to the scan functions. Refactor the code to wmi.c so that it's transparent to the callers. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/wmi.c')
-rw-r--r--drivers/net/wireless/ath/ath6kl/wmi.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index a9d7e000017a..05cc871f8244 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -1899,11 +1899,12 @@ int ath6kl_wmi_disconnect_cmd(struct wmi *wmi, u8 if_idx)
1899 * ath6kl_wmi_begin_scan_cmd instead. The new function supports P2P 1899 * ath6kl_wmi_begin_scan_cmd instead. The new function supports P2P
1900 * mgmt operations using station interface. 1900 * mgmt operations using station interface.
1901 */ 1901 */
1902int ath6kl_wmi_startscan_cmd(struct wmi *wmi, u8 if_idx, 1902static int ath6kl_wmi_startscan_cmd(struct wmi *wmi, u8 if_idx,
1903 enum wmi_scan_type scan_type, 1903 enum wmi_scan_type scan_type,
1904 u32 force_fgscan, u32 is_legacy, 1904 u32 force_fgscan, u32 is_legacy,
1905 u32 home_dwell_time, u32 force_scan_interval, 1905 u32 home_dwell_time,
1906 s8 num_chan, u16 *ch_list) 1906 u32 force_scan_interval,
1907 s8 num_chan, u16 *ch_list)
1907{ 1908{
1908 struct sk_buff *skb; 1909 struct sk_buff *skb;
1909 struct wmi_start_scan_cmd *sc; 1910 struct wmi_start_scan_cmd *sc;
@@ -1942,6 +1943,11 @@ int ath6kl_wmi_startscan_cmd(struct wmi *wmi, u8 if_idx,
1942 return ret; 1943 return ret;
1943} 1944}
1944 1945
1946/*
1947 * beginscan supports (compared to old startscan) P2P mgmt operations using
1948 * station interface, send additional information like supported rates to
1949 * advertise and xmit rates for probe requests
1950 */
1945int ath6kl_wmi_beginscan_cmd(struct wmi *wmi, u8 if_idx, 1951int ath6kl_wmi_beginscan_cmd(struct wmi *wmi, u8 if_idx,
1946 enum wmi_scan_type scan_type, 1952 enum wmi_scan_type scan_type,
1947 u32 force_fgscan, u32 is_legacy, 1953 u32 force_fgscan, u32 is_legacy,
@@ -1957,6 +1963,15 @@ int ath6kl_wmi_beginscan_cmd(struct wmi *wmi, u8 if_idx,
1957 int num_rates; 1963 int num_rates;
1958 u32 ratemask; 1964 u32 ratemask;
1959 1965
1966 if (!test_bit(ATH6KL_FW_CAPABILITY_STA_P2PDEV_DUPLEX,
1967 ar->fw_capabilities)) {
1968 return ath6kl_wmi_startscan_cmd(wmi, if_idx,
1969 scan_type, force_fgscan,
1970 is_legacy, home_dwell_time,
1971 force_scan_interval,
1972 num_chan, ch_list);
1973 }
1974
1960 size = sizeof(struct wmi_begin_scan_cmd); 1975 size = sizeof(struct wmi_begin_scan_cmd);
1961 1976
1962 if ((scan_type != WMI_LONG_SCAN) && (scan_type != WMI_SHORT_SCAN)) 1977 if ((scan_type != WMI_LONG_SCAN) && (scan_type != WMI_SHORT_SCAN))