From 39aadf8c29ad959e823efca15381bea9d0770b1e Mon Sep 17 00:00:00 2001 From: "Winkler, Tomas" Date: Fri, 19 Dec 2008 10:37:32 +0800 Subject: iwlwifi: replace IWL_WARNING with IWL_WARN IWL_WARN doesn't use hidden priv pointer. Signed-off-by: Tomas Winkler Signed-off-by: Zhu Yi Signed-off-by: John W. Linville --- drivers/net/wireless/iwlwifi/iwl-sta.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'drivers/net/wireless/iwlwifi/iwl-sta.c') diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 412f66bac1a..41e9013c742 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c @@ -168,7 +168,7 @@ static int iwl_send_add_sta(struct iwl_priv *priv, break; default: ret = -EIO; - IWL_WARNING("REPLY_ADD_STA failed\n"); + IWL_WARN(priv, "REPLY_ADD_STA failed\n"); break; } } @@ -204,7 +204,7 @@ static void iwl_set_ht_add_station(struct iwl_priv *priv, u8 index, case WLAN_HT_CAP_SM_PS_DISABLED: break; default: - IWL_WARNING("Invalid MIMO PS mode %d\n", mimo_ps_mode); + IWL_WARN(priv, "Invalid MIMO PS mode %d\n", mimo_ps_mode); break; } @@ -812,7 +812,7 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv, } if (priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET) { - IWL_WARNING("Removing wrong key %d 0x%x\n", + IWL_WARN(priv, "Removing wrong key %d 0x%x\n", keyconf->keyidx, key_flags); spin_unlock_irqrestore(&priv->sta_lock, flags); return 0; @@ -1069,7 +1069,8 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr) return priv->hw_params.bcast_sta_id; default: - IWL_WARNING("Unknown mode of operation: %d\n", priv->iw_mode); + IWL_WARN(priv, "Unknown mode of operation: %d\n", + priv->iw_mode); return priv->hw_params.bcast_sta_id; } } -- cgit v1.2.3 From 15b1687cb4f45b87ddbe4dfc7759ff5bb69497d2 Mon Sep 17 00:00:00 2001 From: "Winkler, Tomas" Date: Fri, 19 Dec 2008 10:37:33 +0800 Subject: iwlwifi: replace IWL_ERROR with IWL_ERR IWL_ERR doesn't use hidden priv pointer. Signed-off-by: Tomas Winkler Signed-off-by: Zhu Yi Signed-off-by: John W. Linville --- drivers/net/wireless/iwlwifi/iwl-sta.c | 36 ++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 17 deletions(-) (limited to 'drivers/net/wireless/iwlwifi/iwl-sta.c') diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 41e9013c742..672574fb526 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c @@ -87,7 +87,8 @@ static void iwl_sta_ucode_activate(struct iwl_priv *priv, u8 sta_id) spin_lock_irqsave(&priv->sta_lock, flags); if (!(priv->stations[sta_id].used & IWL_STA_DRIVER_ACTIVE)) - IWL_ERROR("ACTIVATE a non DRIVER active station %d\n", sta_id); + IWL_ERR(priv, "ACTIVATE a non DRIVER active station %d\n", + sta_id); priv->stations[sta_id].used |= IWL_STA_UCODE_ACTIVE; IWL_DEBUG_ASSOC("Added STA to Ucode: %pM\n", @@ -105,13 +106,13 @@ static int iwl_add_sta_callback(struct iwl_priv *priv, u8 sta_id = addsta->sta.sta_id; if (!skb) { - IWL_ERROR("Error: Response NULL in REPLY_ADD_STA.\n"); + IWL_ERR(priv, "Error: Response NULL in REPLY_ADD_STA.\n"); return 1; } res = (struct iwl_rx_packet *)skb->data; if (res->hdr.flags & IWL_CMD_FAILED_MSK) { - IWL_ERROR("Bad return from REPLY_ADD_STA (0x%08X)\n", + IWL_ERR(priv, "Bad return from REPLY_ADD_STA (0x%08X)\n", res->hdr.flags); return 1; } @@ -155,7 +156,7 @@ static int iwl_send_add_sta(struct iwl_priv *priv, res = (struct iwl_rx_packet *)cmd.meta.u.skb->data; if (res->hdr.flags & IWL_CMD_FAILED_MSK) { - IWL_ERROR("Bad return from REPLY_ADD_STA (0x%08X)\n", + IWL_ERR(priv, "Bad return from REPLY_ADD_STA (0x%08X)\n", res->hdr.flags); ret = -EIO; } @@ -307,7 +308,7 @@ static void iwl_sta_ucode_deactivate(struct iwl_priv *priv, const char *addr) /* Ucode must be active and driver must be non active */ if (priv->stations[sta_id].used != IWL_STA_UCODE_ACTIVE) - IWL_ERROR("removed non active STA %d\n", sta_id); + IWL_ERR(priv, "removed non active STA %d\n", sta_id); priv->stations[sta_id].used &= ~IWL_STA_UCODE_ACTIVE; @@ -324,13 +325,13 @@ static int iwl_remove_sta_callback(struct iwl_priv *priv, const char *addr = rm_sta->addr; if (!skb) { - IWL_ERROR("Error: Response NULL in REPLY_REMOVE_STA.\n"); + IWL_ERR(priv, "Error: Response NULL in REPLY_REMOVE_STA.\n"); return 1; } res = (struct iwl_rx_packet *)skb->data; if (res->hdr.flags & IWL_CMD_FAILED_MSK) { - IWL_ERROR("Bad return from REPLY_REMOVE_STA (0x%08X)\n", + IWL_ERR(priv, "Bad return from REPLY_REMOVE_STA (0x%08X)\n", res->hdr.flags); return 1; } @@ -340,7 +341,7 @@ static int iwl_remove_sta_callback(struct iwl_priv *priv, iwl_sta_ucode_deactivate(priv, addr); break; default: - IWL_ERROR("REPLY_REMOVE_STA failed\n"); + IWL_ERR(priv, "REPLY_REMOVE_STA failed\n"); break; } @@ -378,7 +379,7 @@ static int iwl_send_remove_station(struct iwl_priv *priv, const u8 *addr, res = (struct iwl_rx_packet *)cmd.meta.u.skb->data; if (res->hdr.flags & IWL_CMD_FAILED_MSK) { - IWL_ERROR("Bad return from REPLY_REMOVE_STA (0x%08X)\n", + IWL_ERR(priv, "Bad return from REPLY_REMOVE_STA (0x%08X)\n", res->hdr.flags); ret = -EIO; } @@ -391,7 +392,7 @@ static int iwl_send_remove_station(struct iwl_priv *priv, const u8 *addr, break; default: ret = -EIO; - IWL_ERROR("REPLY_REMOVE_STA failed\n"); + IWL_ERR(priv, "REPLY_REMOVE_STA failed\n"); break; } } @@ -433,13 +434,13 @@ int iwl_remove_station(struct iwl_priv *priv, const u8 *addr, int is_ap) sta_id, addr); if (!(priv->stations[sta_id].used & IWL_STA_DRIVER_ACTIVE)) { - IWL_ERROR("Removing %pM but non DRIVER active\n", + IWL_ERR(priv, "Removing %pM but non DRIVER active\n", addr); goto out; } if (!(priv->stations[sta_id].used & IWL_STA_UCODE_ACTIVE)) { - IWL_ERROR("Removing %pM but non UCODE active\n", + IWL_ERR(priv, "Removing %pM but non UCODE active\n", addr); goto out; } @@ -475,7 +476,7 @@ void iwl_clear_stations_table(struct iwl_priv *priv) if (iwl_is_alive(priv) && !test_bit(STATUS_EXIT_PENDING, &priv->status) && iwl_send_cmd_pdu_async(priv, REPLY_REMOVE_ALL_STA, 0, NULL, NULL)) - IWL_ERROR("Couldn't clear the station table\n"); + IWL_ERR(priv, "Couldn't clear the station table\n"); priv->num_stations = 0; memset(priv->stations, 0, sizeof(priv->stations)); @@ -548,7 +549,7 @@ int iwl_remove_default_wep_key(struct iwl_priv *priv, spin_lock_irqsave(&priv->sta_lock, flags); if (!test_and_clear_bit(keyconf->keyidx, &priv->ucode_key_table)) - IWL_ERROR("index %d not used in uCode key table.\n", + IWL_ERR(priv, "index %d not used in uCode key table.\n", keyconf->keyidx); priv->default_wep_key--; @@ -582,7 +583,7 @@ int iwl_set_default_wep_key(struct iwl_priv *priv, priv->default_wep_key++; if (test_and_set_bit(keyconf->keyidx, &priv->ucode_key_table)) - IWL_ERROR("index %d already used in uCode key table.\n", + IWL_ERR(priv, "index %d already used in uCode key table.\n", keyconf->keyidx); priv->wep_keys[keyconf->keyidx].key_size = keyconf->keylen; @@ -820,7 +821,7 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv, if (!test_and_clear_bit(priv->stations[sta_id].sta.key.key_offset, &priv->ucode_key_table)) - IWL_ERROR("index %d not used in uCode key table.\n", + IWL_ERR(priv, "index %d not used in uCode key table.\n", priv->stations[sta_id].sta.key.key_offset); memset(&priv->stations[sta_id].keyinfo, 0, sizeof(struct iwl_hw_key)); @@ -857,7 +858,8 @@ int iwl_set_dynamic_key(struct iwl_priv *priv, ret = iwl_set_wep_dynamic_key_info(priv, keyconf, sta_id); break; default: - IWL_ERROR("Unknown alg: %s alg = %d\n", __func__, keyconf->alg); + IWL_ERR(priv, + "Unknown alg: %s alg = %d\n", __func__, keyconf->alg); ret = -EINVAL; } -- cgit v1.2.3 From 01f8162a854df7f9c259c839ad3c1168ac13b7b8 Mon Sep 17 00:00:00 2001 From: Reinette Chatre Date: Thu, 8 Jan 2009 10:20:02 -0800 Subject: iwlwifi: update copyright year to 2009 Signed-off-by: Reinette Chatre Signed-off-by: John W. Linville --- drivers/net/wireless/iwlwifi/iwl-sta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/wireless/iwlwifi/iwl-sta.c') diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 672574fb526..5a214d7690a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright(c) 2003 - 2008 Intel Corporation. All rights reserved. + * Copyright(c) 2003 - 2009 Intel Corporation. All rights reserved. * * Portions of this file are derived from the ipw3945 project, as well * as portions of the ieee80211 subsystem header files. -- cgit v1.2.3 From e724b8fef6088e5dd240b53a38443e48fbcc8e93 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Mon, 5 Jan 2009 17:06:06 +0100 Subject: IWL: fix WARN typo new kew -> a new key Signed-off-by: Jiri Slaby Cc: Tomas Winkler Signed-off-by: John W. Linville --- drivers/net/wireless/iwlwifi/iwl-sta.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/net/wireless/iwlwifi/iwl-sta.c') diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 5a214d7690a..0cbb4495c06 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c @@ -639,7 +639,7 @@ static int iwl_set_wep_dynamic_key_info(struct iwl_priv *priv, * in uCode. */ WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET, - "no space for new kew"); + "no space for a new key"); priv->stations[sta_id].sta.key.key_flags = key_flags; priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK; @@ -687,7 +687,7 @@ static int iwl_set_ccmp_dynamic_key_info(struct iwl_priv *priv, * in uCode. */ WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET, - "no space for new kew"); + "no space for a new key"); priv->stations[sta_id].sta.key.key_flags = key_flags; priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK; @@ -723,7 +723,7 @@ static int iwl_set_tkip_dynamic_key_info(struct iwl_priv *priv, * in uCode. */ WARN(priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET, - "no space for new kew"); + "no space for a new key"); /* This copy is acutally not needed: we get the key with each TX */ memcpy(priv->stations[sta_id].keyinfo.key, keyconf->key, 16); -- cgit v1.2.3 From 17f841cd6cb0837ba0599ad18a746c30ddd83e08 Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Fri, 23 Jan 2009 13:45:20 -0800 Subject: iwl3945: Remaining host command cleanups With the recent host command routines merge, we can now look at the various host command helpers and get rid of the duplicated ones. Signed-off-by: Samuel Ortiz Signed-off-by: Reinette Chatre Signed-off-by: John W. Linville --- drivers/net/wireless/iwlwifi/iwl-sta.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/net/wireless/iwlwifi/iwl-sta.c') diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 0cbb4495c06..9bba98e5e05 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c @@ -86,7 +86,8 @@ static void iwl_sta_ucode_activate(struct iwl_priv *priv, u8 sta_id) spin_lock_irqsave(&priv->sta_lock, flags); - if (!(priv->stations[sta_id].used & IWL_STA_DRIVER_ACTIVE)) + if (!(priv->stations[sta_id].used & IWL_STA_DRIVER_ACTIVE) && + !(priv->stations_39[sta_id].used & IWL_STA_DRIVER_ACTIVE)) IWL_ERR(priv, "ACTIVATE a non DRIVER active station %d\n", sta_id); @@ -131,7 +132,7 @@ static int iwl_add_sta_callback(struct iwl_priv *priv, return 1; } -static int iwl_send_add_sta(struct iwl_priv *priv, +int iwl_send_add_sta(struct iwl_priv *priv, struct iwl_addsta_cmd *sta, u8 flags) { struct iwl_rx_packet *res = NULL; @@ -179,6 +180,7 @@ static int iwl_send_add_sta(struct iwl_priv *priv, return ret; } +EXPORT_SYMBOL(iwl_send_add_sta); static void iwl_set_ht_add_station(struct iwl_priv *priv, u8 index, struct ieee80211_sta_ht_cap *sta_ht_inf) -- cgit v1.2.3 From e1623446bb1de1834ff1c57b3e8ed341d5d4a927 Mon Sep 17 00:00:00 2001 From: Tomas Winkler Date: Tue, 27 Jan 2009 14:27:56 -0800 Subject: iwlwifi: don't use implicit priv in IWL_DEBUG Call IWL_DEBUG macro with explicit priv argument. Signed-off-by: Tomas Winkler Acked-by: Samuel Ortiz Signed-off-by: Reinette Chatre Signed-off-by: John W. Linville --- drivers/net/wireless/iwlwifi/iwl-sta.c | 36 +++++++++++++++++----------------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'drivers/net/wireless/iwlwifi/iwl-sta.c') diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 20dc84152d4..1fae3a6bd8d 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c @@ -60,7 +60,7 @@ u8 iwl_find_station(struct iwl_priv *priv, const u8 *addr) goto out; } - IWL_DEBUG_ASSOC_LIMIT("can not find STA %pM total %d\n", + IWL_DEBUG_ASSOC_LIMIT(priv, "can not find STA %pM total %d\n", addr, priv->num_stations); out: @@ -92,7 +92,7 @@ static void iwl_sta_ucode_activate(struct iwl_priv *priv, u8 sta_id) sta_id); priv->stations[sta_id].used |= IWL_STA_UCODE_ACTIVE; - IWL_DEBUG_ASSOC("Added STA to Ucode: %pM\n", + IWL_DEBUG_ASSOC(priv, "Added STA to Ucode: %pM\n", priv->stations[sta_id].sta.sta.addr); spin_unlock_irqrestore(&priv->sta_lock, flags); @@ -123,7 +123,7 @@ static int iwl_add_sta_callback(struct iwl_priv *priv, iwl_sta_ucode_activate(priv, sta_id); /* fall through */ default: - IWL_DEBUG_HC("Received REPLY_ADD_STA:(0x%08X)\n", + IWL_DEBUG_HC(priv, "Received REPLY_ADD_STA:(0x%08X)\n", res->u.add_sta.status); break; } @@ -166,7 +166,7 @@ int iwl_send_add_sta(struct iwl_priv *priv, switch (res->u.add_sta.status) { case ADD_STA_SUCCESS_MSK: iwl_sta_ucode_activate(priv, sta->sta.sta_id); - IWL_DEBUG_INFO("REPLY_ADD_STA PASSED\n"); + IWL_DEBUG_INFO(priv, "REPLY_ADD_STA PASSED\n"); break; default: ret = -EIO; @@ -272,7 +272,7 @@ u8 iwl_add_station_flags(struct iwl_priv *priv, const u8 *addr, int is_ap, station = &priv->stations[sta_id]; station->used = IWL_STA_DRIVER_ACTIVE; - IWL_DEBUG_ASSOC("Add STA to driver ID %d: %pM\n", + IWL_DEBUG_ASSOC(priv, "Add STA to driver ID %d: %pM\n", sta_id, addr); priv->num_stations++; @@ -304,7 +304,7 @@ static void iwl_sta_ucode_deactivate(struct iwl_priv *priv, const char *addr) BUG_ON(sta_id == IWL_INVALID_STATION); - IWL_DEBUG_ASSOC("Removed STA from Ucode: %pM\n", addr); + IWL_DEBUG_ASSOC(priv, "Removed STA from Ucode: %pM\n", addr); spin_lock_irqsave(&priv->sta_lock, flags); @@ -390,7 +390,7 @@ static int iwl_send_remove_station(struct iwl_priv *priv, const u8 *addr, switch (res->u.rem_sta.status) { case REM_STA_SUCCESS_MSK: iwl_sta_ucode_deactivate(priv, addr); - IWL_DEBUG_ASSOC("REPLY_REMOVE_STA PASSED\n"); + IWL_DEBUG_ASSOC(priv, "REPLY_REMOVE_STA PASSED\n"); break; default: ret = -EIO; @@ -432,7 +432,7 @@ int iwl_remove_station(struct iwl_priv *priv, const u8 *addr, int is_ap) if (unlikely(sta_id == IWL_INVALID_STATION)) goto out; - IWL_DEBUG_ASSOC("Removing STA from driver:%d %pM\n", + IWL_DEBUG_ASSOC(priv, "Removing STA from driver:%d %pM\n", sta_id, addr); if (!(priv->stations[sta_id].used & IWL_STA_DRIVER_ACTIVE)) { @@ -560,7 +560,7 @@ int iwl_remove_default_wep_key(struct iwl_priv *priv, priv->default_wep_key--; memset(&priv->wep_keys[keyconf->keyidx], 0, sizeof(priv->wep_keys[0])); ret = iwl_send_static_wepkey_cmd(priv, 1); - IWL_DEBUG_WEP("Remove default WEP key: idx=%d ret=%d\n", + IWL_DEBUG_WEP(priv, "Remove default WEP key: idx=%d ret=%d\n", keyconf->keyidx, ret); spin_unlock_irqrestore(&priv->sta_lock, flags); @@ -576,7 +576,7 @@ int iwl_set_default_wep_key(struct iwl_priv *priv, if (keyconf->keylen != WEP_KEY_LEN_128 && keyconf->keylen != WEP_KEY_LEN_64) { - IWL_DEBUG_WEP("Bad WEP key length %d\n", keyconf->keylen); + IWL_DEBUG_WEP(priv, "Bad WEP key length %d\n", keyconf->keylen); return -EINVAL; } @@ -596,7 +596,7 @@ int iwl_set_default_wep_key(struct iwl_priv *priv, keyconf->keylen); ret = iwl_send_static_wepkey_cmd(priv, 0); - IWL_DEBUG_WEP("Set default WEP key: len=%d idx=%d ret=%d\n", + IWL_DEBUG_WEP(priv, "Set default WEP key: len=%d idx=%d ret=%d\n", keyconf->keylen, keyconf->keyidx, ret); spin_unlock_irqrestore(&priv->sta_lock, flags); @@ -752,7 +752,7 @@ void iwl_update_tkip_key(struct iwl_priv *priv, sta_id = iwl_find_station(priv, addr); if (sta_id == IWL_INVALID_STATION) { - IWL_DEBUG_MAC80211("leave - %pM not in station map.\n", + IWL_DEBUG_MAC80211(priv, "leave - %pM not in station map.\n", addr); return; } @@ -804,7 +804,7 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv, key_flags = le16_to_cpu(priv->stations[sta_id].sta.key.key_flags); keyidx = (key_flags >> STA_KEY_FLG_KEYID_POS) & 0x3; - IWL_DEBUG_WEP("Remove dynamic key: idx=%d sta=%d\n", + IWL_DEBUG_WEP(priv, "Remove dynamic key: idx=%d sta=%d\n", keyconf->keyidx, sta_id); if (keyconf->keyidx != keyidx) { @@ -868,7 +868,7 @@ int iwl_set_dynamic_key(struct iwl_priv *priv, ret = -EINVAL; } - IWL_DEBUG_WEP("Set dynamic key: alg= %d len=%d idx=%d sta=%d ret=%d\n", + IWL_DEBUG_WEP(priv, "Set dynamic key: alg= %d len=%d idx=%d sta=%d ret=%d\n", keyconf->alg, keyconf->keylen, keyconf->keyidx, sta_id, ret); @@ -881,13 +881,13 @@ static void iwl_dump_lq_cmd(struct iwl_priv *priv, struct iwl_link_quality_cmd *lq) { int i; - IWL_DEBUG_RATE("lq station id 0x%x\n", lq->sta_id); - IWL_DEBUG_RATE("lq ant 0x%X 0x%X\n", + IWL_DEBUG_RATE(priv, "lq station id 0x%x\n", lq->sta_id); + IWL_DEBUG_RATE(priv, "lq ant 0x%X 0x%X\n", lq->general_params.single_stream_ant_msk, lq->general_params.dual_stream_ant_msk); for (i = 0; i < LINK_QUAL_MAX_RETRY_NUM; i++) - IWL_DEBUG_RATE("lq index %d 0x%X\n", + IWL_DEBUG_RATE(priv, "lq index %d 0x%X\n", i, lq->rs_table[i].rate_n_flags); } #else @@ -1064,7 +1064,7 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr) if (sta_id != IWL_INVALID_STATION) return sta_id; - IWL_DEBUG_DROP("Station %pM not in station map. " + IWL_DEBUG_DROP(priv, "Station %pM not in station map. " "Defaulting to broadcast...\n", hdr->addr1); iwl_print_hex_dump(priv, IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr)); -- cgit v1.2.3 From 6e21f15cac2c6c25b6a5874a98420e1b9064f0c1 Mon Sep 17 00:00:00 2001 From: Abhijeet Kolekar Date: Fri, 27 Feb 2009 16:21:21 -0800 Subject: iwl3945: unify set key flow with iwlwifi unify the set key flow with iwlwifi. Signed-off-by: Abhijeet Kolekar Acked-by: Samuel Ortiz Signed-off-by: Reinette Chatre Signed-off-by: John W. Linville --- drivers/net/wireless/iwlwifi/iwl-sta.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/net/wireless/iwlwifi/iwl-sta.c') diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 1fae3a6bd8d..0ea08d08092 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c @@ -490,7 +490,7 @@ void iwl_clear_stations_table(struct iwl_priv *priv) } EXPORT_SYMBOL(iwl_clear_stations_table); -static int iwl_get_free_ucode_key_index(struct iwl_priv *priv) +int iwl_get_free_ucode_key_index(struct iwl_priv *priv) { int i; @@ -500,6 +500,7 @@ static int iwl_get_free_ucode_key_index(struct iwl_priv *priv) return WEP_INVALID_OFFSET; } +EXPORT_SYMBOL(iwl_get_free_ucode_key_index); int iwl_send_static_wepkey_cmd(struct iwl_priv *priv, u8 send_if_empty) { -- cgit v1.2.3 From 48676eb3c3de9013de7d9a63fb8ffb70cd540d95 Mon Sep 17 00:00:00 2001 From: Mohamed Abbas Date: Wed, 11 Mar 2009 11:17:59 -0700 Subject: iwlagn: fix warning when set WEP key iwl_clear_station_table will be called every time rxon called. In this function ucode_key_table is set to 0 even though a static WEP security is set. This will cause in many warning and might be an issue if dynamic WEP is set. This patch make sure we keep track of all existing static WEP when this function is called. Signed-off-by: Mohamed Abbas Signed-off-by: Reinette Chatre Signed-off-by: John W. Linville --- drivers/net/wireless/iwlwifi/iwl-sta.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/net/wireless/iwlwifi/iwl-sta.c') diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 0ea08d08092..1684490d93c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c @@ -472,6 +472,7 @@ EXPORT_SYMBOL(iwl_remove_station); void iwl_clear_stations_table(struct iwl_priv *priv) { unsigned long flags; + int i; spin_lock_irqsave(&priv->sta_lock, flags); @@ -486,6 +487,12 @@ void iwl_clear_stations_table(struct iwl_priv *priv) /* clean ucode key table bit map */ priv->ucode_key_table = 0; + /* keep track of static keys */ + for (i = 0; i < WEP_KEYS_MAX ; i++) { + if (priv->wep_keys[i].key_size) + test_and_set_bit(i, &priv->ucode_key_table); + } + spin_unlock_irqrestore(&priv->sta_lock, flags); } EXPORT_SYMBOL(iwl_clear_stations_table); -- cgit v1.2.3 From a2f1cbebdccc866d6c7da9eb655d35b5c60d33a0 Mon Sep 17 00:00:00 2001 From: Wey-Yi Guy Date: Tue, 17 Mar 2009 21:51:52 -0700 Subject: iwlwifi: report error when detect failure during stop agg queue This fix related to bug 1921 at http://www.intellinuxwireless.org/bugzilla/show_bug.cgi?id=1921 when detect error during stopping tx aggregation queue, report the error to help identify the problem. Signed-off-by: Wey-Yi Guy Signed-off-by: Reinette Chatre Signed-off-by: John W. Linville --- drivers/net/wireless/iwlwifi/iwl-sta.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/net/wireless/iwlwifi/iwl-sta.c') diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 1684490d93c..5798fe49c77 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c @@ -1138,8 +1138,10 @@ int iwl_sta_rx_agg_stop(struct iwl_priv *priv, const u8 *addr, int tid) int sta_id; sta_id = iwl_find_station(priv, addr); - if (sta_id == IWL_INVALID_STATION) + if (sta_id == IWL_INVALID_STATION) { + IWL_ERR(priv, "Invalid station for AGG tid %d\n", tid); return -ENXIO; + } spin_lock_irqsave(&priv->sta_lock, flags); priv->stations[sta_id].sta.station_flags_msk = 0; -- cgit v1.2.3