Skip to content
Snippets Groups Projects
Commit c8931cd6 authored by Laura Marilena Rientsma's avatar Laura Marilena Rientsma
Browse files

added start_queue and stop_queue to check_carrier function

parent 5b31449d
No related branches found
No related tags found
1 merge request!1Removed vmk180_serial_demo ip core, and use versal_network_device ip instead,...
......@@ -596,12 +596,14 @@ static inline void check_carrier(struct flxnet_peer *peer) {
if (carrier) {
if (!netif_carrier_ok(peer->flxnet)) {
pr_info("flxnet_dev: status carrier changed to %d\n", carrier);
netif_start_queue(peer->flxnet);
netif_carrier_on(peer->flxnet);
}
}
else {
if (netif_carrier_ok(peer->flxnet)) {
pr_info("flxnet_dev: status carrier changed to %d\n", carrier);
netif_stop_queue(peer->flxnet);
netif_carrier_off(peer->flxnet);
}
}
......@@ -757,6 +759,7 @@ int open(struct net_device *dev) {
if (message_level & NETIF_MSG_IFUP)
pr_info("flxnet_dev: start netif queue\n");
netif_start_queue(dev);
netif_carrier_on(dev);
mutex_unlock(&flxnet_mutex);
return 0;
......@@ -776,6 +779,7 @@ int stop(struct net_device *dev) {
if (message_level & NETIF_MSG_IFDOWN)
pr_info("flxnet_dev: stop netif queue\n");
netif_stop_queue(dev);
netif_carrier_off(dev);
tx_queue_reset(dev); // clear TX queue
flxnet_release_all_peers(); // free the modules that supplied the peers
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment