Skip to contentSkip to conversation

libertas: precedence bug

PATCH In review Dan Carpenter 2 participants 2 messages Jul 22, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libertas: precedence bug

Negate has precedence over comparison so the original test was always false. (Neither 0 nor 1 are equal to NL80211_IFTYPE_MONITOR).

drivers/net/wireless/libertas/tx.c +1 -1
index 411a3bb..8000ca6 100644
@@ -180,7 +180,7 @@ void lbs_send_tx_feedback(struct lbs_private *priv, u32 try_count)
 {
 	struct tx_radiotap_hdr *radiotap_hdr;
 
-	if (!priv->wdev->iftype = NL80211_IFTYPE_MONITOR ||
+	if (priv->wdev->iftype != NL80211_IFTYPE_MONITOR ||
 	    priv->currenttxskb = NULL)
 		return;
 
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Dan Carpenter

Negate has precedence over comparison so the original test was always false. (Neither 0 nor 1 are equal to NL80211_IFTYPE_MONITOR).

Quoted 17 lines
drivers/net/wireless/libertas/tx.c +1 -2
index 411a3bb..8000ca6 100644
@@ -180,7 +180,7 @@ void lbs_send_tx_feedback(struct lbs_private *priv, u32 try_count)
 {
 	struct tx_radiotap_hdr *radiotap_hdr;
 
-	if (!priv->wdev->iftype = NL80211_IFTYPE_MONITOR ||
+	if (priv->wdev->iftype != NL80211_IFTYPE_MONITOR ||
 	    priv->currenttxskb = NULL)
 		return;
 
--

To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html