diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-sta.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-sta.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c index 7353826095f1..d6aab00272b9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /****************************************************************************** | 1 | /****************************************************************************** |
2 | * | 2 | * |
3 | * Copyright(c) 2003 - 2011 Intel Corporation. All rights reserved. | 3 | * Copyright(c) 2003 - 2012 Intel Corporation. All rights reserved. |
4 | * | 4 | * |
5 | * Portions of this file are derived from the ipw3945 project, as well | 5 | * Portions of this file are derived from the ipw3945 project, as well |
6 | * as portions of the ieee80211 subsystem header files. | 6 | * as portions of the ieee80211 subsystem header files. |
@@ -35,9 +35,12 @@ | |||
35 | #include "iwl-trans.h" | 35 | #include "iwl-trans.h" |
36 | 36 | ||
37 | /* priv->shrd->sta_lock must be held */ | 37 | /* priv->shrd->sta_lock must be held */ |
38 | static void iwl_sta_ucode_activate(struct iwl_priv *priv, u8 sta_id) | 38 | static int iwl_sta_ucode_activate(struct iwl_priv *priv, u8 sta_id) |
39 | { | 39 | { |
40 | 40 | if (sta_id >= IWLAGN_STATION_COUNT) { | |
41 | IWL_ERR(priv, "invalid sta_id %u", sta_id); | ||
42 | return -EINVAL; | ||
43 | } | ||
41 | if (!(priv->stations[sta_id].used & IWL_STA_DRIVER_ACTIVE)) | 44 | if (!(priv->stations[sta_id].used & IWL_STA_DRIVER_ACTIVE)) |
42 | IWL_ERR(priv, "ACTIVATE a non DRIVER active station id %u " | 45 | IWL_ERR(priv, "ACTIVATE a non DRIVER active station id %u " |
43 | "addr %pM\n", | 46 | "addr %pM\n", |
@@ -53,6 +56,7 @@ static void iwl_sta_ucode_activate(struct iwl_priv *priv, u8 sta_id) | |||
53 | IWL_DEBUG_ASSOC(priv, "Added STA id %u addr %pM to uCode\n", | 56 | IWL_DEBUG_ASSOC(priv, "Added STA id %u addr %pM to uCode\n", |
54 | sta_id, priv->stations[sta_id].sta.sta.addr); | 57 | sta_id, priv->stations[sta_id].sta.sta.addr); |
55 | } | 58 | } |
59 | return 0; | ||
56 | } | 60 | } |
57 | 61 | ||
58 | static int iwl_process_add_sta_resp(struct iwl_priv *priv, | 62 | static int iwl_process_add_sta_resp(struct iwl_priv *priv, |
@@ -77,8 +81,7 @@ static int iwl_process_add_sta_resp(struct iwl_priv *priv, | |||
77 | switch (pkt->u.add_sta.status) { | 81 | switch (pkt->u.add_sta.status) { |
78 | case ADD_STA_SUCCESS_MSK: | 82 | case ADD_STA_SUCCESS_MSK: |
79 | IWL_DEBUG_INFO(priv, "REPLY_ADD_STA PASSED\n"); | 83 | IWL_DEBUG_INFO(priv, "REPLY_ADD_STA PASSED\n"); |
80 | iwl_sta_ucode_activate(priv, sta_id); | 84 | ret = iwl_sta_ucode_activate(priv, sta_id); |
81 | ret = 0; | ||
82 | break; | 85 | break; |
83 | case ADD_STA_NO_ROOM_IN_TABLE: | 86 | case ADD_STA_NO_ROOM_IN_TABLE: |
84 | IWL_ERR(priv, "Adding station %d failed, no room in table.\n", | 87 | IWL_ERR(priv, "Adding station %d failed, no room in table.\n", |