struct net_dev_context {
struct most_interface *iface;
- bool channels_opened;
bool is_mamac;
struct net_device *dev;
struct net_dev_channel rx;
BUG_ON(nd->dev != dev);
- if (nd->channels_opened)
- return -EFAULT;
-
BUG_ON(!nd->tx.linked || !nd->rx.linked);
if (most_start_channel(nd->iface, nd->rx.ch_id, &aim)) {
}
}
- nd->channels_opened = true;
netif_wake_queue(dev);
return 0;
BUG_ON(nd->dev != dev);
netif_stop_queue(dev);
-
- if (nd->channels_opened) {
- most_stop_channel(nd->iface, nd->rx.ch_id, &aim);
- most_stop_channel(nd->iface, nd->tx.ch_id, &aim);
- nd->channels_opened = false;
- }
+ most_stop_channel(nd->iface, nd->rx.ch_id, &aim);
+ most_stop_channel(nd->iface, nd->tx.ch_id, &aim);
return 0;
}
struct net_dev_context *nd;
nd = get_net_dev_context(iface);
- if (!nd || !nd->channels_opened || nd->tx.ch_id != channel_idx)
+ if (!nd || nd->tx.ch_id != channel_idx)
return 0;
if (!nd->dev)
unsigned int skb_len;
nd = get_net_dev_context(mbo->ifp);
- if (!nd || !nd->channels_opened || nd->rx.ch_id != mbo->hdm_channel_id)
+ if (!nd || nd->rx.ch_id != mbo->hdm_channel_id)
return -EIO;
dev = nd->dev;