]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
iwlwifi: remove pointless sta_id invalid check
authorJohannes Berg <johannes.berg@intel.com>
Tue, 30 Mar 2010 09:46:29 +0000 (02:46 -0700)
committerReinette Chatre <reinette.chatre@intel.com>
Fri, 9 Apr 2010 18:28:03 +0000 (11:28 -0700)
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>
drivers/net/wireless/iwlwifi/iwl-sta.c

index a43493f2abcfb62f7ada18619b224eb452e903a6..6876f7c59368ad913ad94831a1c99a3406b4bfd9 100644 (file)
@@ -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));