All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Cc: nbd@nbd.name, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 06/10] mt76x2: move mt76x2_dev in mt76x02_util.h
Date: Wed, 3 Oct 2018 12:43:35 +0200	[thread overview]
Message-ID: <20181003104334.GB2250@redhat.com> (raw)
In-Reply-To: <20181001221908.16005-7-lorenzo.bianconi@redhat.com>

On Tue, Oct 02, 2018 at 12:19:04AM +0200, Lorenzo Bianconi wrote:
> Move mt76x2_dev in mt76x02_util.h and rename it in mt76x02_dev
> in order to be shared between mt76x2 and mt76x0 driver
<snip>
> +struct mt76x02_dev {
> +	struct mt76_dev mt76; /* must be first */
> +
> +	struct mac_address macaddr_list[8];
> +
> +	struct mutex mutex;
> +
> +	u8 txdone_seq;
> +	DECLARE_KFIFO_PTR(txstatus_fifo, struct mt76x02_tx_status);
> +
> +	struct sk_buff *rx_head;
> +
> +	struct tasklet_struct tx_tasklet;
> +	struct tasklet_struct pre_tbtt_tasklet;
> +	struct delayed_work cal_work;
> +	struct delayed_work mac_work;
> +
> +	u32 aggr_stats[32];
> +
> +	struct sk_buff *beacons[8];
> +	u8 beacon_mask;
> +	u8 beacon_data_mask;
> +
> +	u8 tbtt_count;
> +	u16 beacon_int;
> +
> +	struct mt76x02_calibration cal;
> +
> +	s8 target_power;
> +	s8 target_power_delta[2];
> +	bool enable_tpc;
> +
> +	u8 coverage_class;
> +	u8 slottime;
> +
> +	struct mt76x02_dfs_pattern_detector dfs_pd;
> +};
> +
<snip> 
>  static bool
> -mt76x2_has_cal_free_data(struct mt76x2_dev *dev, u8 *efuse)
> +mt76x2_has_cal_free_data(struct mt76x02_dev *dev, u8 *efuse)

I don't think this is right approach. I would rather prefer to have
common data structures embeded in mt76x2_dev and mt76x0_dev
structures to have chip sepcific fields/data separated.

Regards
Stanislaw


  reply	other threads:[~2018-10-03 10:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-01 22:19 [PATCH 06/10] mt76x2: move mt76x2_dev in mt76x02_util.h Lorenzo Bianconi
2018-10-03 10:43 ` Stanislaw Gruszka [this message]
2018-10-03 11:01   ` Lorenzo Bianconi
2018-10-03 11:12     ` Stanislaw Gruszka
2018-10-03 11:49       ` Felix Fietkau
2018-10-03 13:32         ` Stanislaw Gruszka
2018-10-03 13:51           ` Felix Fietkau
2018-10-03 13:55             ` Stanislaw Gruszka

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=20181003104334.GB2250@redhat.com \
    --to=sgruszka@redhat.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=nbd@nbd.name \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.