mirror of
https://github.com/apache/nuttx.git
synced 2026-05-23 23:28:29 +08:00
drivers/net: change netdev_lower_quota_load to macro.
Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
This commit is contained in:
@@ -1365,24 +1365,6 @@ void netdev_lower_txdone(FAR struct netdev_lowerhalf_s *dev)
|
||||
#endif
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: netdev_lower_quota_load
|
||||
*
|
||||
* Description:
|
||||
* Fetch the quota, works like atomic_read.
|
||||
*
|
||||
* Input Parameters:
|
||||
* dev - The lower half device driver structure
|
||||
* type - Whether get quota for TX or RX
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int netdev_lower_quota_load(FAR struct netdev_lowerhalf_s *dev,
|
||||
enum netpkt_type_e type)
|
||||
{
|
||||
return atomic_read(&dev->quota[type]);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: netpkt_alloc
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user