diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/cfg80211.c | 60 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/core.h | 7 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/wmi.c | 113 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/wmi.h | 127 |
4 files changed, 297 insertions, 10 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index 48d414acefee..abe3af3c6188 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c | |||
@@ -413,6 +413,7 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, | |||
413 | struct ath6kl *ar = ath6kl_priv(dev); | 413 | struct ath6kl *ar = ath6kl_priv(dev); |
414 | struct ath6kl_vif *vif = netdev_priv(dev); | 414 | struct ath6kl_vif *vif = netdev_priv(dev); |
415 | int status; | 415 | int status; |
416 | u8 nw_subtype = (ar->p2p) ? SUBTYPE_P2PDEV : SUBTYPE_NONE; | ||
416 | 417 | ||
417 | ath6kl_cfg80211_sscan_disable(vif); | 418 | ath6kl_cfg80211_sscan_disable(vif); |
418 | 419 | ||
@@ -555,6 +556,9 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, | |||
555 | 556 | ||
556 | vif->nw_type = vif->next_mode; | 557 | vif->nw_type = vif->next_mode; |
557 | 558 | ||
559 | if (vif->wdev.iftype == NL80211_IFTYPE_P2P_CLIENT) | ||
560 | nw_subtype = SUBTYPE_P2PCLIENT; | ||
561 | |||
558 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, | 562 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, |
559 | "%s: connect called with authmode %d dot11 auth %d" | 563 | "%s: connect called with authmode %d dot11 auth %d" |
560 | " PW crypto %d PW crypto len %d GRP crypto %d" | 564 | " PW crypto %d PW crypto len %d GRP crypto %d" |
@@ -572,7 +576,7 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, | |||
572 | vif->grp_crypto, vif->grp_crypto_len, | 576 | vif->grp_crypto, vif->grp_crypto_len, |
573 | vif->ssid_len, vif->ssid, | 577 | vif->ssid_len, vif->ssid, |
574 | vif->req_bssid, vif->ch_hint, | 578 | vif->req_bssid, vif->ch_hint, |
575 | ar->connect_ctrl_flags); | 579 | ar->connect_ctrl_flags, nw_subtype); |
576 | 580 | ||
577 | up(&ar->sem); | 581 | up(&ar->sem); |
578 | 582 | ||
@@ -914,9 +918,25 @@ static int ath6kl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev, | |||
914 | if (test_bit(CONNECTED, &vif->flags)) | 918 | if (test_bit(CONNECTED, &vif->flags)) |
915 | force_fg_scan = 1; | 919 | force_fg_scan = 1; |
916 | 920 | ||
917 | ret = ath6kl_wmi_startscan_cmd(ar->wmi, vif->fw_vif_idx, WMI_LONG_SCAN, | 921 | if (test_bit(ATH6KL_FW_CAPABILITY_STA_P2PDEV_DUPLEX, |
918 | force_fg_scan, false, 0, 0, n_channels, | 922 | ar->fw_capabilities)) { |
919 | channels); | 923 | /* |
924 | * If capable of doing P2P mgmt operations using | ||
925 | * station interface, send additional information like | ||
926 | * supported rates to advertise and xmit rates for | ||
927 | * probe requests | ||
928 | */ | ||
929 | ret = ath6kl_wmi_beginscan_cmd(ar->wmi, vif->fw_vif_idx, | ||
930 | WMI_LONG_SCAN, force_fg_scan, | ||
931 | false, 0, 0, n_channels, | ||
932 | channels, request->no_cck, | ||
933 | request->rates); | ||
934 | } else { | ||
935 | ret = ath6kl_wmi_startscan_cmd(ar->wmi, vif->fw_vif_idx, | ||
936 | WMI_LONG_SCAN, force_fg_scan, | ||
937 | false, 0, 0, n_channels, | ||
938 | channels); | ||
939 | } | ||
920 | if (ret) | 940 | if (ret) |
921 | ath6kl_err("wmi_startscan_cmd failed\n"); | 941 | ath6kl_err("wmi_startscan_cmd failed\n"); |
922 | else | 942 | else |
@@ -1485,7 +1505,7 @@ static int ath6kl_cfg80211_join_ibss(struct wiphy *wiphy, | |||
1485 | vif->grp_crypto, vif->grp_crypto_len, | 1505 | vif->grp_crypto, vif->grp_crypto_len, |
1486 | vif->ssid_len, vif->ssid, | 1506 | vif->ssid_len, vif->ssid, |
1487 | vif->req_bssid, vif->ch_hint, | 1507 | vif->req_bssid, vif->ch_hint, |
1488 | ar->connect_ctrl_flags); | 1508 | ar->connect_ctrl_flags, SUBTYPE_NONE); |
1489 | set_bit(CONNECT_PEND, &vif->flags); | 1509 | set_bit(CONNECT_PEND, &vif->flags); |
1490 | 1510 | ||
1491 | return 0; | 1511 | return 0; |
@@ -2192,6 +2212,16 @@ static int ath6kl_ap_beacon(struct wiphy *wiphy, struct net_device *dev, | |||
2192 | p.dot11_auth_mode = vif->dot11_auth_mode; | 2212 | p.dot11_auth_mode = vif->dot11_auth_mode; |
2193 | p.ch = cpu_to_le16(vif->next_chan); | 2213 | p.ch = cpu_to_le16(vif->next_chan); |
2194 | 2214 | ||
2215 | if (vif->wdev.iftype == NL80211_IFTYPE_P2P_GO) { | ||
2216 | p.nw_subtype = SUBTYPE_P2PGO; | ||
2217 | } else { | ||
2218 | /* | ||
2219 | * Due to firmware limitation, it is not possible to | ||
2220 | * do P2P mgmt operations in AP mode | ||
2221 | */ | ||
2222 | p.nw_subtype = SUBTYPE_NONE; | ||
2223 | } | ||
2224 | |||
2195 | res = ath6kl_wmi_ap_profile_commit(ar->wmi, vif->fw_vif_idx, &p); | 2225 | res = ath6kl_wmi_ap_profile_commit(ar->wmi, vif->fw_vif_idx, &p); |
2196 | if (res < 0) | 2226 | if (res < 0) |
2197 | return res; | 2227 | return res; |
@@ -2357,9 +2387,23 @@ static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct net_device *dev, | |||
2357 | } | 2387 | } |
2358 | 2388 | ||
2359 | *cookie = id; | 2389 | *cookie = id; |
2360 | return ath6kl_wmi_send_action_cmd(ar->wmi, vif->fw_vif_idx, id, | 2390 | |
2361 | chan->center_freq, wait, | 2391 | if (test_bit(ATH6KL_FW_CAPABILITY_STA_P2PDEV_DUPLEX, |
2362 | buf, len); | 2392 | ar->fw_capabilities)) { |
2393 | /* | ||
2394 | * If capable of doing P2P mgmt operations using | ||
2395 | * station interface, send additional information like | ||
2396 | * supported rates to advertise and xmit rates for | ||
2397 | * probe requests | ||
2398 | */ | ||
2399 | return ath6kl_wmi_send_mgmt_cmd(ar->wmi, vif->fw_vif_idx, id, | ||
2400 | chan->center_freq, wait, | ||
2401 | buf, len, no_cck); | ||
2402 | } else { | ||
2403 | return ath6kl_wmi_send_action_cmd(ar->wmi, vif->fw_vif_idx, id, | ||
2404 | chan->center_freq, wait, | ||
2405 | buf, len); | ||
2406 | } | ||
2363 | } | 2407 | } |
2364 | 2408 | ||
2365 | static void ath6kl_mgmt_frame_register(struct wiphy *wiphy, | 2409 | static void ath6kl_mgmt_frame_register(struct wiphy *wiphy, |
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h index 5f481c4dc55a..c863a28f2e0c 100644 --- a/drivers/net/wireless/ath/ath6kl/core.h +++ b/drivers/net/wireless/ath/ath6kl/core.h | |||
@@ -78,6 +78,13 @@ enum ath6kl_fw_capability { | |||
78 | ATH6KL_FW_CAPABILITY_HOST_P2P = 0, | 78 | ATH6KL_FW_CAPABILITY_HOST_P2P = 0, |
79 | ATH6KL_FW_CAPABILITY_SCHED_SCAN = 1, | 79 | ATH6KL_FW_CAPABILITY_SCHED_SCAN = 1, |
80 | 80 | ||
81 | /* | ||
82 | * Firmware is capable of supporting P2P mgmt operations on a | ||
83 | * station interface. After group formation, the station | ||
84 | * interface will become a P2P client/GO interface as the case may be | ||
85 | */ | ||
86 | ATH6KL_FW_CAPABILITY_STA_P2PDEV_DUPLEX, | ||
87 | |||
81 | /* this needs to be last */ | 88 | /* this needs to be last */ |
82 | ATH6KL_FW_CAPABILITY_MAX, | 89 | ATH6KL_FW_CAPABILITY_MAX, |
83 | }; | 90 | }; |
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c index 75e0f5e9366b..f6f2aa27fc20 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c | |||
@@ -1704,7 +1704,8 @@ int ath6kl_wmi_connect_cmd(struct wmi *wmi, u8 if_idx, | |||
1704 | u8 pairwise_crypto_len, | 1704 | u8 pairwise_crypto_len, |
1705 | enum crypto_type group_crypto, | 1705 | enum crypto_type group_crypto, |
1706 | u8 group_crypto_len, int ssid_len, u8 *ssid, | 1706 | u8 group_crypto_len, int ssid_len, u8 *ssid, |
1707 | u8 *bssid, u16 channel, u32 ctrl_flags) | 1707 | u8 *bssid, u16 channel, u32 ctrl_flags, |
1708 | u8 nw_subtype) | ||
1708 | { | 1709 | { |
1709 | struct sk_buff *skb; | 1710 | struct sk_buff *skb; |
1710 | struct wmi_connect_cmd *cc; | 1711 | struct wmi_connect_cmd *cc; |
@@ -1744,6 +1745,7 @@ int ath6kl_wmi_connect_cmd(struct wmi *wmi, u8 if_idx, | |||
1744 | cc->grp_crypto_len = group_crypto_len; | 1745 | cc->grp_crypto_len = group_crypto_len; |
1745 | cc->ch = cpu_to_le16(channel); | 1746 | cc->ch = cpu_to_le16(channel); |
1746 | cc->ctrl_flags = cpu_to_le32(ctrl_flags); | 1747 | cc->ctrl_flags = cpu_to_le32(ctrl_flags); |
1748 | cc->nw_subtype = nw_subtype; | ||
1747 | 1749 | ||
1748 | if (bssid != NULL) | 1750 | if (bssid != NULL) |
1749 | memcpy(cc->bssid, bssid, ETH_ALEN); | 1751 | memcpy(cc->bssid, bssid, ETH_ALEN); |
@@ -1796,6 +1798,72 @@ int ath6kl_wmi_disconnect_cmd(struct wmi *wmi, u8 if_idx) | |||
1796 | return ret; | 1798 | return ret; |
1797 | } | 1799 | } |
1798 | 1800 | ||
1801 | int ath6kl_wmi_beginscan_cmd(struct wmi *wmi, u8 if_idx, | ||
1802 | enum wmi_scan_type scan_type, | ||
1803 | u32 force_fgscan, u32 is_legacy, | ||
1804 | u32 home_dwell_time, u32 force_scan_interval, | ||
1805 | s8 num_chan, u16 *ch_list, u32 no_cck, u32 *rates) | ||
1806 | { | ||
1807 | struct sk_buff *skb; | ||
1808 | struct wmi_begin_scan_cmd *sc; | ||
1809 | s8 size; | ||
1810 | int i, band, ret; | ||
1811 | struct ath6kl *ar = wmi->parent_dev; | ||
1812 | int num_rates; | ||
1813 | |||
1814 | size = sizeof(struct wmi_begin_scan_cmd); | ||
1815 | |||
1816 | if ((scan_type != WMI_LONG_SCAN) && (scan_type != WMI_SHORT_SCAN)) | ||
1817 | return -EINVAL; | ||
1818 | |||
1819 | if (num_chan > WMI_MAX_CHANNELS) | ||
1820 | return -EINVAL; | ||
1821 | |||
1822 | if (num_chan) | ||
1823 | size += sizeof(u16) * (num_chan - 1); | ||
1824 | |||
1825 | skb = ath6kl_wmi_get_new_buf(size); | ||
1826 | if (!skb) | ||
1827 | return -ENOMEM; | ||
1828 | |||
1829 | sc = (struct wmi_begin_scan_cmd *) skb->data; | ||
1830 | sc->scan_type = scan_type; | ||
1831 | sc->force_fg_scan = cpu_to_le32(force_fgscan); | ||
1832 | sc->is_legacy = cpu_to_le32(is_legacy); | ||
1833 | sc->home_dwell_time = cpu_to_le32(home_dwell_time); | ||
1834 | sc->force_scan_intvl = cpu_to_le32(force_scan_interval); | ||
1835 | sc->no_cck = cpu_to_le32(no_cck); | ||
1836 | sc->num_ch = num_chan; | ||
1837 | |||
1838 | for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | ||
1839 | struct ieee80211_supported_band *sband = | ||
1840 | ar->wiphy->bands[band]; | ||
1841 | u32 ratemask = rates[band]; | ||
1842 | u8 *supp_rates = sc->supp_rates[band].rates; | ||
1843 | num_rates = 0; | ||
1844 | |||
1845 | for (i = 0; i < sband->n_bitrates; i++) { | ||
1846 | if ((BIT(i) & ratemask) == 0) | ||
1847 | continue; /* skip rate */ | ||
1848 | supp_rates[num_rates++] = | ||
1849 | (u8) (sband->bitrates[i].bitrate / 5); | ||
1850 | } | ||
1851 | sc->supp_rates[band].nrates = num_rates; | ||
1852 | } | ||
1853 | |||
1854 | for (i = 0; i < num_chan; i++) | ||
1855 | sc->ch_list[i] = cpu_to_le16(ch_list[i]); | ||
1856 | |||
1857 | ret = ath6kl_wmi_cmd_send(wmi, if_idx, skb, WMI_BEGIN_SCAN_CMDID, | ||
1858 | NO_SYNC_WMIFLAG); | ||
1859 | |||
1860 | return ret; | ||
1861 | } | ||
1862 | |||
1863 | /* ath6kl_wmi_start_scan_cmd is to be deprecated. Use | ||
1864 | * ath6kl_wmi_begin_scan_cmd instead. The new function supports P2P | ||
1865 | * mgmt operations using station interface. | ||
1866 | */ | ||
1799 | int ath6kl_wmi_startscan_cmd(struct wmi *wmi, u8 if_idx, | 1867 | int ath6kl_wmi_startscan_cmd(struct wmi *wmi, u8 if_idx, |
1800 | enum wmi_scan_type scan_type, | 1868 | enum wmi_scan_type scan_type, |
1801 | u32 force_fgscan, u32 is_legacy, | 1869 | u32 force_fgscan, u32 is_legacy, |
@@ -3006,6 +3074,10 @@ int ath6kl_wmi_remain_on_chnl_cmd(struct wmi *wmi, u8 if_idx, u32 freq, u32 dur) | |||
3006 | NO_SYNC_WMIFLAG); | 3074 | NO_SYNC_WMIFLAG); |
3007 | } | 3075 | } |
3008 | 3076 | ||
3077 | /* ath6kl_wmi_send_action_cmd is to be deprecated. Use | ||
3078 | * ath6kl_wmi_send_mgmt_cmd instead. The new function supports P2P | ||
3079 | * mgmt operations using station interface. | ||
3080 | */ | ||
3009 | int ath6kl_wmi_send_action_cmd(struct wmi *wmi, u8 if_idx, u32 id, u32 freq, | 3081 | int ath6kl_wmi_send_action_cmd(struct wmi *wmi, u8 if_idx, u32 id, u32 freq, |
3010 | u32 wait, const u8 *data, u16 data_len) | 3082 | u32 wait, const u8 *data, u16 data_len) |
3011 | { | 3083 | { |
@@ -3043,6 +3115,45 @@ int ath6kl_wmi_send_action_cmd(struct wmi *wmi, u8 if_idx, u32 id, u32 freq, | |||
3043 | NO_SYNC_WMIFLAG); | 3115 | NO_SYNC_WMIFLAG); |
3044 | } | 3116 | } |
3045 | 3117 | ||
3118 | int ath6kl_wmi_send_mgmt_cmd(struct wmi *wmi, u8 if_idx, u32 id, u32 freq, | ||
3119 | u32 wait, const u8 *data, u16 data_len, | ||
3120 | u32 no_cck) | ||
3121 | { | ||
3122 | struct sk_buff *skb; | ||
3123 | struct wmi_send_mgmt_cmd *p; | ||
3124 | u8 *buf; | ||
3125 | |||
3126 | if (wait) | ||
3127 | return -EINVAL; /* Offload for wait not supported */ | ||
3128 | |||
3129 | buf = kmalloc(data_len, GFP_KERNEL); | ||
3130 | if (!buf) | ||
3131 | return -ENOMEM; | ||
3132 | |||
3133 | skb = ath6kl_wmi_get_new_buf(sizeof(*p) + data_len); | ||
3134 | if (!skb) { | ||
3135 | kfree(buf); | ||
3136 | return -ENOMEM; | ||
3137 | } | ||
3138 | |||
3139 | kfree(wmi->last_mgmt_tx_frame); | ||
3140 | memcpy(buf, data, data_len); | ||
3141 | wmi->last_mgmt_tx_frame = buf; | ||
3142 | wmi->last_mgmt_tx_frame_len = data_len; | ||
3143 | |||
3144 | ath6kl_dbg(ATH6KL_DBG_WMI, "send_action_cmd: id=%u freq=%u wait=%u " | ||
3145 | "len=%u\n", id, freq, wait, data_len); | ||
3146 | p = (struct wmi_send_mgmt_cmd *) skb->data; | ||
3147 | p->id = cpu_to_le32(id); | ||
3148 | p->freq = cpu_to_le32(freq); | ||
3149 | p->wait = cpu_to_le32(wait); | ||
3150 | p->no_cck = cpu_to_le32(no_cck); | ||
3151 | p->len = cpu_to_le16(data_len); | ||
3152 | memcpy(p->data, data, data_len); | ||
3153 | return ath6kl_wmi_cmd_send(wmi, if_idx, skb, WMI_SEND_MGMT_CMDID, | ||
3154 | NO_SYNC_WMIFLAG); | ||
3155 | } | ||
3156 | |||
3046 | int ath6kl_wmi_send_probe_response_cmd(struct wmi *wmi, u8 if_idx, u32 freq, | 3157 | int ath6kl_wmi_send_probe_response_cmd(struct wmi *wmi, u8 if_idx, u32 freq, |
3047 | const u8 *dst, const u8 *data, | 3158 | const u8 *dst, const u8 *data, |
3048 | u16 data_len) | 3159 | u16 data_len) |
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h index 85dcdad1f26b..42ac311eda4e 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.h +++ b/drivers/net/wireless/ath/ath6kl/wmi.h | |||
@@ -329,6 +329,10 @@ enum wmi_cmd_id { | |||
329 | WMI_SYNCHRONIZE_CMDID, | 329 | WMI_SYNCHRONIZE_CMDID, |
330 | WMI_CREATE_PSTREAM_CMDID, | 330 | WMI_CREATE_PSTREAM_CMDID, |
331 | WMI_DELETE_PSTREAM_CMDID, | 331 | WMI_DELETE_PSTREAM_CMDID, |
332 | /* WMI_START_SCAN_CMDID is to be deprecated. Use | ||
333 | * WMI_BEGIN_SCAN_CMDID instead. The new cmd supports P2P mgmt | ||
334 | * operations using station interface. | ||
335 | */ | ||
332 | WMI_START_SCAN_CMDID, | 336 | WMI_START_SCAN_CMDID, |
333 | WMI_SET_SCAN_PARAMS_CMDID, | 337 | WMI_SET_SCAN_PARAMS_CMDID, |
334 | WMI_SET_BSS_FILTER_CMDID, | 338 | WMI_SET_BSS_FILTER_CMDID, |
@@ -542,12 +546,61 @@ enum wmi_cmd_id { | |||
542 | WMI_GTK_OFFLOAD_OP_CMDID, | 546 | WMI_GTK_OFFLOAD_OP_CMDID, |
543 | WMI_REMAIN_ON_CHNL_CMDID, | 547 | WMI_REMAIN_ON_CHNL_CMDID, |
544 | WMI_CANCEL_REMAIN_ON_CHNL_CMDID, | 548 | WMI_CANCEL_REMAIN_ON_CHNL_CMDID, |
549 | /* WMI_SEND_ACTION_CMDID is to be deprecated. Use | ||
550 | * WMI_SEND_MGMT_CMDID instead. The new cmd supports P2P mgmt | ||
551 | * operations using station interface. | ||
552 | */ | ||
545 | WMI_SEND_ACTION_CMDID, | 553 | WMI_SEND_ACTION_CMDID, |
546 | WMI_PROBE_REQ_REPORT_CMDID, | 554 | WMI_PROBE_REQ_REPORT_CMDID, |
547 | WMI_DISABLE_11B_RATES_CMDID, | 555 | WMI_DISABLE_11B_RATES_CMDID, |
548 | WMI_SEND_PROBE_RESPONSE_CMDID, | 556 | WMI_SEND_PROBE_RESPONSE_CMDID, |
549 | WMI_GET_P2P_INFO_CMDID, | 557 | WMI_GET_P2P_INFO_CMDID, |
550 | WMI_AP_JOIN_BSS_CMDID, | 558 | WMI_AP_JOIN_BSS_CMDID, |
559 | |||
560 | WMI_SMPS_ENABLE_CMDID, | ||
561 | WMI_SMPS_CONFIG_CMDID, | ||
562 | WMI_SET_RATECTRL_PARM_CMDID, | ||
563 | /* LPL specific commands*/ | ||
564 | WMI_LPL_FORCE_ENABLE_CMDID, | ||
565 | WMI_LPL_SET_POLICY_CMDID, | ||
566 | WMI_LPL_GET_POLICY_CMDID, | ||
567 | WMI_LPL_GET_HWSTATE_CMDID, | ||
568 | WMI_LPL_SET_PARAMS_CMDID, | ||
569 | WMI_LPL_GET_PARAMS_CMDID, | ||
570 | |||
571 | WMI_SET_BUNDLE_PARAM_CMDID, | ||
572 | |||
573 | /*GreenTx specific commands*/ | ||
574 | |||
575 | WMI_GREENTX_PARAMS_CMDID, | ||
576 | |||
577 | WMI_RTT_MEASREQ_CMDID, | ||
578 | WMI_RTT_CAPREQ_CMDID, | ||
579 | WMI_RTT_STATUSREQ_CMDID, | ||
580 | |||
581 | /* WPS Commands */ | ||
582 | WMI_WPS_START_CMDID, | ||
583 | WMI_GET_WPS_STATUS_CMDID, | ||
584 | |||
585 | /* More P2P commands */ | ||
586 | WMI_SET_NOA_CMDID, | ||
587 | WMI_GET_NOA_CMDID, | ||
588 | WMI_SET_OPPPS_CMDID, | ||
589 | WMI_GET_OPPPS_CMDID, | ||
590 | WMI_ADD_PORT_CMDID, | ||
591 | WMI_DEL_PORT_CMDID, | ||
592 | |||
593 | /* 802.11w cmd */ | ||
594 | WMI_SET_RSN_CAP_CMDID, | ||
595 | WMI_GET_RSN_CAP_CMDID, | ||
596 | WMI_SET_IGTK_CMDID, | ||
597 | |||
598 | WMI_RX_FILTER_COALESCE_FILTER_OP_CMDID, | ||
599 | WMI_RX_FILTER_SET_FRAME_TEST_LIST_CMDID, | ||
600 | |||
601 | WMI_SEND_MGMT_CMDID, | ||
602 | WMI_BEGIN_SCAN_CMDID, | ||
603 | |||
551 | }; | 604 | }; |
552 | 605 | ||
553 | enum wmi_mgmt_frame_type { | 606 | enum wmi_mgmt_frame_type { |
@@ -567,6 +620,14 @@ enum network_type { | |||
567 | AP_NETWORK = 0x10, | 620 | AP_NETWORK = 0x10, |
568 | }; | 621 | }; |
569 | 622 | ||
623 | enum network_subtype { | ||
624 | SUBTYPE_NONE, | ||
625 | SUBTYPE_BT, | ||
626 | SUBTYPE_P2PDEV, | ||
627 | SUBTYPE_P2PCLIENT, | ||
628 | SUBTYPE_P2PGO, | ||
629 | }; | ||
630 | |||
570 | enum dot11_auth_mode { | 631 | enum dot11_auth_mode { |
571 | OPEN_AUTH = 0x01, | 632 | OPEN_AUTH = 0x01, |
572 | SHARED_AUTH = 0x02, | 633 | SHARED_AUTH = 0x02, |
@@ -639,6 +700,7 @@ struct wmi_connect_cmd { | |||
639 | __le16 ch; | 700 | __le16 ch; |
640 | u8 bssid[ETH_ALEN]; | 701 | u8 bssid[ETH_ALEN]; |
641 | __le32 ctrl_flags; | 702 | __le32 ctrl_flags; |
703 | u8 nw_subtype; | ||
642 | } __packed; | 704 | } __packed; |
643 | 705 | ||
644 | /* WMI_RECONNECT_CMDID */ | 706 | /* WMI_RECONNECT_CMDID */ |
@@ -726,6 +788,43 @@ enum wmi_scan_type { | |||
726 | WMI_SHORT_SCAN = 1, | 788 | WMI_SHORT_SCAN = 1, |
727 | }; | 789 | }; |
728 | 790 | ||
791 | struct wmi_supp_rates { | ||
792 | u8 nrates; | ||
793 | u8 rates[ATH6KL_RATE_MAXSIZE]; | ||
794 | }; | ||
795 | |||
796 | struct wmi_begin_scan_cmd { | ||
797 | __le32 force_fg_scan; | ||
798 | |||
799 | /* for legacy cisco AP compatibility */ | ||
800 | __le32 is_legacy; | ||
801 | |||
802 | /* max duration in the home channel(msec) */ | ||
803 | __le32 home_dwell_time; | ||
804 | |||
805 | /* time interval between scans (msec) */ | ||
806 | __le32 force_scan_intvl; | ||
807 | |||
808 | /* no CCK rates */ | ||
809 | __le32 no_cck; | ||
810 | |||
811 | /* enum wmi_scan_type */ | ||
812 | u8 scan_type; | ||
813 | |||
814 | /* Supported rates to advertise in the probe request frames */ | ||
815 | struct wmi_supp_rates supp_rates[IEEE80211_NUM_BANDS]; | ||
816 | |||
817 | /* how many channels follow */ | ||
818 | u8 num_ch; | ||
819 | |||
820 | /* channels in Mhz */ | ||
821 | __le16 ch_list[1]; | ||
822 | } __packed; | ||
823 | |||
824 | /* wmi_start_scan_cmd is to be deprecated. Use | ||
825 | * wmi_begin_scan_cmd instead. The new structure supports P2P mgmt | ||
826 | * operations using station interface. | ||
827 | */ | ||
729 | struct wmi_start_scan_cmd { | 828 | struct wmi_start_scan_cmd { |
730 | __le32 force_fg_scan; | 829 | __le32 force_fg_scan; |
731 | 830 | ||
@@ -2036,6 +2135,10 @@ struct wmi_remain_on_chnl_cmd { | |||
2036 | __le32 duration; | 2135 | __le32 duration; |
2037 | } __packed; | 2136 | } __packed; |
2038 | 2137 | ||
2138 | /* wmi_send_action_cmd is to be deprecated. Use | ||
2139 | * wmi_send_mgmt_cmd instead. The new structure supports P2P mgmt | ||
2140 | * operations using station interface. | ||
2141 | */ | ||
2039 | struct wmi_send_action_cmd { | 2142 | struct wmi_send_action_cmd { |
2040 | __le32 id; | 2143 | __le32 id; |
2041 | __le32 freq; | 2144 | __le32 freq; |
@@ -2044,6 +2147,15 @@ struct wmi_send_action_cmd { | |||
2044 | u8 data[0]; | 2147 | u8 data[0]; |
2045 | } __packed; | 2148 | } __packed; |
2046 | 2149 | ||
2150 | struct wmi_send_mgmt_cmd { | ||
2151 | __le32 id; | ||
2152 | __le32 freq; | ||
2153 | __le32 wait; | ||
2154 | __le32 no_cck; | ||
2155 | __le16 len; | ||
2156 | u8 data[0]; | ||
2157 | } __packed; | ||
2158 | |||
2047 | struct wmi_tx_status_event { | 2159 | struct wmi_tx_status_event { |
2048 | __le32 id; | 2160 | __le32 id; |
2049 | u8 ack_status; | 2161 | u8 ack_status; |
@@ -2232,7 +2344,8 @@ int ath6kl_wmi_connect_cmd(struct wmi *wmi, u8 if_idx, | |||
2232 | u8 pairwise_crypto_len, | 2344 | u8 pairwise_crypto_len, |
2233 | enum crypto_type group_crypto, | 2345 | enum crypto_type group_crypto, |
2234 | u8 group_crypto_len, int ssid_len, u8 *ssid, | 2346 | u8 group_crypto_len, int ssid_len, u8 *ssid, |
2235 | u8 *bssid, u16 channel, u32 ctrl_flags); | 2347 | u8 *bssid, u16 channel, u32 ctrl_flags, |
2348 | u8 nw_subtype); | ||
2236 | 2349 | ||
2237 | int ath6kl_wmi_reconnect_cmd(struct wmi *wmi, u8 if_idx, u8 *bssid, | 2350 | int ath6kl_wmi_reconnect_cmd(struct wmi *wmi, u8 if_idx, u8 *bssid, |
2238 | u16 channel); | 2351 | u16 channel); |
@@ -2242,6 +2355,14 @@ int ath6kl_wmi_startscan_cmd(struct wmi *wmi, u8 if_idx, | |||
2242 | u32 force_fgscan, u32 is_legacy, | 2355 | u32 force_fgscan, u32 is_legacy, |
2243 | u32 home_dwell_time, u32 force_scan_interval, | 2356 | u32 home_dwell_time, u32 force_scan_interval, |
2244 | s8 num_chan, u16 *ch_list); | 2357 | s8 num_chan, u16 *ch_list); |
2358 | |||
2359 | int ath6kl_wmi_beginscan_cmd(struct wmi *wmi, u8 if_idx, | ||
2360 | enum wmi_scan_type scan_type, | ||
2361 | u32 force_fgscan, u32 is_legacy, | ||
2362 | u32 home_dwell_time, u32 force_scan_interval, | ||
2363 | s8 num_chan, u16 *ch_list, u32 no_cck, | ||
2364 | u32 *rates); | ||
2365 | |||
2245 | int ath6kl_wmi_scanparams_cmd(struct wmi *wmi, u8 if_idx, u16 fg_start_sec, | 2366 | int ath6kl_wmi_scanparams_cmd(struct wmi *wmi, u8 if_idx, u16 fg_start_sec, |
2246 | u16 fg_end_sec, u16 bg_sec, | 2367 | u16 fg_end_sec, u16 bg_sec, |
2247 | u16 minact_chdw_msec, u16 maxact_chdw_msec, | 2368 | u16 minact_chdw_msec, u16 maxact_chdw_msec, |
@@ -2336,6 +2457,10 @@ int ath6kl_wmi_remain_on_chnl_cmd(struct wmi *wmi, u8 if_idx, u32 freq, | |||
2336 | int ath6kl_wmi_send_action_cmd(struct wmi *wmi, u8 if_idx, u32 id, u32 freq, | 2457 | int ath6kl_wmi_send_action_cmd(struct wmi *wmi, u8 if_idx, u32 id, u32 freq, |
2337 | u32 wait, const u8 *data, u16 data_len); | 2458 | u32 wait, const u8 *data, u16 data_len); |
2338 | 2459 | ||
2460 | int ath6kl_wmi_send_mgmt_cmd(struct wmi *wmi, u8 if_idx, u32 id, u32 freq, | ||
2461 | u32 wait, const u8 *data, u16 data_len, | ||
2462 | u32 no_cck); | ||
2463 | |||
2339 | int ath6kl_wmi_send_probe_response_cmd(struct wmi *wmi, u8 if_idx, u32 freq, | 2464 | int ath6kl_wmi_send_probe_response_cmd(struct wmi *wmi, u8 if_idx, u32 freq, |
2340 | const u8 *dst, const u8 *data, | 2465 | const u8 *dst, const u8 *data, |
2341 | u16 data_len); | 2466 | u16 data_len); |