Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Nov 2016 18:59:37 -0400
From:      Jared McNeill <jmcneill@invisible.ca>
To:        Andrew Turner <andrew@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r308640 - in head/sys/arm: altera/socfpga broadcom/bcm2835 freescale/imx freescale/vybrid lpc mv rockchip ti ti/am335x versatile xilinx
Message-ID:  <BE19646A-34BE-4600-9095-B857AACC2E80@invisible.ca>
In-Reply-To: <201611141203.uAEC39vY062250@repo.freebsd.org>
References:  <201611141203.uAEC39vY062250@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Nov 14, 2016, at 8:03 AM, Andrew Turner <andrew@FreeBSD.org> wrote:
> 
> Modified: head/sys/arm/broadcom/bcm2835/bcm2835_fb.c
...
> 		if (sc->height == 0) {
> 			if ((OF_getprop(display, "broadcom,height", 
> 			    &cell, sizeof(cell))) > 0)
> -				sc->height = (int)fdt32_to_cpu(cell);
> +				sc->height = cell;
> 		}
> 	}

Looks like you missed an OF_getprop -> OF_getencprop here.

Cheers,
Jared
From owner-svn-src-all@freebsd.org  Mon Nov 14 23:51:29 2016
Return-Path: <owner-svn-src-all@freebsd.org>
Delivered-To: svn-src-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADA7AC4182D;
 Mon, 14 Nov 2016 23:51:29 +0000 (UTC)
 (envelope-from avos@FreeBSD.org)
Received: from repo.freebsd.org (repo.freebsd.org
 [IPv6:2610:1c1:1:6068::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 8AAD967A;
 Mon, 14 Nov 2016 23:51:29 +0000 (UTC)
 (envelope-from avos@FreeBSD.org)
Received: from repo.freebsd.org ([127.0.1.37])
 by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAENpScq050835;
 Mon, 14 Nov 2016 23:51:28 GMT (envelope-from avos@FreeBSD.org)
Received: (from avos@localhost)
 by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAENpSTC050829;
 Mon, 14 Nov 2016 23:51:28 GMT (envelope-from avos@FreeBSD.org)
Message-Id: <201611142351.uAENpSTC050829@repo.freebsd.org>
X-Authentication-Warning: repo.freebsd.org: avos set sender to
 avos@FreeBSD.org using -f
From: Andriy Voskoboinyk <avos@FreeBSD.org>
Date: Mon, 14 Nov 2016 23:51:28 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r308656 - head/sys/net80211
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for &quot;
 user&quot; and &quot; projects&quot; \)" <svn-src-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-src-all/>;
List-Post: <mailto:svn-src-all@freebsd.org>
List-Help: <mailto:svn-src-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-src-all>,
 <mailto:svn-src-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 14 Nov 2016 23:51:29 -0000

Author: avos
Date: Mon Nov 14 23:51:28 2016
New Revision: 308656
URL: https://svnweb.freebsd.org/changeset/base/308656

Log:
  net80211: switch from ieee80211_iterate_nodes() to
  ieee80211_iterate_nodes_vap() where possible; this should
  make the code a bit cleaner.

Modified:
  head/sys/net80211/ieee80211_adhoc.c
  head/sys/net80211/ieee80211_hostap.c
  head/sys/net80211/ieee80211_ioctl.c
  head/sys/net80211/ieee80211_node.c
  head/sys/net80211/ieee80211_tdma.c

Modified: head/sys/net80211/ieee80211_adhoc.c
==============================================================================
--- head/sys/net80211/ieee80211_adhoc.c	Mon Nov 14 22:39:33 2016	(r308655)
+++ head/sys/net80211/ieee80211_adhoc.c	Mon Nov 14 23:51:28 2016	(r308656)
@@ -120,9 +120,9 @@ adhoc_vattach(struct ieee80211vap *vap)
 static void
 sta_leave(void *arg, struct ieee80211_node *ni)
 {
-	struct ieee80211vap *vap = arg;
+	struct ieee80211vap *vap = ni->ni_vap;
 
-	if (ni->ni_vap == vap && ni != vap->iv_bss)
+	if (ni != vap->iv_bss)
 		ieee80211_node_leave(ni);
 }
 
@@ -164,7 +164,8 @@ adhoc_newstate(struct ieee80211vap *vap,
 		switch (ostate) {
 		case IEEE80211_S_RUN:		/* beacon miss */
 			/* purge station table; entries are stale */
-			ieee80211_iterate_nodes(&ic->ic_sta, sta_leave, vap);
+			ieee80211_iterate_nodes_vap(&ic->ic_sta, vap,
+			    sta_leave, NULL);
 			/* fall thru... */
 		case IEEE80211_S_INIT:
 			if (vap->iv_des_chan != IEEE80211_CHAN_ANYC &&

Modified: head/sys/net80211/ieee80211_hostap.c
==============================================================================
--- head/sys/net80211/ieee80211_hostap.c	Mon Nov 14 22:39:33 2016	(r308655)
+++ head/sys/net80211/ieee80211_hostap.c	Mon Nov 14 23:51:28 2016	(r308656)
@@ -107,9 +107,8 @@ hostap_vattach(struct ieee80211vap *vap)
 static void
 sta_disassoc(void *arg, struct ieee80211_node *ni)
 {
-	struct ieee80211vap *vap = arg;
 
-	if (ni->ni_vap == vap && ni->ni_associd != 0) {
+	if (ni->ni_associd != 0) {
 		IEEE80211_SEND_MGMT(ni, IEEE80211_FC0_SUBTYPE_DISASSOC,
 			IEEE80211_REASON_ASSOC_LEAVE);
 		ieee80211_node_leave(ni);
@@ -119,9 +118,9 @@ sta_disassoc(void *arg, struct ieee80211
 static void
 sta_csa(void *arg, struct ieee80211_node *ni)
 {
-	struct ieee80211vap *vap = arg;
+	struct ieee80211vap *vap = ni->ni_vap;
 
-	if (ni->ni_vap == vap && ni->ni_associd != 0)
+	if (ni->ni_associd != 0)
 		if (ni->ni_inact > vap->iv_inact_init) {
 			ni->ni_inact = vap->iv_inact_init;
 			IEEE80211_NOTE(vap, IEEE80211_MSG_INACT, ni,
@@ -132,9 +131,8 @@ sta_csa(void *arg, struct ieee80211_node
 static void
 sta_drop(void *arg, struct ieee80211_node *ni)
 {
-	struct ieee80211vap *vap = arg;
 
-	if (ni->ni_vap == vap && ni->ni_associd != 0)
+	if (ni->ni_associd != 0)
 		ieee80211_node_leave(ni);
 }
 
@@ -179,7 +177,8 @@ hostap_newstate(struct ieee80211vap *vap
 			ieee80211_dfs_cac_stop(vap);
 			break;
 		case IEEE80211_S_RUN:
-			ieee80211_iterate_nodes(&ic->ic_sta, sta_disassoc, vap);
+			ieee80211_iterate_nodes_vap(&ic->ic_sta, vap,
+			    sta_disassoc, NULL);
 			break;
 		default:
 			break;
@@ -195,7 +194,8 @@ hostap_newstate(struct ieee80211vap *vap
 		switch (ostate) {
 		case IEEE80211_S_CSA:
 		case IEEE80211_S_RUN:
-			ieee80211_iterate_nodes(&ic->ic_sta, sta_disassoc, vap);
+			ieee80211_iterate_nodes_vap(&ic->ic_sta, vap,
+			    sta_disassoc, NULL);
 			/*
 			 * Clear overlapping BSS state; the beacon frame
 			 * will be reconstructed on transition to the RUN
@@ -289,7 +289,8 @@ hostap_newstate(struct ieee80211vap *vap
 			 * Shorten inactivity timer of associated stations
 			 * to weed out sta's that don't follow a CSA.
 			 */
-			ieee80211_iterate_nodes(&ic->ic_sta, sta_csa, vap);
+			ieee80211_iterate_nodes_vap(&ic->ic_sta, vap,
+			    sta_csa, NULL);
 			/*
 			 * Update bss node channel to reflect where
 			 * we landed after CSA.
@@ -340,7 +341,8 @@ hostap_newstate(struct ieee80211vap *vap
 			 * such as capabilities and the negotiated rate
 			 * set may/will be wrong).
 			 */
-			ieee80211_iterate_nodes(&ic->ic_sta, sta_drop, vap);
+			ieee80211_iterate_nodes_vap(&ic->ic_sta, vap,
+			    sta_drop, NULL);
 		}
 		break;
 	default:

Modified: head/sys/net80211/ieee80211_ioctl.c
==============================================================================
--- head/sys/net80211/ieee80211_ioctl.c	Mon Nov 14 22:39:33 2016	(r308655)
+++ head/sys/net80211/ieee80211_ioctl.c	Mon Nov 14 23:51:28 2016	(r308656)
@@ -347,7 +347,6 @@ ieee80211_ioctl_getscanresults(struct ie
 }
 
 struct stainforeq {
-	struct ieee80211vap *vap;
 	struct ieee80211req_sta_info *si;
 	size_t	space;
 };
@@ -366,8 +365,6 @@ get_sta_space(void *arg, struct ieee8021
 	struct stainforeq *req = arg;
 	size_t ielen;
 
-	if (req->vap != ni->ni_vap)
-		return;
 	if (ni->ni_vap->iv_opmode == IEEE80211_M_HOSTAP &&
 	    ni->ni_associd == 0)	/* only associated stations */
 		return;
@@ -383,8 +380,6 @@ get_sta_info(void *arg, struct ieee80211
 	size_t ielen, len;
 	uint8_t *cp;
 
-	if (req->vap != ni->ni_vap)
-		return;
 	if (vap->iv_opmode == IEEE80211_M_HOSTAP &&
 	    ni->ni_associd == 0)	/* only associated stations */
 		return;
@@ -472,10 +467,10 @@ getstainfo_common(struct ieee80211vap *v
 
 	error = 0;
 	req.space = 0;
-	req.vap = vap;
-	if (ni == NULL)
-		ieee80211_iterate_nodes(&ic->ic_sta, get_sta_space, &req);
-	else
+	if (ni == NULL) {
+		ieee80211_iterate_nodes_vap(&ic->ic_sta, vap, get_sta_space,
+		    &req);
+	} else
 		get_sta_space(&req, ni);
 	if (req.space > ireq->i_len)
 		req.space = ireq->i_len;
@@ -489,9 +484,10 @@ getstainfo_common(struct ieee80211vap *v
 			goto bad;
 		}
 		req.si = p;
-		if (ni == NULL)
-			ieee80211_iterate_nodes(&ic->ic_sta, get_sta_info, &req);
-		else
+		if (ni == NULL) {
+			ieee80211_iterate_nodes_vap(&ic->ic_sta, vap,
+			    get_sta_info, &req);
+		} else
 			get_sta_info(&req, ni);
 		ireq->i_len = space - req.space;
 		error = copyout(p, (uint8_t *) ireq->i_data+off, ireq->i_len);

Modified: head/sys/net80211/ieee80211_node.c
==============================================================================
--- head/sys/net80211/ieee80211_node.c	Mon Nov 14 22:39:33 2016	(r308655)
+++ head/sys/net80211/ieee80211_node.c	Mon Nov 14 23:51:28 2016	(r308656)
@@ -2717,7 +2717,6 @@ done:
 }
 
 struct rssiinfo {
-	struct ieee80211vap *vap;
 	int	rssi_samples;
 	uint32_t rssi_total;
 };
@@ -2729,8 +2728,6 @@ get_hostap_rssi(void *arg, struct ieee80
 	struct ieee80211vap *vap = ni->ni_vap;
 	int8_t rssi;
 
-	if (info->vap != vap)
-		return;
 	/* only associated stations */
 	if (ni->ni_associd == 0)
 		return;
@@ -2748,8 +2745,6 @@ get_adhoc_rssi(void *arg, struct ieee802
 	struct ieee80211vap *vap = ni->ni_vap;
 	int8_t rssi;
 
-	if (info->vap != vap)
-		return;
 	/* only neighbors */
 	/* XXX check bssid */
 	if ((ni->ni_capinfo & IEEE80211_CAPINFO_IBSS) == 0)
@@ -2769,8 +2764,6 @@ get_mesh_rssi(void *arg, struct ieee8021
 	struct ieee80211vap *vap = ni->ni_vap;
 	int8_t rssi;
 
-	if (info->vap != vap)
-		return;
 	/* only neighbors that peered successfully */
 	if (ni->ni_mlstate != IEEE80211_NODE_MESH_ESTABLISHED)
 		return;
@@ -2791,18 +2784,20 @@ ieee80211_getrssi(struct ieee80211vap *v
 
 	info.rssi_total = 0;
 	info.rssi_samples = 0;
-	info.vap = vap;
 	switch (vap->iv_opmode) {
 	case IEEE80211_M_IBSS:		/* average of all ibss neighbors */
 	case IEEE80211_M_AHDEMO:	/* average of all neighbors */
-		ieee80211_iterate_nodes(&ic->ic_sta, get_adhoc_rssi, &info);
+		ieee80211_iterate_nodes_vap(&ic->ic_sta, vap, get_adhoc_rssi,
+		    &info);
 		break;
 	case IEEE80211_M_HOSTAP:	/* average of all associated stations */
-		ieee80211_iterate_nodes(&ic->ic_sta, get_hostap_rssi, &info);
+		ieee80211_iterate_nodes_vap(&ic->ic_sta, vap, get_hostap_rssi,
+		    &info);
 		break;
 #ifdef IEEE80211_SUPPORT_MESH
 	case IEEE80211_M_MBSS:		/* average of all mesh neighbors */
-		ieee80211_iterate_nodes(&ic->ic_sta, get_mesh_rssi, &info);
+		ieee80211_iterate_nodes_vap(&ic->ic_sta, vap, get_mesh_rssi,
+		    &info);
 		break;
 #endif
 	case IEEE80211_M_MONITOR:	/* XXX */

Modified: head/sys/net80211/ieee80211_tdma.c
==============================================================================
--- head/sys/net80211/ieee80211_tdma.c	Mon Nov 14 22:39:33 2016	(r308655)
+++ head/sys/net80211/ieee80211_tdma.c	Mon Nov 14 23:51:28 2016	(r308656)
@@ -209,9 +209,9 @@ tdma_vdetach(struct ieee80211vap *vap)
 static void
 sta_leave(void *arg, struct ieee80211_node *ni)
 {
-	struct ieee80211vap *vap = arg;
+	struct ieee80211vap *vap = ni->ni_vap;
 
-	if (ni->ni_vap == vap && ni != vap->iv_bss)
+	if (ni != vap->iv_bss)
 		ieee80211_node_leave(ni);
 }
 
@@ -246,7 +246,8 @@ tdma_newstate(struct ieee80211vap *vap, 
 		ieee80211_cancel_scan(vap);		/* background scan */
 		if (ostate == IEEE80211_S_RUN) {
 			/* purge station table; entries are stale */
-			ieee80211_iterate_nodes(&ic->ic_sta, sta_leave, vap);
+			ieee80211_iterate_nodes_vap(&ic->ic_sta, vap,
+			    sta_leave, NULL);
 		}
 		if (vap->iv_flags_ext & IEEE80211_FEXT_SCANREQ) {
 			ieee80211_check_scan(vap,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BE19646A-34BE-4600-9095-B857AACC2E80>