本文整理汇总了C++中rx_fill函数的典型用法代码示例。如果您正苦于以下问题:C++ rx_fill函数的具体用法?C++ rx_fill怎么用?C++ rx_fill使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rx_fill函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: process_rx_w
static void process_rx_w(struct work_struct *work)
{
struct eth_dev *dev = container_of(work, struct eth_dev, rx_work);
struct sk_buff *skb;
int status = 0;
if (!dev->port_usb)
return;
while ((skb = skb_dequeue(&dev->rx_frames))) {
if (status < 0
|| ETH_HLEN > skb->len
|| skb->len > ETH_FRAME_LEN) {
dev->net->stats.rx_errors++;
dev->net->stats.rx_length_errors++;
DBG(dev, "rx length %d\n", skb->len);
dev_kfree_skb_any(skb);
continue;
}
skb->protocol = eth_type_trans(skb, dev->net);
dev->net->stats.rx_packets++;
dev->net->stats.rx_bytes += skb->len;
status = netif_rx_ni(skb);
}
if (netif_running(dev->net))
rx_fill(dev, GFP_KERNEL);
}
开发者ID:grzmot22,项目名称:android_kernel_msm,代码行数:29,代码来源:u_ether.c
示例2: process_uether_rx
static void process_uether_rx(struct eth_dev *dev)
{
struct sk_buff *skb;
int status = 0;
if (!dev->port_usb)
return;
while ((skb = skb_dequeue(&dev->rx_frames))) {
if (status < 0
|| ETH_HLEN > skb->len
|| skb->len > ETH_FRAME_LEN) {
#ifdef CONFIG_USB_NCM_SUPPORT_MTU_CHANGE
/*
Need to revisit net->mtu does not include header size incase of changed MTU
*/
if(!strcmp(dev->port_usb->func.name,"ncm")) {
if (status < 0
|| ETH_HLEN > skb->len
|| skb->len > (dev->net->mtu + ETH_HLEN)) {
printk(KERN_ERR "usb: %s drop incase of NCM rx length %d\n",__func__,skb->len);
} else {
printk(KERN_ERR "usb: %s Dont drop incase of NCM rx length %d\n",__func__,skb->len);
goto process_frame;
}
}
#endif
dev->net->stats.rx_errors++;
dev->net->stats.rx_length_errors++;
#ifndef CONFIG_USB_NCM_SUPPORT_MTU_CHANGE
DBG(dev, "rx length %d\n", skb->len);
#else
printk(KERN_DEBUG "usb: %s Drop rx length %d\n",__func__,skb->len);
#endif
DBG(dev, "rx length %d\n", skb->len);
dev_kfree_skb_any(skb);
continue;
}
#ifdef CONFIG_USB_NCM_SUPPORT_MTU_CHANGE
process_frame:
#endif
skb->protocol = eth_type_trans(skb, dev->net);
dev->net->stats.rx_packets++;
dev->net->stats.rx_bytes += skb->len;
if (in_interrupt())
status = netif_rx(skb);
else
status = netif_rx_ni(skb);
}
if (netif_running(dev->net))
rx_fill(dev, GFP_ATOMIC);
}
开发者ID:BigBot96,项目名称:android_kernel_samsung_gts2wifi,代码行数:55,代码来源:u_ether.c
示例3: eth_start
static void eth_start(struct eth_dev *dev, gfp_t gfp_flags)
{
DBG(dev, "%s\n", __func__);
rx_fill(dev, gfp_flags);
dev->tx_qlen = 0;
netif_wake_queue(dev->net);
}
开发者ID:jekapaty,项目名称:SebastianFM-kernel,代码行数:11,代码来源:u_ether.c
示例4: eth_work
static void eth_work(struct work_struct *work)
{
struct eth_dev *dev = container_of(work, struct eth_dev, work);
if (test_and_clear_bit(WORK_RX_MEMORY, &dev->todo)) {
if (netif_running(dev->net))
rx_fill(dev, GFP_KERNEL);
}
if (dev->todo)
DBG(dev, "work done, flags = 0x%lx\n", dev->todo);
}
开发者ID:moonlightly,项目名称:android_kernel_samsung_ms013g,代码行数:12,代码来源:u_ether.c
示例5: eth_start
static void eth_start(struct eth_dev *dev, gfp_t gfp_flags)
{
DBG(dev, "%s\n", __func__);
xlog_printk(ANDROID_LOG_INFO, UETHER_LOG, "%s\n", __func__);
/* fill the rx queue */
rx_fill(dev, gfp_flags);
/* and open the tx floodgates */
atomic_set(&dev->tx_qlen, 0);
netif_wake_queue(dev->net);
}
开发者ID:Banjo0917,项目名称:mt6577_kernel3.4,代码行数:12,代码来源:u_ether.c
示例6: eth_start
static void eth_start(struct eth_dev *dev, gfp_t gfp_flags)
{
DBG(dev, "%s\n", __func__);
// printk("%s:%d\n", __func__, __LINE__);
/* fill the rx queue */
rx_fill(dev, gfp_flags);
/* and open the tx floodgates */
atomic_set(&dev->tx_qlen, 0);
netif_wake_queue(dev->net);
}
开发者ID:KHATEEBNSIT,项目名称:lsdk_ar9531,代码行数:12,代码来源:u_ether.c
示例7: eth_start
static void eth_start(struct eth_dev *dev, gfp_t gfp_flags)
{
DBG(dev, "%s\n", __func__);
/* fill the rx queue */
rx_fill(dev, gfp_flags);
/* and open the tx floodgates */
atomic_set(&dev->tx_qlen, 0);
netif_wake_queue(dev->net);
#ifdef CONFIG_USB_SPRD_DWC
rndis_msg_init(dev);
#endif
}
开发者ID:dhs-shine,项目名称:sprd_project,代码行数:14,代码来源:u_ether.c
示例8: process_rx_w
static void process_rx_w(struct work_struct *work)
{
struct eth_dev *dev = container_of(work, struct eth_dev, rx_work);
struct sk_buff *skb;
int status = 0;
unsigned int uiCurMtu = 0;
if (!dev->port_usb)
return;
set_wake_up_idle(true);
uiCurMtu = dev->net->mtu + ETH_HLEN;
if ((uiCurMtu <= ETH_HLEN) || (uiCurMtu > ETH_FRAME_LEN_MAX))
uiCurMtu = ETH_FRAME_LEN;
while ((skb = skb_dequeue(&dev->rx_frames))) {
if (status < 0
|| ETH_HLEN > skb->len
|| (skb->len > uiCurMtu &&
test_bit(RMNET_MODE_LLP_ETH, &dev->flags))) {
dev->net->stats.rx_errors++;
dev->net->stats.rx_length_errors++;
DBG(dev, "rx length %d\n", skb->len);
dev_kfree_skb_any(skb);
continue;
}
if (test_bit(RMNET_MODE_LLP_IP, &dev->flags))
skb->protocol = ether_ip_type_trans(skb, dev->net);
else
skb->protocol = eth_type_trans(skb, dev->net);
dev->net->stats.rx_packets++;
dev->net->stats.rx_bytes += skb->len;
#if fcAUTO_PERF_LOCK
if (skb->len >= 1024)
auto_perf_lock_enable(1);
#endif
status = netif_rx_ni(skb);
}
set_wake_up_idle(false);
if (netif_running(dev->net))
rx_fill(dev, GFP_KERNEL);
}
开发者ID:SiddheshK15,项目名称:kernel_htc_820,代码行数:45,代码来源:u_ether.c
示例9: eth_work
static void eth_work(struct work_struct *work)
{
struct eth_dev *dev = container_of(work, struct eth_dev, work);
int testwkbit;
unsigned long flags;
spin_lock_irqsave(&dev->req_rx_lock, flags);
testwkbit = test_and_clear_bit(WORK_RX_MEMORY, &dev->todo);
spin_unlock_irqrestore(&dev->req_rx_lock, flags);
if (testwkbit) {
if (netif_running(dev->net))
rx_fill(dev, GFP_KERNEL);
}
if (dev->todo)
DBG(dev, "work done, flags = 0x%lx\n", dev->todo);
}
开发者ID:BkzAllstar,项目名称:Merruk-Technology,代码行数:18,代码来源:u_ether.c
示例10: process_rx_w
static void process_rx_w(struct work_struct *work)
{
struct eth_dev *dev = container_of(work, struct eth_dev, rx_work);
struct sk_buff *skb;
int status = 0;
unsigned int uiCurMtu = 0;
if (!dev->port_usb)
return;
uiCurMtu = dev->net->mtu + ETH_HLEN;
if ((uiCurMtu <= ETH_HLEN) || (uiCurMtu > ETH_FRAME_LEN_MAX))
uiCurMtu = ETH_FRAME_LEN;
while ((skb = skb_dequeue(&dev->rx_frames))) {
if (status < 0
|| ETH_HLEN > skb->len
// || skb->len > ETH_FRAME_LEN
|| skb->len > uiCurMtu) {
dev->net->stats.rx_errors++;
dev->net->stats.rx_length_errors++;
DBG(dev, "rx length %d\n", skb->len);
dev_kfree_skb_any(skb);
continue;
}
skb->protocol = eth_type_trans(skb, dev->net);
dev->net->stats.rx_packets++;
dev->net->stats.rx_bytes += skb->len;
#if fcAUTO_PERF_LOCK
if (skb->len >= 1024)
schedule_work(&dev->enable_perf_lock_work);
#endif
status = netif_rx_ni(skb);
}
if (netif_running(dev->net))
rx_fill(dev, GFP_KERNEL);
}
开发者ID:marduk191,项目名称:android_kernel_htc_a3ul,代码行数:39,代码来源:u_ether.c
注:本文中的rx_fill函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论