linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ath6kl: Fix bug in setting default key index for tx in AP mode
@ 2011-11-11 15:03 Vasanthakumar Thiagarajan
  2011-11-11 15:03 ` [PATCH 2/2] ath6kl: Fix bug in setting dot11_auth_mode " Vasanthakumar Thiagarajan
  2011-11-13 10:50 ` [PATCH 1/2] ath6kl: Fix bug in setting default key index for tx " Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Vasanthakumar Thiagarajan @ 2011-11-11 15:03 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless

vif->def_txkey_index is set to key_index in ath6kl_cfg80211_add_key().
If the interface is configured with multiple static wep keys,
vif->def_txkey_index would be holding the index of the last key configured,
not the default tx key index. Remove this unnecessary default key index setting
in ath6kl_cfg80211_add_key() to configure the right key index in WEP thereby
make it work when multiple wep keys are configured.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath6kl/cfg80211.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 603dbda..89414b1 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -974,8 +974,6 @@ static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
 		   __func__, key_index, key->key_len, key_type,
 		   key_usage, key->seq_len);
 
-	vif->def_txkey_index = key_index;
-
 	if (vif->nw_type == AP_NETWORK && !pairwise &&
 	    (key_type == TKIP_CRYPT || key_type == AES_CRYPT) && params) {
 		ar->ap_mode_bkey.valid = true;
@@ -1010,8 +1008,7 @@ static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
 		return 0;
 	}
 
-	return ath6kl_wmi_addkey_cmd(ar->wmi, vif->fw_vif_idx,
-				     vif->def_txkey_index,
+	return ath6kl_wmi_addkey_cmd(ar->wmi, vif->fw_vif_idx, key_index,
 				     key_type, key_usage, key->key_len,
 				     key->seq, key->seq_len, key->key,
 				     KEY_OP_INIT_VAL,
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] ath6kl: Fix bug in setting dot11_auth_mode in AP mode
  2011-11-11 15:03 [PATCH 1/2] ath6kl: Fix bug in setting default key index for tx in AP mode Vasanthakumar Thiagarajan
@ 2011-11-11 15:03 ` Vasanthakumar Thiagarajan
  2011-11-13 10:50 ` [PATCH 1/2] ath6kl: Fix bug in setting default key index for tx " Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Vasanthakumar Thiagarajan @ 2011-11-11 15:03 UTC (permalink / raw)
  To: kvalo; +Cc: linux-wireless

OPEN_AUTH is passed as dot11_auth_mode by default, this would
affect the AP mode when configured with shared authentication
type. Assign appropriate auth type to fix this from driver.
A patch in wpa_supplicant (wpa_supplicant: Set configured auth_algs)
is also needed to fix this.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath6kl/cfg80211.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 89414b1..7250d1a 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -1982,7 +1982,7 @@ static int ath6kl_ap_beacon(struct wiphy *wiphy, struct net_device *dev,
 	int ies_len;
 	struct wmi_connect_cmd p;
 	int res;
-	int i;
+	int i, ret;
 
 	ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: add=%d\n", __func__, add);
 
@@ -2040,7 +2040,9 @@ static int ath6kl_ap_beacon(struct wiphy *wiphy, struct net_device *dev,
 	if (info->hidden_ssid != NL80211_HIDDEN_SSID_NOT_IN_USE)
 		return -EOPNOTSUPP; /* TODO */
 
-	vif->dot11_auth_mode = OPEN_AUTH;
+	ret = ath6kl_set_auth_type(vif, info->auth_type);
+	if (ret)
+		return ret;
 
 	memset(&p, 0, sizeof(p));
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] ath6kl: Fix bug in setting default key index for tx in AP mode
  2011-11-11 15:03 [PATCH 1/2] ath6kl: Fix bug in setting default key index for tx in AP mode Vasanthakumar Thiagarajan
  2011-11-11 15:03 ` [PATCH 2/2] ath6kl: Fix bug in setting dot11_auth_mode " Vasanthakumar Thiagarajan
@ 2011-11-13 10:50 ` Kalle Valo
  1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2011-11-13 10:50 UTC (permalink / raw)
  To: Vasanthakumar Thiagarajan; +Cc: linux-wireless

On 11/11/2011 05:03 PM, Vasanthakumar Thiagarajan wrote:
> vif->def_txkey_index is set to key_index in ath6kl_cfg80211_add_key().
> If the interface is configured with multiple static wep keys,
> vif->def_txkey_index would be holding the index of the last key configured,
> not the default tx key index. Remove this unnecessary default key index setting
> in ath6kl_cfg80211_add_key() to configure the right key index in WEP thereby
> make it work when multiple wep keys are configured.
> 
> Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>

Thanks, both patches applied.

Kalle

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-13 10:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-11 15:03 [PATCH 1/2] ath6kl: Fix bug in setting default key index for tx in AP mode Vasanthakumar Thiagarajan
2011-11-11 15:03 ` [PATCH 2/2] ath6kl: Fix bug in setting dot11_auth_mode " Vasanthakumar Thiagarajan
2011-11-13 10:50 ` [PATCH 1/2] ath6kl: Fix bug in setting default key index for tx " Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).