diff options
-rw-r--r-- | drivers/net/wireless/libertas/decl.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/main.c | 32 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/tx.c | 33 |
3 files changed, 33 insertions, 34 deletions
diff --git a/drivers/net/wireless/libertas/decl.h b/drivers/net/wireless/libertas/decl.h index b0945140ba1c..fcb5a8512903 100644 --- a/drivers/net/wireless/libertas/decl.h +++ b/drivers/net/wireless/libertas/decl.h | |||
@@ -50,10 +50,10 @@ void lbs_upload_rx_packet(struct lbs_private *priv, struct sk_buff *skb); | |||
50 | 50 | ||
51 | /** The proc fs interface */ | 51 | /** The proc fs interface */ |
52 | int lbs_process_rx_command(struct lbs_private *priv); | 52 | int lbs_process_rx_command(struct lbs_private *priv); |
53 | int lbs_process_tx(struct lbs_private *priv, struct sk_buff *skb); | ||
54 | void __lbs_cleanup_and_insert_cmd(struct lbs_private *priv, | 53 | void __lbs_cleanup_and_insert_cmd(struct lbs_private *priv, |
55 | struct cmd_ctrl_node *ptempcmd); | 54 | struct cmd_ctrl_node *ptempcmd); |
56 | 55 | ||
56 | int lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev); | ||
57 | int lbs_set_regiontable(struct lbs_private *priv, u8 region, u8 band); | 57 | int lbs_set_regiontable(struct lbs_private *priv, u8 region, u8 band); |
58 | 58 | ||
59 | int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *); | 59 | int lbs_process_rxed_packet(struct lbs_private *priv, struct sk_buff *); |
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index c63899518249..d311d5773f04 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -515,38 +515,6 @@ static int lbs_close(struct net_device *dev) | |||
515 | return 0; | 515 | return 0; |
516 | } | 516 | } |
517 | 517 | ||
518 | |||
519 | static int lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | ||
520 | { | ||
521 | int ret = 0; | ||
522 | struct lbs_private *priv = dev->priv; | ||
523 | |||
524 | lbs_deb_enter(LBS_DEB_TX); | ||
525 | |||
526 | /* We could return NETDEV_TX_BUSY here, but I'd actually | ||
527 | like to get the point where we can BUG() */ | ||
528 | if (priv->dnld_sent) { | ||
529 | lbs_pr_err("%s while dnld_sent\n", __func__); | ||
530 | priv->stats.tx_dropped++; | ||
531 | goto done; | ||
532 | } | ||
533 | if (priv->currenttxskb) { | ||
534 | lbs_pr_err("%s while TX skb pending\n", __func__); | ||
535 | priv->stats.tx_dropped++; | ||
536 | goto done; | ||
537 | } | ||
538 | |||
539 | netif_stop_queue(priv->dev); | ||
540 | if (priv->mesh_dev) | ||
541 | netif_stop_queue(priv->mesh_dev); | ||
542 | |||
543 | if (lbs_process_tx(priv, skb) == 0) | ||
544 | dev->trans_start = jiffies; | ||
545 | done: | ||
546 | lbs_deb_leave_args(LBS_DEB_TX, "ret %d", ret); | ||
547 | return ret; | ||
548 | } | ||
549 | |||
550 | /** | 518 | /** |
551 | * @brief Mark mesh packets and handover them to lbs_hard_start_xmit | 519 | * @brief Mark mesh packets and handover them to lbs_hard_start_xmit |
552 | * | 520 | * |
diff --git a/drivers/net/wireless/libertas/tx.c b/drivers/net/wireless/libertas/tx.c index 10596f3bb59a..336544cdeca6 100644 --- a/drivers/net/wireless/libertas/tx.c +++ b/drivers/net/wireless/libertas/tx.c | |||
@@ -56,7 +56,7 @@ static u32 convert_radiotap_rate_to_mv(u8 rate) | |||
56 | * @param skb A pointer to skb which includes TX packet | 56 | * @param skb A pointer to skb which includes TX packet |
57 | * @return 0 or -1 | 57 | * @return 0 or -1 |
58 | */ | 58 | */ |
59 | int lbs_process_tx(struct lbs_private *priv, struct sk_buff *skb) | 59 | static int lbs_process_tx(struct lbs_private *priv, struct sk_buff *skb) |
60 | { | 60 | { |
61 | int ret = -1; | 61 | int ret = -1; |
62 | struct txpd localtxpd; | 62 | struct txpd localtxpd; |
@@ -179,6 +179,37 @@ done: | |||
179 | return ret; | 179 | return ret; |
180 | } | 180 | } |
181 | 181 | ||
182 | int lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | ||
183 | { | ||
184 | int ret = 0; | ||
185 | struct lbs_private *priv = dev->priv; | ||
186 | |||
187 | lbs_deb_enter(LBS_DEB_TX); | ||
188 | |||
189 | /* We could return NETDEV_TX_BUSY here, but I'd actually | ||
190 | like to get the point where we can BUG() */ | ||
191 | if (priv->dnld_sent) { | ||
192 | lbs_pr_err("%s while dnld_sent\n", __func__); | ||
193 | priv->stats.tx_dropped++; | ||
194 | goto done; | ||
195 | } | ||
196 | if (priv->currenttxskb) { | ||
197 | lbs_pr_err("%s while TX skb pending\n", __func__); | ||
198 | priv->stats.tx_dropped++; | ||
199 | goto done; | ||
200 | } | ||
201 | |||
202 | netif_stop_queue(priv->dev); | ||
203 | if (priv->mesh_dev) | ||
204 | netif_stop_queue(priv->mesh_dev); | ||
205 | |||
206 | if (lbs_process_tx(priv, skb) == 0) | ||
207 | dev->trans_start = jiffies; | ||
208 | done: | ||
209 | lbs_deb_leave_args(LBS_DEB_TX, "ret %d", ret); | ||
210 | return ret; | ||
211 | } | ||
212 | |||
182 | /** | 213 | /** |
183 | * @brief This function sends to the host the last transmitted packet, | 214 | * @brief This function sends to the host the last transmitted packet, |
184 | * filling the radiotap headers with transmission information. | 215 | * filling the radiotap headers with transmission information. |