aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWey-Yi Guy <wey-yi.w.guy@intel.com>2011-01-13 20:09:29 -0500
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2011-01-21 18:51:16 -0500
commitf35c0c560994226847fa33f0021046a44ab1460f (patch)
treeff638a8d5b794b02248e94fdf43f394c7593f664
parent940739196c78576590dd155c1b9d8a705cea2af1 (diff)
iwlwifi: initial P2P support
If PAN functionality is present, advertise P2P interface type support and thus support for P2P. However, the support is currently somewhat incomplete -- NoA schedule isn't added to probe responses, and 11b bitrates may be used still, etc. Therefore, make it all optional with a Kconfig option. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/Kconfig16
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c5
3 files changed, 23 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/Kconfig b/drivers/net/wireless/iwlwifi/Kconfig
index 236f9000b895..e1e3b1cf3cff 100644
--- a/drivers/net/wireless/iwlwifi/Kconfig
+++ b/drivers/net/wireless/iwlwifi/Kconfig
@@ -116,6 +116,22 @@ config IWL5000
116 Intel 100 Series Wi-Fi Adapters (100BGN and 130BGN) 116 Intel 100 Series Wi-Fi Adapters (100BGN and 130BGN)
117 Intel 2000 Series Wi-Fi Adapters 117 Intel 2000 Series Wi-Fi Adapters
118 118
119config IWL_P2P
120 bool "iwlwifi experimental P2P support"
121 depends on IWL5000
122 help
123 This option enables experimental P2P support for some devices
124 based on microcode support. Since P2P support is still under
125 development, this option may even enable it for some devices
126 now that turn out to not support it in the future due to
127 microcode restrictions.
128
129 To determine if your microcode supports the experimental P2P
130 offered by this option, check if the driver advertises AP
131 support when it is loaded.
132
133 Say Y only if you want to experiment with P2P.
134
119config IWL3945 135config IWL3945
120 tristate "Intel PRO/Wireless 3945ABG/BG Network Connection (iwl3945)" 136 tristate "Intel PRO/Wireless 3945ABG/BG Network Connection (iwl3945)"
121 depends on IWLWIFI 137 depends on IWLWIFI
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 02771ef787fd..eb16647cfbe0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -4136,6 +4136,10 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
4136 priv->contexts[IWL_RXON_CTX_PAN].mcast_queue = IWL_IPAN_MCAST_QUEUE; 4136 priv->contexts[IWL_RXON_CTX_PAN].mcast_queue = IWL_IPAN_MCAST_QUEUE;
4137 priv->contexts[IWL_RXON_CTX_PAN].interface_modes = 4137 priv->contexts[IWL_RXON_CTX_PAN].interface_modes =
4138 BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_AP); 4138 BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_AP);
4139#ifdef CONFIG_IWL_P2P
4140 priv->contexts[IWL_RXON_CTX_PAN].interface_modes |=
4141 BIT(NL80211_IFTYPE_P2P_CLIENT) | BIT(NL80211_IFTYPE_P2P_GO);
4142#endif
4139 priv->contexts[IWL_RXON_CTX_PAN].ap_devtype = RXON_DEV_TYPE_CP; 4143 priv->contexts[IWL_RXON_CTX_PAN].ap_devtype = RXON_DEV_TYPE_CP;
4140 priv->contexts[IWL_RXON_CTX_PAN].station_devtype = RXON_DEV_TYPE_2STA; 4144 priv->contexts[IWL_RXON_CTX_PAN].station_devtype = RXON_DEV_TYPE_2STA;
4141 priv->contexts[IWL_RXON_CTX_PAN].unused_devtype = RXON_DEV_TYPE_P2P; 4145 priv->contexts[IWL_RXON_CTX_PAN].unused_devtype = RXON_DEV_TYPE_P2P;
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 8e1b8014ddc1..a46ad60216a0 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1404,9 +1404,10 @@ int iwl_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
1404 struct iwl_vif_priv *vif_priv = (void *)vif->drv_priv; 1404 struct iwl_vif_priv *vif_priv = (void *)vif->drv_priv;
1405 struct iwl_rxon_context *tmp, *ctx = NULL; 1405 struct iwl_rxon_context *tmp, *ctx = NULL;
1406 int err; 1406 int err;
1407 enum nl80211_iftype viftype = ieee80211_vif_type_p2p(vif);
1407 1408
1408 IWL_DEBUG_MAC80211(priv, "enter: type %d, addr %pM\n", 1409 IWL_DEBUG_MAC80211(priv, "enter: type %d, addr %pM\n",
1409 vif->type, vif->addr); 1410 viftype, vif->addr);
1410 1411
1411 mutex_lock(&priv->mutex); 1412 mutex_lock(&priv->mutex);
1412 1413
@@ -1430,7 +1431,7 @@ int iwl_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
1430 continue; 1431 continue;
1431 } 1432 }
1432 1433
1433 if (!(possible_modes & BIT(vif->type))) 1434 if (!(possible_modes & BIT(viftype)))
1434 continue; 1435 continue;
1435 1436
1436 /* have maybe usable context w/o interface */ 1437 /* have maybe usable context w/o interface */