Skip to content

Commit

Permalink
iwlwifi: remove pointless sta_id invalid check
Browse files Browse the repository at this point in the history
lq->sta_id cannot be invalid here since this
function will only be called after the station
has been added properly.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
  • Loading branch information
Johannes Berg authored and Reinette Chatre committed Apr 9, 2010
1 parent a90178f commit 76c3c69
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/net/wireless/iwlwifi/iwl-sta.c
Original file line number Diff line number Diff line change
Expand Up @@ -1187,13 +1187,9 @@ int iwl_send_lq_cmd(struct iwl_priv *priv,
.data = lq,
};

if ((lq->sta_id == 0xFF) &&
(priv->iw_mode == NL80211_IFTYPE_ADHOC))
if (WARN_ON(lq->sta_id == IWL_INVALID_STATION))
return -EINVAL;

if (lq->sta_id == 0xFF)
lq->sta_id = IWL_AP_ID;

iwl_dump_lq_cmd(priv, lq);
BUG_ON(init && (cmd.flags & CMD_ASYNC));

Expand Down

0 comments on commit 76c3c69

Please sign in to comment.