All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: Varka Bhadram <varkabhadram@gmail.com>
Cc: linux-wpan - ML <linux-wpan@vger.kernel.org>, kernel@pengutronix.de
Subject: Re: [PATCH bluetooth-next 15/18] at86rf230: generate random perm extended address
Date: Fri, 12 Dec 2014 15:56:20 +0100	[thread overview]
Message-ID: <20141212145619.GE381@omega> (raw)
In-Reply-To: <20141106100552.GB1071@x61s.campuswlan.hs-rm.de>

Varka,

On Thu, Nov 06, 2014 at 11:05:52AM +0100, Alexander Aring wrote:
> On Thu, Nov 06, 2014 at 11:22:45AM +0530, Varka Bhadram wrote:
> > On Thursday 06 November 2014 01:21 AM, Alexander Aring wrote:
> > > This patch adds support for a random generated perm extended address for
> > > the at86rf230 driver.
> > >
> > > Signed-off-by: Alexander Aring <alex.aring@gmail.com>
> > > ---
> > >   drivers/net/ieee802154/at86rf230.c | 1 +
> > >   1 file changed, 1 insertion(+)
> > >
> > > diff --git a/drivers/net/ieee802154/at86rf230.c b/drivers/net/ieee802154/at86rf230.c
> > > index bf47785..a6db768 100644
> > > --- a/drivers/net/ieee802154/at86rf230.c
> > > +++ b/drivers/net/ieee802154/at86rf230.c
> > > @@ -1534,6 +1534,7 @@ static int at86rf230_probe(struct spi_device *spi)
> > >   lp->spi = spi;
> > >   hw->parent = &spi->dev;
> > >   hw->vif_data_size = sizeof(*lp);
> > > + ieee802154_random_extended_addr(&hw->phy->perm_extended_addr);
> > >
> > >   lp->regmap = devm_regmap_init_spi(spi, &at86rf230_regmap_spi_config);
> > >   if (IS_ERR(lp->regmap)) {
> > 
> > You are getting this extended address here and configuring at the time
> > of iface add.
> > 
> > This change should be there for other drivers ( CC2520 & MRF24J40 ) also ..?
> > 
> 
> yes, but please refer before if these transceivers supports some eeprom
> or serial id where the extended addr could be generated from.
> 
> Otherwise we need to generate a random one. This value can also get from
> device tree or extended addr, but we are far away to support such
> behaviour. If somebody wants to implement this, please send patches to
> me and device tree ml.
> 

what's about this, to having a zero address perm_extended_addr address
is defintly a bug in your driver.

My respone here was more a (this is not really c, but mention what I
meant here):

switch (CC2520_supports)
case EEPROM_FOR_EUI64:
	perm_extended_addr = readout_eeprom;
	break;
case SERIAL_ID_REGISTERS_FOR_EUI64:
	perm_extended_addr = readout_registers;
	break;
default:
	perm_extended_addr = generate_random_one;
}

So if you don't have case 1 and 2, then generate a random one.

Also please check for reset values for phy settings like
current_channel, current_page...

Maybe wait some time when cca handling patches are in then you can
changes also the cca mode to the default value after reset.

- Alex

  reply	other threads:[~2014-12-12 14:56 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-05 19:51 [PATCH bluetooth-next 00/18] ieee802154: interface registration and perm address support Alexander Aring
2014-11-05 19:51 ` [PATCH bluetooth-next 01/18] ieee802154: rework wpan_phy index assignment Alexander Aring
2014-11-05 19:51 ` [PATCH bluetooth-next 02/18] ieee802154: remove nl802154 unused functions Alexander Aring
2014-11-05 19:51 ` [PATCH bluetooth-next 03/18] mac802154: move interface del handling in iface Alexander Aring
2014-11-05 19:51 ` [PATCH bluetooth-next 04/18] mac802154: move interface add " Alexander Aring
2014-11-05 19:51 ` [PATCH bluetooth-next 05/18] mac802154: move dev_hold out of ieee802154_if_add Alexander Aring
2014-11-05 19:51 ` [PATCH bluetooth-next 06/18] ieee802154: rework interface registration Alexander Aring
2014-11-05 19:51 ` [PATCH bluetooth-next 07/18] ieee802154: remove mlme get_phy callback Alexander Aring
2014-11-05 19:51 ` [PATCH bluetooth-next 08/18] mac802154: add default interface registration Alexander Aring
2014-11-05 19:51 ` [PATCH bluetooth-next 09/18] mac802154: add ieee802154_vif struct Alexander Aring
2014-11-05 19:51 ` [PATCH bluetooth-next 10/18] ieee802154: add IEEE802154_EXTENDED_ADDR_LEN Alexander Aring
2014-11-05 19:51 ` [PATCH bluetooth-next 11/18] ieee802154: add ieee802154_random_extended_addr Alexander Aring
2014-11-06  1:54   ` Varka Bhadram
2014-11-06 10:03     ` Alexander Aring
2014-11-05 19:51 ` [PATCH bluetooth-next 12/18] mac802154: add ieee802154_le64_to_be64 Alexander Aring
2014-11-05 19:51 ` [PATCH bluetooth-next 13/18] mac802154: cleanup ieee802154_netdev_to_extended_addr Alexander Aring
2014-11-05 19:51 ` [PATCH bluetooth-next 14/18] mac802154: add support for perm_extended_addr Alexander Aring
2014-11-05 19:51 ` [PATCH bluetooth-next 15/18] at86rf230: generate random perm extended address Alexander Aring
2014-11-06  5:52   ` Varka Bhadram
2014-11-06 10:05     ` Alexander Aring
2014-12-12 14:56       ` Alexander Aring [this message]
     [not found]         ` <CAEUmHya_1iG9Rs-Wq+bq8MT2rwjgG_zUvr8wB-zTLnSCyj-StA@mail.gmail.com>
2014-12-13  9:08           ` Alexander Aring
2014-11-05 19:51 ` [PATCH bluetooth-next 16/18] at86rf230: add force slotted operation bit Alexander Aring
2014-11-05 19:51 ` [PATCH bluetooth-next 17/18] mac802154: use IEEE802154_EXTENDED_ADDR_LEN Alexander Aring
2014-11-05 19:51 ` [PATCH bluetooth-next 18/18] mac802154: fix typo promisuous to promiscuous Alexander Aring
2014-11-05 20:54 ` [PATCH bluetooth-next 00/18] ieee802154: interface registration and perm address support Marcel Holtmann

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=20141212145619.GE381@omega \
    --to=alex.aring@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-wpan@vger.kernel.org \
    --cc=varkabhadram@gmail.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.