public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mac80211: fix redundant if in transmit path
@ 2012-11-30 19:25 Simon Wunderlich
  2012-11-30 21:11 ` Johannes Berg
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Wunderlich @ 2012-11-30 19:25 UTC (permalink / raw)
  To: linux-wireless; +Cc: linville, johannes, Simon Wunderlich

This is already in the right switch branch, no need to check again and
provoke a compiler warning about chanctx_conf might be used
uninitialized.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
---
 net/mac80211/tx.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index d287a4f..ccf0499 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1790,8 +1790,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
 		memcpy(hdr.addr2, sdata->vif.addr, ETH_ALEN);
 		memcpy(hdr.addr3, skb->data + ETH_ALEN, ETH_ALEN);
 		hdrlen = 24;
-		if (sdata->vif.type == NL80211_IFTYPE_AP)
-			chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+		chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
 		if (!chanctx_conf)
 			goto fail_rcu;
 		band = chanctx_conf->def.chan->band;
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-11-30 23:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-30 19:25 [PATCH] mac80211: fix redundant if in transmit path Simon Wunderlich
2012-11-30 21:11 ` Johannes Berg
2012-11-30 23:55   ` Simon Wunderlich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox