All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: Michael Hennerich <michael.hennerich@analog.com>
Cc: Stefan Schmidt <stefan@osg.samsung.com>,
	marcel@holtmann.org, linux-wpan@vger.kernel.org,
	linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] drivers/net/ieee802154/adf7242: Driver for ADF7242 MAC IEEE802154
Date: Mon, 7 Dec 2015 14:53:17 +0100	[thread overview]
Message-ID: <20151207135312.GB20826@omega> (raw)
In-Reply-To: <56657FCA.9000502@analog.com>

Hi,

On Mon, Dec 07, 2015 at 01:47:06PM +0100, Michael Hennerich wrote:
...
> >>+static struct ieee802154_ops adf7242_ops = {
> >>+    .owner = THIS_MODULE,
> >>+    .xmit_sync = adf7242_xmit,
> >>+    .ed = adf7242_ed,
> >>+    .set_channel = adf7242_channel,
> >>+    .set_hw_addr_filt = adf7242_set_hw_addr_filt,
> >>+    .start = adf7242_start,
> >>+    .stop = adf7242_stop,
> >>+    .set_csma_params = adf7242_set_csma_params,
> >>+    .set_frame_retries = adf7242_set_frame_retries,
> >>+    .set_txpower = adf7242_set_txpower,
> >>+    .set_promiscuous_mode = adf7242_set_promiscuous_mode,
> >>+    .set_cca_ed_level = adf7242_set_cca_ed_level,
> >
> >Nice to see so many callbacks implemented. The only things I see missing
> >is xmit_async, set_lbt and set_cca_mode. I would not make it a
> >requirements to get these hooked up before merging this patch but we
> >should consider it as todo items.
> 
> The part only supports CCA mode Energy above threshold.
> Not sure what this LBT mode does on the AT86RFxxx driver.

This is for sub 1Ghz regulations in some country (Japan/Europe) area,
there CSMA/CA accoridng 802.15.4 isn't allowed at sub 1-Ghz, that's why
they introduced LBT.

That reminds me to work on a regulator db, again. :-)

Nevertheless it should not related to 2.4 Ghz global ISM band, so far I
know.

> The ADF7242 only supports CSMA-CA and not some other listen before talk
> flavour. The only oher option is to turn CSMA-CA completly off.

Another thing for ToDo list, add support for turning CSMA-CA handling
complete off, many transceiver has such option.

There exists ways currently to turn off CSMA handling only by choosing
the right backoff exponents, 802.15.4 writes:

Note that if macMinBE is set to zero, collision avoidance will be
disabled during the first iteration of this algorithm.

Okay then another ToDo for wpan-tools would be to make a nice printout
that CSMA is disabled if "macMinBE is set to zero".

> I'm also not sure if we need to supprot the async mode, while the sync mode
> is working. For me the async mode looks like it tries to workaround some HW
> access issues.
> 

We came to the conclusion that "sync" callback is a workaround that
people can use spi_sync. :-)

Ununfortunately the nfc subsystem works also which such sync callback.

Currently working of sync xmit:

 - ieee802154_tx (softirq context, might_sleep() will fail).
    - set parameters schedule workqueue /* queue_work(...) */
      /* sleeping phase */ <-- we lost the context of ieee802154_tx, the
                               locks are not held anymore. Others
                               netdev_ops are possible.
 - ieee802154_xmit_worker will be scheduled <--- Does this still
 						 working if a stop
						 callback was running
						 inside the
						 "sleeping phase"?
    - /* sleeping: wait for completion */ when tx complete is triggered
                                          irq triggered.

With async:

The context of ieee802154_tx will be held until the driver "xmit_async"
callback is done. This callback should call spi_async which cannot be
interrupted until the "last" complete callback is done.

Then a stop callback can occur at the time where the hardware "actually"
transmit the frame. This is a complete async process, there is no "wait
for completion" anymore. The complete replacement would be
"ieee802154_xmit_complete".

Drivers should also disable/enable the tx/rx irq's when doing stop/start,
if possible.

- Alex

  reply	other threads:[~2015-12-07 13:53 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-04  9:09 [PATCH] drivers/net/ieee802154/adf7242: Driver for ADF7242 MAC IEEE802154 michael.hennerich
2015-12-04  9:09 ` michael.hennerich
2015-12-04 12:07 ` Stefan Schmidt
2015-12-07 12:02   ` Stefan Schmidt
2015-12-07 12:18     ` Michael Hennerich
2015-12-07 12:18       ` Michael Hennerich
2015-12-07 13:25       ` Alexander Aring
2015-12-07 13:34         ` Michael Hennerich
2015-12-07 13:34           ` Michael Hennerich
2015-12-07 14:12           ` Alexander Aring
2015-12-08  8:07             ` Michael Hennerich
2015-12-08  8:07               ` Michael Hennerich
2015-12-08 15:53               ` Alexander Aring
2015-12-08 16:02                 ` Michael Hennerich
2015-12-08 16:02                   ` Michael Hennerich
2015-12-09 10:31                   ` Alexander Aring
2015-12-10  0:04                     ` Stefan Schmidt
2015-12-07 15:08         ` Stefan Schmidt
2015-12-07 14:54       ` Stefan Schmidt
2015-12-07 12:47   ` Michael Hennerich
2015-12-07 12:47     ` Michael Hennerich
2015-12-07 13:53     ` Alexander Aring [this message]
2015-12-08  8:43       ` Michael Hennerich
2015-12-08  8:43         ` Michael Hennerich
2015-12-08 17:11         ` Alexander Aring
2015-12-09  9:53           ` Michael Hennerich
2015-12-09  9:53             ` Michael Hennerich
2015-12-09 14:55             ` Alexander Aring
2015-12-09 16:09               ` Michael Hennerich
2015-12-09 16:09                 ` Michael Hennerich
2015-12-07 15:03     ` Stefan Schmidt
2015-12-04 12:42 ` Christopher Friedt
2015-12-04 13:34 ` kbuild test robot
2015-12-04 13:34   ` kbuild test robot
2015-12-04 13:41 ` kbuild test robot
2015-12-04 13:41   ` kbuild test robot

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=20151207135312.GB20826@omega \
    --to=alex.aring@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=michael.hennerich@analog.com \
    --cc=stefan@osg.samsung.com \
    /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.