Hello.

On 04/02/2013 10:47 PM, Alan Ott wrote:

> Use netif_stop_queue() and netif_wake_queue() to control the flow of
> packets to mac802154 devices.  Since many IEEE 802.15.4 devices have no
> output buffer, and since the mac802154 xmit() function is designed to
> block, netif_stop_queue() is called after each packet.
>
> Signed-off-by: Alan Ott <a...@signal11.us>
> ---
>   net/mac802154/tx.c | 16 ++++++++++++++++
>   1 file changed, 16 insertions(+)
>
> diff --git a/net/mac802154/tx.c b/net/mac802154/tx.c
> index a248246..fe3e02c 100644
> --- a/net/mac802154/tx.c
> +++ b/net/mac802154/tx.c
[...]
> @@ -71,6 +73,12 @@ static void mac802154_xmit_worker(struct work_struct *work)
>   out:
>       mutex_unlock(&xw->priv->phy->pib_lock);
>   
> +     /* Restart the netif queue on each sub_if_data object. */
> +     rcu_read_lock();
> +     list_for_each_entry_rcu(sdata, &xw->priv->slaves, list) {
> +             netif_wake_queue(sdata->dev);
> +     }


    Are {} really necessary here?

> @@ -108,6 +117,13 @@ netdev_tx_t mac802154_tx(struct mac802154_priv *priv, 
> struct sk_buff *skb,
>               return NETDEV_TX_BUSY;
>       }
>   
> +     /* Stop the netif queue on each sub_if_data object. */
> +     rcu_read_lock();
> +     list_for_each_entry_rcu(sdata, &priv->slaves, list) {
> +             netif_stop_queue(sdata->dev);
> +     }

    And here?

WBR, Sergei


------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to