freebsd-dev/sys/dev/etherswitch
Oleksandr Tymoshenko 217d17bcd3 Clean up OF_getprop_alloc API
OF_getprop_alloc takes element size argument and returns number of
elements in the property. There are valid use cases for such behavior
but mostly API consumers pass 1 as element size to get string
properties. What API users would expect from OF_getprop_alloc is to be
a combination of malloc + OF_getprop with the same semantic of return
value. This patch modifies API signature to match these expectations.

For the valid use cases with element size != 1 and to reduce
modification scope new OF_getprop_alloc_multi function has been
introduced that behaves the same way OF_getprop_alloc behaved prior to
this patch.

Reviewed by:	ian, manu
Differential Revision:	https://reviews.freebsd.org/D14850
2018-04-08 22:59:34 +00:00
..
arswitch [arswitch] Implement the switch MAC address fetch API. 2018-02-06 08:35:49 +00:00
e6000sw Clean up OF_getprop_alloc API 2018-04-08 22:59:34 +00:00
infineon [etherswitch] check if_alloc returns NULL 2018-01-24 21:33:18 +00:00
ip17x [etherswitch] check if_alloc returns NULL 2018-01-24 21:33:18 +00:00
micrel [etherswitch] check if_alloc returns NULL 2018-01-24 21:33:18 +00:00
mtkswitch [etherswitch] check if_alloc returns NULL 2018-01-24 21:33:18 +00:00
rtl8366 [etherswitch] fix LINT build for rtl8366rb 2018-01-25 05:48:42 +00:00
ukswitch [etherswitch] check if_alloc returns NULL 2018-01-24 21:33:18 +00:00
etherswitch_if.m [etherswitch] add the first pass of a simple API to flush and fetch the L2 address table from the ethernet switch. 2018-02-02 02:05:14 +00:00
etherswitch.c [etherswitch] add the first pass of a simple API to flush and fetch the L2 address table from the ethernet switch. 2018-02-02 02:05:14 +00:00
etherswitch.h [etherswitch] add initial support for potentially configuring and fetching the switch MAC address. 2018-02-06 08:34:50 +00:00
miiproxy.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
miiproxy.h sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00