linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 07/21] cw1200: queue.*, implementation of TX queues of the cw1200 driver.
Date: Fri, 02 Mar 2012 09:33:53 +0100	[thread overview]
Message-ID: <1330677233.3367.7.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1330652495-25837-8-git-send-email-dmitry.tarnyagin@stericsson.com> (sfid-20120302_024202_033691_19CC47E6)

On Fri, 2012-03-02 at 02:41 +0100, Dmitry Tarnyagin wrote:
> The code implements cw1200 TX queues, used for holding TX frames pending
> transmission. The code supports garbage collecting and accounting of the frames.
> 
> Note that link_id_map here and in the rest of the code is used to track
> (ieee80211) power management state of connected stations in AP mode.
> 
> Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
> ---
>  drivers/staging/cw1200/queue.c |  584 ++++++++++++++++++++++++++++++++++++++++
>  drivers/staging/cw1200/queue.h |  116 ++++++++
>  2 files changed, 700 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/staging/cw1200/queue.c
>  create mode 100644 drivers/staging/cw1200/queue.h
> 
> diff --git a/drivers/staging/cw1200/queue.c b/drivers/staging/cw1200/queue.c
> new file mode 100644
> index 0000000..014e6b2
> --- /dev/null
> +++ b/drivers/staging/cw1200/queue.c
> @@ -0,0 +1,584 @@
> +/*
> + * O(1) TX queue with built-in allocator for ST-Ericsson CW1200 drivers
> + *
> + * Copyright (c) 2010, ST-Ericsson
> + * Author: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +#include <net/mac80211.h>
> +#include <linux/sched.h>
> +#include "queue.h"
> +#include "cw1200.h"
> +#include "debug.h"
> +
> +/* private */ struct cw1200_queue_item
> +{
> +	struct list_head	head;
> +	struct sk_buff		*skb;
> +	u32			packetID;
> +	unsigned long		queue_timestamp;
> +	unsigned long		xmit_timestamp;
> +	struct cw1200_txpriv	txpriv;
> +	u8			generation;
> +};
> +
> +static inline void __cw1200_queue_lock(struct cw1200_queue *queue)
> +{
> +	struct cw1200_queue_stats *stats = queue->stats;
> +	if (queue->tx_locked_cnt++ == 0) {

Is there some common lock that prevents this getting corrupted? mac80211
and higher layers do not have any synchronisation between the different
TX queues, and you'll need to call this from a few places ... maybe it
needs to be atomic_t?

johannes


  reply	other threads:[~2012-03-02  8:33 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <d53e019b1a0bcd29c2c367fbe5665413f2d33938-submit>
2012-03-02  1:41 ` [PATCH 00/21] cw1200: mac80211-based driver for ST-Ericsson CW1200 device Dmitry Tarnyagin
2012-03-02  1:41   ` [PATCH 01/21] cw1200: cw1200.h, private driver data Dmitry Tarnyagin
2012-03-02  1:41   ` [PATCH 02/21] cw1200: cw1200_plat.h, definition of the driver'ss platform data Dmitry Tarnyagin
2012-03-02  1:41   ` [PATCH 03/21] cw1200: sbus.h, common device interface abstraction Dmitry Tarnyagin
2012-03-02  1:41   ` [PATCH 04/21] cw1200: cw1200_sdio.c, implementation of SDIO wrapper for the driver Dmitry Tarnyagin
2012-03-02  1:41   ` [PATCH 05/21] cw1200: hwio.*, device reg/mem map and low-level i/o primitives Dmitry Tarnyagin
2012-03-02  1:41   ` [PATCH 06/21] cw1200: fwio.*, firmware downloading code for the cw1200 driver Dmitry Tarnyagin
2012-03-02  1:41   ` [PATCH 07/21] cw1200: queue.*, implementation of TX queues of " Dmitry Tarnyagin
2012-03-02  8:33     ` Johannes Berg [this message]
2012-03-02 15:32       ` Dmitry Tarnyagin
2012-03-02  1:41   ` [PATCH 08/21] cw1200: wsm.*, implementation of device high-level interface Dmitry Tarnyagin
2012-03-02  8:34     ` Johannes Berg
2012-03-02  8:41       ` Joe Perches
2012-03-02  1:41   ` [PATCH 09/21] cw1200: txrx.*, implementation of datapath Dmitry Tarnyagin
2012-05-07 12:53     ` Bob Copeland
2012-05-08  7:09       ` Dmitry Tarnyagin
2012-05-08 12:54         ` Bob Copeland
2012-03-02  1:41   ` [PATCH 10/21] cw1200: ht.h, small helper header with HT definitions Dmitry Tarnyagin
2012-03-02  1:41   ` [PATCH 11/21] cw1200: bh.*, device serving thread Dmitry Tarnyagin
2012-03-02  1:41   ` [PATCH 12/21] cw1200: sta.*, mac80211 STA callbacks Dmitry Tarnyagin
2012-03-02  1:41   ` [PATCH 13/21] cw1200: ap.*, mac80211 AP callbacks Dmitry Tarnyagin
2012-03-02  1:41   ` [PATCH 14/21] cw1200: scan.*, mac80211 hw_scan callback Dmitry Tarnyagin
2012-03-02  1:41   ` [PATCH 15/21] cw1200: debug.*, implementation of the driver's debugfs Dmitry Tarnyagin
2012-03-02  1:41   ` [PATCH 16/21] cw1200: itp.*, internal device test and calibration code Dmitry Tarnyagin
2012-03-02  1:41   ` [PATCH 17/21] cw1200: pm.*, power management code Dmitry Tarnyagin
2012-03-02  1:41   ` [PATCH 18/21] cw1200: main.c, core initialization code Dmitry Tarnyagin
2012-03-02  1:41   ` [PATCH 19/21] cw1200: TODO list Dmitry Tarnyagin
2012-03-02  8:51     ` Johannes Berg
2012-03-02  1:41   ` [PATCH 20/21] cw1200: Credits Dmitry Tarnyagin
2012-03-02  1:41   ` [PATCH 21/21] cw1200: Kconfig + Makefile for the driver Dmitry Tarnyagin
2012-03-02  8:50     ` Johannes Berg
2012-03-02 15:45       ` Dmitry Tarnyagin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1330677233.3367.7.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=dmitry.tarnyagin@stericsson.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).