From: Johannes Berg Date: Tue, 30 Mar 2010 09:46:29 +0000 (-0700) Subject: iwlwifi: remove pointless sta_id invalid check X-Git-Tag: v2.6.35-rc1~473^2~167^2~309^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=76c3c698bf47927fb31044fa2f4321c99ed7411d;p=profile%2Fivi%2Fkernel-x86-ivi.git iwlwifi: remove pointless sta_id invalid check 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 Signed-off-by: Reinette Chatre --- diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index a43493f..6876f7c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c @@ -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));