Re: [PATCH] mac80211: pass station instead of address to update_tkip_key

Julian Calaby
2010-01-19T14:06:44Z

On Wed, Jan 20, 2010 at 00:21, Johannes Berg <johannes@sipsolutions.net> wrote:
> When a TKIP key is updated, we should pass the station
> pointer instead of just the address, since drivers can
> use that to store their own data.
>
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> ---
>
> --- wireless-testing.orig/net/mac80211/driver-trace.h   2010-01-16 20:18:21.000000000 +0100
> +++ wireless-testing/net/mac80211/driver-trace.h        2010-01-19 14:20:57.000000000 +0100
> @@ -332,25 +332,25 @@ TRACE_EVENT(drv_set_key,
>  TRACE_EVENT(drv_update_tkip_key,
>        TP_PROTO(struct ieee80211_local *local,
>                 struct ieee80211_key_conf *conf,
> -                const u8 *address, u32 iv32),
> +                struct sta_info *sta, u32 iv32),
>
>        TP_ARGS(local, conf, address, iv32),

Should you change address to sta?

>        TP_STRUCT__entry(
>                LOCAL_ENTRY
> -               __array(u8, addr, 6)
> +               STA_ENTRY
>                __field(u32, iv32)
>        ),
>
>        TP_fast_assign(
>                LOCAL_ASSIGN;
> -               memcpy(__entry->addr, address, 6);
> +               STA_ASSIGN;
>                __entry->iv32 = iv32;
>        ),
>
>        TP_printk(
> -               LOCAL_PR_FMT " addr:%pM iv32:%#x",
> -               LOCAL_PR_ARG, __entry->addr, __entry->iv32
> +               LOCAL_PR_FMT STA_PR_FMT " iv32:%#x",
> +               LOCAL_PR_ARG,STA_PR_ARG, __entry->iv32
>        )
>  );
>

Thanks,

--

Julian Calaby

Email: julian.calaby@gmail.com
.Plan: http://sites.google.com/site/juliancalaby/