From owner-svn-src-all@FreeBSD.ORG Wed Feb 3 10:07:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EE52106568D; Wed, 3 Feb 2010 10:07:43 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5DB7F8FC12; Wed, 3 Feb 2010 10:07:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o13A7hP3058561; Wed, 3 Feb 2010 10:07:43 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o13A7hXX058554; Wed, 3 Feb 2010 10:07:43 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201002031007.o13A7hXX058554@svn.freebsd.org> From: Rui Paulo Date: Wed, 3 Feb 2010 10:07:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r203422 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Feb 2010 10:07:43 -0000 Author: rpaulo Date: Wed Feb 3 10:07:43 2010 New Revision: 203422 URL: http://svn.freebsd.org/changeset/base/203422 Log: When taking the AMPDU reorder fastpath, need_tap wasn't being initialized. Initialize on declaration to avoid this. Found with: clang static analyzer Modified: head/sys/net80211/ieee80211_adhoc.c head/sys/net80211/ieee80211_hostap.c head/sys/net80211/ieee80211_ioctl.h head/sys/net80211/ieee80211_sta.c head/sys/net80211/ieee80211_wds.c Modified: head/sys/net80211/ieee80211_adhoc.c ============================================================================== --- head/sys/net80211/ieee80211_adhoc.c Wed Feb 3 10:06:03 2010 (r203421) +++ head/sys/net80211/ieee80211_adhoc.c Wed Feb 3 10:07:43 2010 (r203422) @@ -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: head/sys/net80211/ieee80211_hostap.c ============================================================================== --- head/sys/net80211/ieee80211_hostap.c Wed Feb 3 10:06:03 2010 (r203421) +++ head/sys/net80211/ieee80211_hostap.c Wed Feb 3 10:07:43 2010 (r203422) @@ -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: head/sys/net80211/ieee80211_ioctl.h ============================================================================== --- head/sys/net80211/ieee80211_ioctl.h Wed Feb 3 10:06:03 2010 (r203421) +++ head/sys/net80211/ieee80211_ioctl.h Wed Feb 3 10:07:43 2010 (r203422) @@ -334,12 +334,12 @@ enum { }; struct ieee80211req_mesh_route { - uint8_t imr_flags; -#define IEEE80211_MESHRT_FLAGS_VALID 0x01 -#define IEEE80211_MESHRT_FLAGS_PROXY 0x02 uint8_t imr_dest[IEEE80211_ADDR_LEN]; uint8_t imr_nexthop[IEEE80211_ADDR_LEN]; uint16_t imr_nhops; + uint8_t imr_flags; +#define IEEE80211_MESHRT_FLAGS_VALID 0x01 +#define IEEE80211_MESHRT_FLAGS_PROXY 0x02 uint8_t imr_pad; uint32_t imr_metric; uint32_t imr_lifetime; Modified: head/sys/net80211/ieee80211_sta.c ============================================================================== --- head/sys/net80211/ieee80211_sta.c Wed Feb 3 10:06:03 2010 (r203421) +++ head/sys/net80211/ieee80211_sta.c Wed Feb 3 10:07:43 2010 (r203422) @@ -517,7 +517,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; @@ -542,7 +542,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: head/sys/net80211/ieee80211_wds.c ============================================================================== --- head/sys/net80211/ieee80211_wds.c Wed Feb 3 10:06:03 2010 (r203421) +++ head/sys/net80211/ieee80211_wds.c Wed Feb 3 10:07:43 2010 (r203422) @@ -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)) {