aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/libertas/main.c50
1 files changed, 2 insertions, 48 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index d311d5773f04..5c8cb0079d4b 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -515,52 +515,6 @@ static int lbs_close(struct net_device *dev)
515 return 0; 515 return 0;
516} 516}
517 517
518/**
519 * @brief Mark mesh packets and handover them to lbs_hard_start_xmit
520 *
521 */
522static int lbs_mesh_pre_start_xmit(struct sk_buff *skb,
523 struct net_device *dev)
524{
525 struct lbs_private *priv = dev->priv;
526 int ret;
527
528 lbs_deb_enter(LBS_DEB_MESH);
529 if (priv->monitormode != LBS_MONITOR_OFF) {
530 netif_stop_queue(dev);
531 return -EOPNOTSUPP;
532 }
533
534 SET_MESH_FRAME(skb);
535
536 ret = lbs_hard_start_xmit(skb, priv->mesh_dev);
537 lbs_deb_leave_args(LBS_DEB_MESH, "ret %d", ret);
538 return ret;
539}
540
541/**
542 * @brief Mark non-mesh packets and handover them to lbs_hard_start_xmit
543 *
544 */
545static int lbs_pre_start_xmit(struct sk_buff *skb, struct net_device *dev)
546{
547 struct lbs_private *priv = dev->priv;
548 int ret;
549
550 lbs_deb_enter(LBS_DEB_TX);
551
552 if (priv->monitormode != LBS_MONITOR_OFF) {
553 netif_stop_queue(dev);
554 return -EOPNOTSUPP;
555 }
556
557 UNSET_MESH_FRAME(skb);
558
559 ret = lbs_hard_start_xmit(skb, dev);
560 lbs_deb_leave_args(LBS_DEB_TX, "ret %d", ret);
561 return ret;
562}
563
564static void lbs_tx_timeout(struct net_device *dev) 518static void lbs_tx_timeout(struct net_device *dev)
565{ 519{
566 struct lbs_private *priv = (struct lbs_private *) dev->priv; 520 struct lbs_private *priv = (struct lbs_private *) dev->priv;
@@ -1104,7 +1058,7 @@ struct lbs_private *lbs_add_card(void *card, struct device *dmdev)
1104 1058
1105 /* Setup the OS Interface to our functions */ 1059 /* Setup the OS Interface to our functions */
1106 dev->open = lbs_open; 1060 dev->open = lbs_open;
1107 dev->hard_start_xmit = lbs_pre_start_xmit; 1061 dev->hard_start_xmit = lbs_hard_start_xmit;
1108 dev->stop = lbs_close; 1062 dev->stop = lbs_close;
1109 dev->set_mac_address = lbs_set_mac_address; 1063 dev->set_mac_address = lbs_set_mac_address;
1110 dev->tx_timeout = lbs_tx_timeout; 1064 dev->tx_timeout = lbs_tx_timeout;
@@ -1276,7 +1230,7 @@ int lbs_add_mesh(struct lbs_private *priv, struct device *dev)
1276 priv->mesh_dev = mesh_dev; 1230 priv->mesh_dev = mesh_dev;
1277 1231
1278 mesh_dev->open = lbs_mesh_open; 1232 mesh_dev->open = lbs_mesh_open;
1279 mesh_dev->hard_start_xmit = lbs_mesh_pre_start_xmit; 1233 mesh_dev->hard_start_xmit = lbs_hard_start_xmit;
1280 mesh_dev->stop = lbs_mesh_close; 1234 mesh_dev->stop = lbs_mesh_close;
1281 mesh_dev->get_stats = lbs_get_stats; 1235 mesh_dev->get_stats = lbs_get_stats;
1282 mesh_dev->set_mac_address = lbs_set_mac_address; 1236 mesh_dev->set_mac_address = lbs_set_mac_address;