aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/main.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-12-09 15:04:19 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:06:26 -0500
commit198cefb9320ea0aa1be43a93b398435447583081 (patch)
treed1c168af96af49b0331811c36be6693a62341a83 /drivers/net/wireless/libertas/main.c
parenta2b62dc1f17db16034cd4eee0f14e6e56065547c (diff)
libertas: kill lbs_pre_start_xmit(), lib_mesh_pre_start_xmit()
These wrappers only do two things. Firstly, they set the frame type, which isn't necessary since lbs_hard_start_xmit() gets to see which device it belongs to anyway. Secondly, they return -EOPNOTSUPP if the device is in monitor mode. Which is a strange thing to do and will provide nasty warnings from qdisc_restart(). And lbs_hard_start_xmit() seems to have code to cope with monitor mode anyway. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/main.c')
-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;