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@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH bluetooth-next 14/17] mac802154: remove channel attributes from sdata
Date: Wed, 29 Oct 2014 07:07:18 +0100	[thread overview]
Message-ID: <20141029060716.GD4709@omega> (raw)
In-Reply-To: <54507C98.4060804@gmail.com>

On Wed, Oct 29, 2014 at 11:05:20AM +0530, Varka Bhadram wrote:
> On 10/29/2014 10:52 AM, Alexander Aring wrote:
> >>>-	    sdata->local->phy->current_page != sdata->page) {
> >>>-		mutex_unlock(&sdata->local->phy->pib_lock);
> >>>-
> >>>-		work = kzalloc(sizeof(*work), GFP_ATOMIC);
> >>>-		if (!work)
> >>>-			return;
> >>>-
> >>>-		INIT_WORK(&work->work, phy_chan_notify);
> >>>-		work->dev = dev;
> >>>-		queue_work(sdata->local->workqueue, &work->work);
> >>>+	res = drv_set_channel(local, page, chan);
> >>>+	if (res) {
> >>>+		pr_debug("set_channel failed\n");
> >>Why don't we use netdev_dbg() here...?
> >>
> >>>  	} else {
> >because there comming more patches and I am not at the finally cleanup.
> >This code will be part of the deprecated netlink interface. I don't want
> >to fix anything here. It should only work for the things which we
> >support in the official userspace software and that is. Channel setting,
> >interface add/del and setting address filter.
> >
> >I don't want to send a patch series which contains more than 20 patches.
> >
> >This patch I could also add an another patch for removing the worker
> >here and I really don't have an idea why we have a worker here. This
> >channel setting patch is more a rework. In further all phy settings are
> >directly  calls to the driver. MAC settings are stored at each interface
> >and setted by a open/close or rather ifup and ifdown.
> 
> I think when we do ifup the open function will be called..?
> 

Yes, we have these multiple interfaces and these "can" have different
MAC settings. When I say MAC here then it's something which needs an
algorithmn. PHY settings doesn't need to run a algorithmn, like channel
page settings.

Later if we do a ifup we should set all MAC settings which is handled by
PHY. It's handled by phy because it's very time critical like ARET or
CSMA. Also address filtering is a MAC settings which is handled by phy.

In the next patches we also remove the pib/mib lock and make locking via
netif_running. That means we can't set MAC which are handled by PHY while
netif is running. This is usual principle in netdev, like you can't
change ethernet address while netif is running. Now when netif is
running then the rx/tx paths are called and these variables becomes read
only. We simple don't need any locking mechanism in hotpaths then.

If somebody want to change addresses short/extended/pan_id, ARET, CSMA.
He need to do a ifdown first and then the user can change it.

On ifup all interfaces should be have the same MAC settings which are
handled by PHY. I need to see if we really need the multiple interface
thing or just implement a netlink call to change the interface type.

Only one use case for me is that we can have more than one monitor
interface at the same time.

> >There will come a new netlink interface which use the framework like
> >wireless. The old one will also be functional but we will remove it some
> >or later.
> 
> What is the New netlink interface..?
> 
> I would like to know.

The current netlink interface is the most weird code in the current
implementation and the official userspace software doesn't support all
netlink commands. I tried to implement it but I gave up. The new one
should be look like:

https://github.com/linux-wpan/linux-wpan-next/blob/wpan_rework_rfc/net/ieee802154/nl802154.c

mostly grab the framework from wireless.

Userspace tools are:

https://github.com/linux-wpan/wpan-tools

mostly grab the framework from iw wireless tools.

- Alex

  reply	other threads:[~2014-10-29  6:07 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-28 17:21 [PATCH bluetooth-next 00/17] mac802154: iface and driver-ops cleanup Alexander Aring
2014-10-28 17:21 ` [PATCH bluetooth-next 01/17] mac802154: monitor: merge into iface implementation Alexander Aring
2014-10-29  3:39   ` Varka Bhadram
2014-10-29  3:49     ` Varka Bhadram
2014-10-29  5:39       ` Alexander Aring
2014-10-28 17:21 ` [PATCH bluetooth-next 02/17] mac802154: main: move open and close into iface Alexander Aring
2014-10-28 17:21 ` [PATCH bluetooth-next 03/17] mac802154: declare struct ieee802154_ops as const Alexander Aring
2014-10-29  3:31   ` Varka Bhadram
2014-10-28 17:21 ` [PATCH bluetooth-next 04/17] mac802154: ops: declare channel and page as u8 Alexander Aring
2014-10-29  3:32   ` Varka Bhadram
2014-10-28 17:21 ` [PATCH bluetooth-next 05/17] mac802154: introduce driver-ops header Alexander Aring
2014-10-28 17:21 ` [PATCH bluetooth-next 06/17] mac802154: use driver-ops function wrappers Alexander Aring
2014-10-28 17:21 ` [PATCH bluetooth-next 07/17] mac802154: remove might_sleep from driver layer Alexander Aring
2014-10-29  3:33   ` Varka Bhadram
2014-10-29  5:53     ` Alexander Aring
2014-10-29  5:57       ` Varka Bhadram
2014-10-29  6:13         ` Alexander Aring
2014-10-29  7:23           ` Alexander Aring
2014-10-29  8:10           ` Varka Bhadram
2014-10-29  8:12             ` Varka Bhadram
2014-10-28 17:21 ` [PATCH bluetooth-next 08/17] mac802154: remove driver ops in wpan-phy Alexander Aring
2014-10-28 17:21 ` [PATCH bluetooth-next 09/17] mac802154: rework sdata state change to running Alexander Aring
2014-10-28 17:21 ` [PATCH bluetooth-next 10/17] mac802154: rename running to started Alexander Aring
2014-10-28 17:21 ` [PATCH bluetooth-next 11/17] mac802154: move local started handling Alexander Aring
2014-10-28 17:21 ` [PATCH bluetooth-next 12/17] mac802154: add synchronization handling Alexander Aring
2014-10-28 17:21 ` [PATCH bluetooth-next 13/17] mac802154: iface: remove assign to zero Alexander Aring
2014-10-28 17:21 ` [PATCH bluetooth-next 14/17] mac802154: remove channel attributes from sdata Alexander Aring
2014-10-29  3:52   ` Varka Bhadram
2014-10-29  5:22     ` Alexander Aring
2014-10-29  5:35       ` Varka Bhadram
2014-10-29  6:07         ` Alexander Aring [this message]
2014-10-28 17:21 ` [PATCH bluetooth-next 15/17] mac802154: move mac_params functions into mac_cmd Alexander Aring
2014-10-28 17:21 ` [PATCH bluetooth-next 16/17] mac802154: cleanup open count handling Alexander Aring
2014-10-28 17:21 ` [PATCH bluetooth-next 17/17] ieee802154: introduce sysfs file Alexander Aring
2014-10-28 22:24 ` [PATCH bluetooth-next 00/17] mac802154: iface and driver-ops cleanup 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=20141029060716.GD4709@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.