Skip to contentSkip to conversation

mac80211: fix for tx.c compiler warnings.

PATCH In review Atul Sowani 2 participants 2 messages Nov 8, 2010 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: fix for tx.c compiler warnings.

Added conditional compilation with CONFIG_MAC80211_MESH to avoid compile time warning about declared but unused variable.

---

net/mac80211/tx.c +2 -0
diff -uprN a/net/mac80211/tx.c b/net/mac80211/tx.c
@@ -1699,7 +1699,9 @@ netdev_tx_t ieee80211_subif_start_xmit(s
 	u16 ethertype, hdrlen,  meshhdrlen = 0;
 	__le16 fc;
 	struct ieee80211_hdr hdr;
+#ifdef CONFIG_MAC80211_MESH
 	struct ieee80211s_hdr mesh_hdr;
+#endif
 	const u8 *encaps_data;
 	int encaps_len, skip_header_bytes;
 	int nh_pos, h_pos;
Signature · 3 lines
Atul Sowani ([email protected])
http://savannah.gnu.org/users/atul
------------------------------------------------------------------------
maintainer
#1 lore raw
Quoted 3 lines · Atul Sowani

Added conditional compilation with CONFIG_MAC80211_MESH to avoid compile time
warning about declared but unused variable.

2.6.36? Really? a trivial warning fix for the stable tree? I don't think so...

net/mac80211/tx.c netdev_tx_t ieee80211_subif_start_xmit(s · line 1704

Quoted 3 lines
net/mac80211/tx.c +2 -0
+#ifdef CONFIG_MAC80211_MESH
 	struct ieee80211s_hdr mesh_hdr;
+#endif

Besides, it should be __maybe_unused.

johannes