lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 30 Nov 2011 20:22:02 +0400
From:	Dmitry Eremin-Solenikov <dbaryshkov@...il.com>
To:	Alexander Smirnov <alex.bluesman.smirnov@...il.com>
Cc:	linux-zigbee-devel@...ts.sourceforge.net, netdev@...r.kernel.org,
	davem@...emloft.net
Subject: Re: [PATCH 07/12] [IEEE802154] ieee802154: define simplified mlme interface

On Wed, Nov 30, 2011 at 6:25 PM, Alexander Smirnov
<alex.bluesman.smirnov@...il.com> wrote:
> Define light-weight mlme interface.

Could you please elaborate, why it is necessary? I created it for the
sub-devices
which didn't have full IEEE 802.15.4 MLME (like monitoring devices,
SMAC or MiWi,
or other proprietary protocols), but I don't see support for those
coming in this patch set.

>
> Signed-off-by: Alexander Smirnov <alex.bluesman.smirnov@...il.com>
> ---
>  include/net/ieee802154_netdev.h |   11 +++++++++++
>  net/ieee802154/nl-mac.c         |    2 +-
>  2 files changed, 12 insertions(+), 1 deletions(-)
>
> diff --git a/include/net/ieee802154_netdev.h b/include/net/ieee802154_netdev.h
> index 12a7ee4..5264b00 100644
> --- a/include/net/ieee802154_netdev.h
> +++ b/include/net/ieee802154_netdev.h
> @@ -83,7 +83,12 @@ struct wpan_phy;
>  * get_phy should increment the reference counting on returned phy.
>  * Use wpan_wpy_put to put that reference.
>  */
> +struct simple_mlme_ops {
> +       struct wpan_phy *(*get_phy)(const struct net_device *dev);
> +};
>  struct ieee802154_mlme_ops {
> +       struct simple_mlme_ops wpan_ops;
> +
>        int (*assoc_req)(struct net_device *dev,
>                        struct ieee802154_addr *addr,
>                        u8 channel, u8 page, u8 cap);
> @@ -112,6 +117,12 @@ struct ieee802154_mlme_ops {
>        u8 (*get_bsn)(const struct net_device *dev);
>  };
>
> +static inline struct simple_mlme_ops *simple_mlme_ops(
> +               const struct net_device *dev)
> +{
> +       return dev->ml_priv;
> +}
> +
>  static inline struct ieee802154_mlme_ops *ieee802154_mlme_ops(
>                const struct net_device *dev)
>  {
> diff --git a/net/ieee802154/nl-mac.c b/net/ieee802154/nl-mac.c
> index adaf462..1d23aa6 100644
> --- a/net/ieee802154/nl-mac.c
> +++ b/net/ieee802154/nl-mac.c
> @@ -263,7 +263,7 @@ static int ieee802154_nl_fill_iface(struct sk_buff *msg, u32 pid,
>        if (!hdr)
>                goto out;
>
> -       phy = ieee802154_mlme_ops(dev)->get_phy(dev);
> +       phy = simple_mlme_ops(dev)->get_phy(dev);
>        BUG_ON(!phy);
>
>        NLA_PUT_STRING(msg, IEEE802154_ATTR_DEV_NAME, dev->name);
> --
> 1.7.2.3
>
>



-- 
With best wishes
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ