From owner-svn-src-head@FreeBSD.ORG Sun Mar 15 20:24:00 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1C5F129; Sun, 15 Mar 2015 20:23:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C302FF02; Sun, 15 Mar 2015 20:23:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2FKNxlV058784; Sun, 15 Mar 2015 20:23:59 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2FKNx6p058782; Sun, 15 Mar 2015 20:23:59 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503152023.t2FKNx6p058782@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 15 Mar 2015 20:23:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280063 - head/sys/dev/wpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Mar 2015 20:24:00 -0000 Author: adrian Date: Sun Mar 15 20:23:58 2015 New Revision: 280063 URL: https://svnweb.freebsd.org/changeset/base/280063 Log: Wrap cast to (struct wpi_node *) into WPI_NODE macros PR: kern/197143 Submitted by: Andriy Voskoboinyk Modified: head/sys/dev/wpi/if_wpi.c head/sys/dev/wpi/if_wpivar.h Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:22:16 2015 (r280062) +++ head/sys/dev/wpi/if_wpi.c Sun Mar 15 20:23:58 2015 (r280063) @@ -1530,7 +1530,7 @@ wpi_node_free(struct ieee80211_node *ni) { struct ieee80211com *ic = ni->ni_ic; struct wpi_softc *sc = ic->ic_ifp->if_softc; - struct wpi_node *wn = (struct wpi_node *)ni; + struct wpi_node *wn = WPI_NODE(ni); if (wn->id >= WPI_ID_IBSS_MIN && wn->id <= WPI_ID_IBSS_MAX) { free_unr(sc->sc_unr, wn->id); @@ -2365,7 +2365,7 @@ wpi_tx_data(struct wpi_softc *sc, struct const struct ieee80211_txparam *tp; struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; - struct wpi_node *wn = (void *)ni; + struct wpi_node *wn = WPI_NODE(ni); struct ieee80211_channel *chan; struct ieee80211_frame *wh; struct ieee80211_key *k = NULL; @@ -2942,7 +2942,7 @@ static int wpi_add_node(struct wpi_softc *sc, struct ieee80211_node *ni) { struct ieee80211com *ic = ni->ni_ic; - struct wpi_node *wn = (void *)ni; + struct wpi_node *wn = WPI_NODE(ni); struct wpi_node_info node; DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__); @@ -2987,7 +2987,7 @@ wpi_add_broadcast_node(struct wpi_softc static int wpi_add_ibss_node(struct wpi_softc *sc, struct ieee80211_node *ni) { - struct wpi_node *wn = (void *)ni; + struct wpi_node *wn = WPI_NODE(ni); DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__); @@ -3005,7 +3005,7 @@ wpi_add_ibss_node(struct wpi_softc *sc, static void wpi_del_node(struct wpi_softc *sc, struct ieee80211_node *ni) { - struct wpi_node *wn = (void *)ni; + struct wpi_node *wn = WPI_NODE(ni); struct wpi_cmd_del_node node; int error; @@ -4014,7 +4014,7 @@ wpi_key_set(struct ieee80211vap *vap, co struct ieee80211com *ic = vap->iv_ic; struct ieee80211_node *ni = vap->iv_bss; struct wpi_softc *sc = ic->ic_ifp->if_softc; - struct wpi_node *wn = (void *)ni; + struct wpi_node *wn = WPI_NODE(ni); struct wpi_node_info node; uint16_t kflags; int error; @@ -4067,7 +4067,7 @@ wpi_key_delete(struct ieee80211vap *vap, struct ieee80211com *ic = vap->iv_ic; struct ieee80211_node *ni = vap->iv_bss; struct wpi_softc *sc = ic->ic_ifp->if_softc; - struct wpi_node *wn = (void *)ni; + struct wpi_node *wn = WPI_NODE(ni); struct wpi_node_info node; DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_DOING, __func__); Modified: head/sys/dev/wpi/if_wpivar.h ============================================================================== --- head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:22:16 2015 (r280062) +++ head/sys/dev/wpi/if_wpivar.h Sun Mar 15 20:23:58 2015 (r280063) @@ -96,6 +96,7 @@ struct wpi_node { struct ieee80211_node ni; /* must be the first */ uint8_t id; }; +#define WPI_NODE(ni) ((struct wpi_node *)(ni)) struct wpi_power_sample { uint8_t index;