Search Linux Wireless

Re: [PATCH 06/29] wl12xx: add vifs list

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

 



On Mon, 2011-10-10 at 10:12 +0200, Eliad Peller wrote: 
> keep a list of all the vifs associated with our hw.
> it will be later used in order to iterate through vifs.
> 
> Signed-off-by: Eliad Peller <eliad@xxxxxxxxxx>
> ---

[...]

> diff --git a/drivers/net/wireless/wl12xx/wl12xx.h b/drivers/net/wireless/wl12xx/wl12xx.h
> index 33ccdf8..55561c5 100644
> --- a/drivers/net/wireless/wl12xx/wl12xx.h
> +++ b/drivers/net/wireless/wl12xx/wl12xx.h
> @@ -394,6 +394,8 @@ struct wl1271 {
>  	unsigned long roles_map[BITS_TO_LONGS(WL12XX_MAX_ROLES)];
>  	unsigned long roc_map[BITS_TO_LONGS(WL12XX_MAX_ROLES)];
>  
> +	struct list_head wlvif_list;
> +
>  	struct wl1271_acx_mem_map *target_mem_map;
>  
>  	/* Accounting for allocated / available TX blocks on HW */
> @@ -564,6 +566,7 @@ struct wl1271_station {
>  
>  struct wl12xx_vif {
>  	struct wl1271 *wl;
> +	struct list_head list;

I know we alredy call this kind of thing "list" struct wl1271 for the
ARP stuff, but I prefer "node" so it's easier to follow when calling
list_add and friends.  Mind changing?


> @@ -653,6 +656,9 @@ struct ieee80211_vif *wl12xx_wlvif_to_vif(struct wl12xx_vif *wlvif)
>  	return container_of((void *)wlvif, struct ieee80211_vif, drv_priv);
>  }
>  
> +#define wl12xx_for_each_wlvif(wl, wlvif) \
> +		list_for_each_entry(wlvif, &wl->wlvif_list, list)
> +

This looks fine, but is it really necessary? I think the call to
list_for_each_entry is clear enough already, isn't it?


-- 
Cheers,
Luca.

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


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux