Networking: Fix netdev_dev_lladdrsize. In some configurations, it could return the wrong size for the address of a packet radio.

This commit is contained in:
Gregory Nutt
2017-08-08 16:27:23 -06:00
parent 91f9e72890
commit efbb47999f
9 changed files with 97 additions and 62 deletions
+2 -18
View File
@@ -403,22 +403,6 @@ void netdev_ipv6_rxnotify(FAR const net_ipv6addr_t lipaddr,
int netdev_count(void);
#endif
/****************************************************************************
* Name: netdev_type_lladdrsize
*
* Description:
* Returns the size of the MAC address associated with a link layer type.
*
* Parameters:
* lltype - link layer type code
*
* Returned Value:
* The size of the MAC address associated with this device
*
****************************************************************************/
int netdev_type_lladdrsize(uint8_t lltype);
/****************************************************************************
* Name: netdev_dev_lladdrsize
*
@@ -426,14 +410,14 @@ int netdev_type_lladdrsize(uint8_t lltype);
* Returns the size of the MAC address associated with a network device.
*
* Parameters:
* dev - A reference to the device of interest
* dev - A reference to the device of interest
*
* Returned Value:
* The size of the MAC address associated with this device
*
****************************************************************************/
#define netdev_dev_lladdrsize(dev) netdev_type_lladdrsize((dev)->d_lltype)
int netdev_dev_lladdrsize(FAR struct net_driver_s *dev);
#undef EXTERN
#ifdef __cplusplus