linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Fariya Fatima <fariya.f@redpinesignals.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 3.14.0-rc5 v3 1/10] rsi: Adding RS9113 driver files
Date: Wed, 05 Mar 2014 11:49:16 +0100	[thread overview]
Message-ID: <1394016556.5275.5.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <5314357A.8090205@redpinesignals.com> (sfid-20140303_085748_342821_9E04171F)

On Mon, 2014-03-03 at 13:25 +0530, Fariya Fatima wrote:

> +config RSI_91x

Convention would be to use RSI_91X.

> +	tristate "Redpine Signals Inc 91x WLAN driver support"
> +	depends on MAC80211
> +	default m

Please don't add a default, the driver is probably useless for almost
everyone running 'make oldconfig' and similar.

> +config RSI_DEBUGFS
> +	bool "Redpine Signals Inc debug support"
> +	depends on RSI_91x
> +	default y

This on the other hand is fine since it depends on RSI_91x

> +#ifndef __RSI_DEBUGFS_H__
> +#define __RSI_DEBUGFS_H__
> +
> +#include "rsi_main.h"
> +#include <linux/debugfs.h>
> +
> +#define FOPS(fopen) { \
> +	.owner = THIS_MODULE, \
> +	.open = (fopen), \
> +	.read = seq_read, \
> +	.llseek = seq_lseek, \
> +}

I'm not sure these should be in a header file? Seems only the debugfs
implemnetation would need them.

> +#define TID_TO_WME_AC(_tid) (      \
> +	((_tid) == 0 || (_tid) == 3) ? BE_Q : \
> +	((_tid) < 3) ? BK_Q : \
> +	((_tid) < 6) ? VI_Q : \
> +	VO_Q)
> +
> +#define WME_AC(_q) (    \
> +	((_q) == BK_Q) ? IEEE80211_AC_BK : \
> +	((_q) == BE_Q) ? IEEE80211_AC_BE : \
> +	((_q) == VI_Q) ? IEEE80211_AC_VI : \
> +	IEEE80211_AC_VO)

What are those "BE_Q" constants? Those seem a tad short to me.

> +enum EDCA_QUEUE {

Ah, here they are. enums should typically not be uppercase though.

> +struct rsi_event {
> +	atomic_t event_condition;
> +	wait_queue_head_t event_queue;
> +};
> +
> +struct rsi_thread {
> +	void (*thread_function)(void *);
> +	struct completion completion;
> +	struct task_struct *task;
> +	struct rsi_event event;
> +	atomic_t thread_done;
> +};

These seem odd ... maybe they should at least come with comments about
how generic kernel functionality can't be used and why it needs another
abstraction layer?

> +	/* Generic */
> +	u8 channel;
> +	u8 *rx_data_pkt;

That seems rather odd, how can you have one rx_data_pkt in the global
struct?

> +#ifdef CONFIG_RSI_DEBUGFS
> +	struct rsi_debugfs *dfsentry;
> +	u8 num_debugfs_entries;
> +#endif

What do you need num_entries for?

johannes


  parent reply	other threads:[~2014-03-05 10:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-03  7:55 [PATCH 3.14.0-rc5 v3 1/10] rsi: Adding RS9113 driver files Fariya Fatima
2014-03-04 18:38 ` John W. Linville
2014-03-04 20:08   ` Jonas Gorski
2014-03-04 20:13     ` John W. Linville
2014-03-05 10:49 ` Johannes Berg [this message]
     [not found] <-1822401706-40502@mail.redpinesignals.com>
2014-03-05 18:08 ` Johannes Berg

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=1394016556.5275.5.camel@jlt4.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=fariya.f@redpinesignals.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).