linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath6kl: Do not hide ath6kl_wmi_addkey_cmd() error values
@ 2011-11-02 21:46 Jouni Malinen
  2011-11-03 17:08 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Jouni Malinen @ 2011-11-02 21:46 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless

Instead of converting any error to EIO, just return the real error
value to upper layers.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath6kl/cfg80211.c |   37 ++++++++++------------------
 1 files changed, 13 insertions(+), 24 deletions(-)

diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 3b9511a..04d24d4 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -908,7 +908,6 @@ static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
 	struct ath6kl_key *key = NULL;
 	u8 key_usage;
 	u8 key_type;
-	int status = 0;
 
 	if (!ath6kl_cfg80211_ready(vif))
 		return -EIO;
@@ -1011,17 +1010,12 @@ static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
 		return 0;
 	}
 
-	status = ath6kl_wmi_addkey_cmd(ar->wmi, vif->fw_vif_idx,
-				       vif->def_txkey_index,
-				       key_type, key_usage, key->key_len,
-				       key->seq, key->seq_len, key->key,
-				       KEY_OP_INIT_VAL,
-				       (u8 *) mac_addr, SYNC_BOTH_WMIFLAG);
-
-	if (status)
-		return -EIO;
-
-	return 0;
+	return ath6kl_wmi_addkey_cmd(ar->wmi, vif->fw_vif_idx,
+				     vif->def_txkey_index,
+				     key_type, key_usage, key->key_len,
+				     key->seq, key->seq_len, key->key,
+				     KEY_OP_INIT_VAL,
+				     (u8 *) mac_addr, SYNC_BOTH_WMIFLAG);
 }
 
 static int ath6kl_cfg80211_del_key(struct wiphy *wiphy, struct net_device *ndev,
@@ -1097,7 +1091,6 @@ static int ath6kl_cfg80211_set_default_key(struct wiphy *wiphy,
 	struct ath6kl *ar = (struct ath6kl *)ath6kl_priv(ndev);
 	struct ath6kl_vif *vif = netdev_priv(ndev);
 	struct ath6kl_key *key = NULL;
-	int status = 0;
 	u8 key_usage;
 	enum crypto_type key_type = NONE_CRYPT;
 
@@ -1132,17 +1125,13 @@ static int ath6kl_cfg80211_set_default_key(struct wiphy *wiphy,
 	if (vif->next_mode == AP_NETWORK && !test_bit(CONNECTED, &vif->flags))
 		return 0; /* Delay until AP mode has been started */
 
-	status = ath6kl_wmi_addkey_cmd(ar->wmi, vif->fw_vif_idx,
-				       vif->def_txkey_index,
-				       key_type, key_usage,
-				       key->key_len, key->seq, key->seq_len,
-				       key->key,
-				       KEY_OP_INIT_VAL, NULL,
-				       SYNC_BOTH_WMIFLAG);
-	if (status)
-		return -EIO;
-
-	return 0;
+	return ath6kl_wmi_addkey_cmd(ar->wmi, vif->fw_vif_idx,
+				     vif->def_txkey_index,
+				     key_type, key_usage,
+				     key->key_len, key->seq, key->seq_len,
+				     key->key,
+				     KEY_OP_INIT_VAL, NULL,
+				     SYNC_BOTH_WMIFLAG);
 }
 
 void ath6kl_cfg80211_tkip_micerr_event(struct ath6kl_vif *vif, u8 keyid,
-- 
1.7.4.1


-- 
Jouni Malinen                                            PGP id EFC895FA

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

* Re: [PATCH] ath6kl: Do not hide ath6kl_wmi_addkey_cmd() error values
  2011-11-02 21:46 [PATCH] ath6kl: Do not hide ath6kl_wmi_addkey_cmd() error values Jouni Malinen
@ 2011-11-03 17:08 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2011-11-03 17:08 UTC (permalink / raw)
  To: Jouni Malinen; +Cc: linux-wireless

On 11/02/2011 11:46 PM, Jouni Malinen wrote:
> Instead of converting any error to EIO, just return the real error
> value to upper layers.

Thanks, applied.

Kalle

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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-02 21:46 [PATCH] ath6kl: Do not hide ath6kl_wmi_addkey_cmd() error values Jouni Malinen
2011-11-03 17:08 ` 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).