Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203259
b: refs/heads/master
c: 09034cb
h: refs/heads/master
i:
  203257: 974d566
  203255: bed07e3
v: v3
  • Loading branch information
Johannes Berg authored and Reinette Chatre committed Jun 21, 2010
1 parent 718263f commit 9120a78
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e666674eec98752d82388ae009e9039a62e744e7
refs/heads/master: 09034cb77ec8530728dd672db7580faeaa29df10
16 changes: 10 additions & 6 deletions trunk/drivers/net/wireless/iwlwifi/iwl-sta.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,19 @@ static void iwl_sta_ucode_activate(struct iwl_priv *priv, u8 sta_id)
}
}

static void iwl_process_add_sta_resp(struct iwl_priv *priv,
struct iwl_addsta_cmd *addsta,
struct iwl_rx_packet *pkt,
bool sync)
static int iwl_process_add_sta_resp(struct iwl_priv *priv,
struct iwl_addsta_cmd *addsta,
struct iwl_rx_packet *pkt,
bool sync)
{
u8 sta_id = addsta->sta.sta_id;
unsigned long flags;
int ret = -EIO;

if (pkt->hdr.flags & IWL_CMD_FAILED_MSK) {
IWL_ERR(priv, "Bad return from REPLY_ADD_STA (0x%08X)\n",
pkt->hdr.flags);
return;
return ret;
}

IWL_DEBUG_INFO(priv, "Processing response for adding station %u\n",
Expand All @@ -78,6 +79,7 @@ static void iwl_process_add_sta_resp(struct iwl_priv *priv,
case ADD_STA_SUCCESS_MSK:
IWL_DEBUG_INFO(priv, "REPLY_ADD_STA PASSED\n");
iwl_sta_ucode_activate(priv, sta_id);
ret = 0;
break;
case ADD_STA_NO_ROOM_IN_TABLE:
IWL_ERR(priv, "Adding station %d failed, no room in table.\n",
Expand Down Expand Up @@ -115,6 +117,8 @@ static void iwl_process_add_sta_resp(struct iwl_priv *priv,
STA_CONTROL_MODIFY_MSK ? "Modified" : "Added",
addsta->sta.addr);
spin_unlock_irqrestore(&priv->sta_lock, flags);

return ret;
}

static void iwl_add_sta_callback(struct iwl_priv *priv,
Expand Down Expand Up @@ -159,7 +163,7 @@ int iwl_send_add_sta(struct iwl_priv *priv,

if (ret == 0) {
pkt = (struct iwl_rx_packet *)cmd.reply_page;
iwl_process_add_sta_resp(priv, sta, pkt, true);
ret = iwl_process_add_sta_resp(priv, sta, pkt, true);
}
iwl_free_pages(priv, cmd.reply_page);

Expand Down

0 comments on commit 9120a78

Please sign in to comment.