[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20140701.231407.1114227768498633408.davem@davemloft.net>
Date: Tue, 01 Jul 2014 23:14:07 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: alex.aring@...il.com
Cc: alex.bluesman.smirnov@...il.com, dbaryshkov@...il.com,
linux-zigbee-devel@...ts.sourceforge.net, netdev@...r.kernel.org,
werner@...esberger.net
Subject: Re: [PATCH net-next 01/13] mac802154: at86rf230: add hw flags and
merge ops
From: Alexander Aring <alex.aring@...il.com>
Date: Sat, 28 Jun 2014 20:33:39 +0200
> This patch adds new mac802154 hw flags for transmit power, csma and
> listen before transmit (lbt). These flags indicates that the transceiver
> supports these features. In ieee802154_register_device the callbacks are
> setted by hw flags instead of checking of null.
>
> This patch merges also all at86rf230 operations into one operations structure
> and set the right hw flags for the at86rf230 transceivers.
>
> Signed-off-by: Alexander Aring <alex.aring@...il.com>
I don't like this, now you've created a situation where a driver crash
is easy to introduce, ie. setting the capability flag but not providing
the operations pointer properly.
You have two choices:
1) Keep the pointer test mechanism
2) Add the flags, but validate the pointer at driver registration time
and fail the register if the pointers for set flags are NULL.
When you fix this up, don't just submit this one patch, resubmit the
entire series.
Thank you.
--
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