aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/ath/ath10k/core.c6
-rw-r--r--drivers/net/wireless/ath/ath10k/mac.c12
2 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 577a3d76df22..c83f1e7f8029 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -32,17 +32,14 @@
32 32
33unsigned int ath10k_debug_mask; 33unsigned int ath10k_debug_mask;
34static bool uart_print; 34static bool uart_print;
35static unsigned int ath10k_p2p;
36static bool skip_otp; 35static bool skip_otp;
37 36
38module_param_named(debug_mask, ath10k_debug_mask, uint, 0644); 37module_param_named(debug_mask, ath10k_debug_mask, uint, 0644);
39module_param(uart_print, bool, 0644); 38module_param(uart_print, bool, 0644);
40module_param_named(p2p, ath10k_p2p, uint, 0644);
41module_param(skip_otp, bool, 0644); 39module_param(skip_otp, bool, 0644);
42 40
43MODULE_PARM_DESC(debug_mask, "Debugging mask"); 41MODULE_PARM_DESC(debug_mask, "Debugging mask");
44MODULE_PARM_DESC(uart_print, "Uart target debugging"); 42MODULE_PARM_DESC(uart_print, "Uart target debugging");
45MODULE_PARM_DESC(p2p, "Enable ath10k P2P support");
46MODULE_PARM_DESC(skip_otp, "Skip otp failure for calibration in testmode"); 43MODULE_PARM_DESC(skip_otp, "Skip otp failure for calibration in testmode");
47 44
48static const struct ath10k_hw_params ath10k_hw_params_list[] = { 45static const struct ath10k_hw_params ath10k_hw_params_list[] = {
@@ -1290,10 +1287,7 @@ struct ath10k *ath10k_core_create(size_t priv_size, struct device *dev,
1290 1287
1291 ar->ath_common.priv = ar; 1288 ar->ath_common.priv = ar;
1292 ar->ath_common.hw = ar->hw; 1289 ar->ath_common.hw = ar->hw;
1293
1294 ar->p2p = !!ath10k_p2p;
1295 ar->dev = dev; 1290 ar->dev = dev;
1296
1297 ar->hif.ops = hif_ops; 1291 ar->hif.ops = hif_ops;
1298 ar->hif.bus = bus; 1292 ar->hif.bus = bus;
1299 1293
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 19ddbc6e19e0..42f6a4ddeb5e 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -2961,10 +2961,11 @@ static int ath10k_add_interface(struct ieee80211_hw *hw,
2961 arvif->vdev_id = bit; 2961 arvif->vdev_id = bit;
2962 arvif->vdev_subtype = WMI_VDEV_SUBTYPE_NONE; 2962 arvif->vdev_subtype = WMI_VDEV_SUBTYPE_NONE;
2963 2963
2964 if (ar->p2p)
2965 arvif->vdev_subtype = WMI_VDEV_SUBTYPE_P2P_DEVICE;
2966
2967 switch (vif->type) { 2964 switch (vif->type) {
2965 case NL80211_IFTYPE_P2P_DEVICE:
2966 arvif->vdev_type = WMI_VDEV_TYPE_STA;
2967 arvif->vdev_subtype = WMI_VDEV_SUBTYPE_P2P_DEVICE;
2968 break;
2968 case NL80211_IFTYPE_UNSPECIFIED: 2969 case NL80211_IFTYPE_UNSPECIFIED:
2969 case NL80211_IFTYPE_STATION: 2970 case NL80211_IFTYPE_STATION:
2970 arvif->vdev_type = WMI_VDEV_TYPE_STA; 2971 arvif->vdev_type = WMI_VDEV_TYPE_STA;
@@ -4860,6 +4861,10 @@ static const struct ieee80211_iface_limit ath10k_if_limits[] = {
4860 .types = BIT(NL80211_IFTYPE_P2P_GO) 4861 .types = BIT(NL80211_IFTYPE_P2P_GO)
4861 }, 4862 },
4862 { 4863 {
4864 .max = 1,
4865 .types = BIT(NL80211_IFTYPE_P2P_DEVICE)
4866 },
4867 {
4863 .max = 7, 4868 .max = 7,
4864 .types = BIT(NL80211_IFTYPE_AP) 4869 .types = BIT(NL80211_IFTYPE_AP)
4865 }, 4870 },
@@ -5079,6 +5084,7 @@ int ath10k_mac_register(struct ath10k *ar)
5079 5084
5080 if (!test_bit(ATH10K_FW_FEATURE_NO_P2P, ar->fw_features)) 5085 if (!test_bit(ATH10K_FW_FEATURE_NO_P2P, ar->fw_features))
5081 ar->hw->wiphy->interface_modes |= 5086 ar->hw->wiphy->interface_modes |=
5087 BIT(NL80211_IFTYPE_P2P_DEVICE) |
5082 BIT(NL80211_IFTYPE_P2P_CLIENT) | 5088 BIT(NL80211_IFTYPE_P2P_CLIENT) |
5083 BIT(NL80211_IFTYPE_P2P_GO); 5089 BIT(NL80211_IFTYPE_P2P_GO);
5084 5090