svn commit: r215621 - stable/8/sys/net80211

Bernhard Schmidt bschmidt at FreeBSD.org
Sun Nov 21 11:03:23 UTC 2010


Author: bschmidt
Date: Sun Nov 21 11:03:22 2010
New Revision: 215621
URL: http://svn.freebsd.org/changeset/base/215621

Log:
  MFC r203422,r203556:
  When taking the AMPDU reorder fastpath, need_tap wasn't being
  initialized. Initialize on declaration to avoid this.
  
  Found with:	clang static analyzer
  Committed by:	rpaulo

Modified:
  stable/8/sys/net80211/ieee80211_adhoc.c
  stable/8/sys/net80211/ieee80211_hostap.c
  stable/8/sys/net80211/ieee80211_sta.c
  stable/8/sys/net80211/ieee80211_wds.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/net80211/ieee80211_adhoc.c
==============================================================================
--- stable/8/sys/net80211/ieee80211_adhoc.c	Sun Nov 21 11:01:56 2010	(r215620)
+++ stable/8/sys/net80211/ieee80211_adhoc.c	Sun Nov 21 11:03:22 2010	(r215621)
@@ -293,7 +293,7 @@ adhoc_input(struct ieee80211_node *ni, s
 	struct ieee80211_frame *wh;
 	struct ieee80211_key *key;
 	struct ether_header *eh;
-	int hdrspace, need_tap;
+	int hdrspace, need_tap = 1;	/* mbuf need to be tapped. */	
 	uint8_t dir, type, subtype, qos;
 	uint8_t *bssid;
 	uint16_t rxseq;
@@ -318,7 +318,6 @@ adhoc_input(struct ieee80211_node *ni, s
 	KASSERT(ni != NULL, ("null node"));
 	ni->ni_inact = ni->ni_inact_reload;
 
-	need_tap = 1;			/* mbuf need to be tapped. */
 	type = -1;			/* undefined */
 
 	if (m->m_pkthdr.len < sizeof(struct ieee80211_frame_min)) {

Modified: stable/8/sys/net80211/ieee80211_hostap.c
==============================================================================
--- stable/8/sys/net80211/ieee80211_hostap.c	Sun Nov 21 11:01:56 2010	(r215620)
+++ stable/8/sys/net80211/ieee80211_hostap.c	Sun Nov 21 11:03:22 2010	(r215621)
@@ -480,7 +480,7 @@ hostap_input(struct ieee80211_node *ni, 
 	struct ieee80211_frame *wh;
 	struct ieee80211_key *key;
 	struct ether_header *eh;
-	int hdrspace, need_tap;
+	int hdrspace, need_tap = 1;	/* mbuf need to be tapped. */
 	uint8_t dir, type, subtype, qos;
 	uint8_t *bssid;
 	uint16_t rxseq;
@@ -505,7 +505,6 @@ hostap_input(struct ieee80211_node *ni, 
 	KASSERT(ni != NULL, ("null node"));
 	ni->ni_inact = ni->ni_inact_reload;
 
-	need_tap = 1;			/* mbuf need to be tapped. */
 	type = -1;			/* undefined */
 
 	if (m->m_pkthdr.len < sizeof(struct ieee80211_frame_min)) {

Modified: stable/8/sys/net80211/ieee80211_sta.c
==============================================================================
--- stable/8/sys/net80211/ieee80211_sta.c	Sun Nov 21 11:01:56 2010	(r215620)
+++ stable/8/sys/net80211/ieee80211_sta.c	Sun Nov 21 11:03:22 2010	(r215621)
@@ -520,7 +520,7 @@ sta_input(struct ieee80211_node *ni, str
 	struct ieee80211_frame *wh;
 	struct ieee80211_key *key;
 	struct ether_header *eh;
-	int hdrspace, need_tap;
+	int hdrspace, need_tap = 1;	/* mbuf need to be tapped. */
 	uint8_t dir, type, subtype, qos;
 	uint8_t *bssid;
 	uint16_t rxseq;
@@ -545,7 +545,6 @@ sta_input(struct ieee80211_node *ni, str
 	KASSERT(ni != NULL, ("null node"));
 	ni->ni_inact = ni->ni_inact_reload;
 
-	need_tap = 1;			/* mbuf need to be tapped. */
 	type = -1;			/* undefined */
 
 	if (m->m_pkthdr.len < sizeof(struct ieee80211_frame_min)) {

Modified: stable/8/sys/net80211/ieee80211_wds.c
==============================================================================
--- stable/8/sys/net80211/ieee80211_wds.c	Sun Nov 21 11:01:56 2010	(r215620)
+++ stable/8/sys/net80211/ieee80211_wds.c	Sun Nov 21 11:03:22 2010	(r215621)
@@ -414,7 +414,7 @@ wds_input(struct ieee80211_node *ni, str
 	struct ieee80211_frame *wh;
 	struct ieee80211_key *key;
 	struct ether_header *eh;
-	int hdrspace, need_tap;
+	int hdrspace, need_tap = 1;	/* mbuf need to be tapped. */
 	uint8_t dir, type, subtype, qos;
 	uint16_t rxseq;
 
@@ -437,7 +437,6 @@ wds_input(struct ieee80211_node *ni, str
 
 	KASSERT(ni != NULL, ("null node"));
 
-	need_tap = 1;			/* mbuf need to be tapped. */
 	type = -1;			/* undefined */
 
 	if (m->m_pkthdr.len < sizeof(struct ieee80211_frame_min)) {


More information about the svn-src-all mailing list