Re: [PATCH wpan-next 09/12] mac802154: remove useless -EBUSY if sdata running

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, Aug 13, 2014 at 03:46:32PM +0200, Alexander Aring wrote:
> The slave_open function is only called by ndo_open callback. This
> callback is already protected to do a ip link set wpan0 up twice.
> This patch removing also a unnecessary for each loop to find the right
> entry which is already known.
> 
> Signed-off-by: Alexander Aring <alex.aring@xxxxxxxxx>
> ---
>  net/mac802154/iface.c | 13 -------------
>  1 file changed, 13 deletions(-)
> 
> diff --git a/net/mac802154/iface.c b/net/mac802154/iface.c
> index ae774d3..ab23246 100644
> --- a/net/mac802154/iface.c
> +++ b/net/mac802154/iface.c
> @@ -35,24 +35,11 @@
>  static int mac802154_slave_open(struct net_device *dev)
>  {
>  	struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev);
> -	struct ieee802154_sub_if_data *subif;
>  	struct ieee802154_local *local = sdata->local;
>  	int res = 0;
>  
>  	ASSERT_RTNL();
>  
> -	if (sdata->type == NL802154_IFTYPE_NODE) {
> -		mutex_lock(&sdata->local->iflist_mtx);
> -		list_for_each_entry(subif, &sdata->local->interfaces, list) {
> -			if (subif != sdata && subif->type == sdata->type &&

I will keep this patch, I thought this is subif == sdata... then it
would not make sense. But this make sense now. It checks that we don't
have an another running interface for a phy.

Sorry.

- Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux