On Mon, 2008-12-08 at 21:11 +0100, Michael Buesch wrote: > > - if (is_broadcast_ether_addr(addr)) { > > + if (!sta) { > > /* addr is FF:FF:FF:FF:FF:FF for default keys */ > > Please also remove this comment. Ok. > > @@ -3604,10 +3600,12 @@ out_unlock: > > spin_unlock_irqrestore(&wl->irq_lock, flags); > > mutex_unlock(&wl->mutex); > > if (!err) { > > + static const u8 bcast_addr[ETH_ALEN] = > > + { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; > > b43dbg(wl, "%s hardware based encryption for keyidx: %d, " > > "mac: %s\n", > > cmd == SET_KEY ? "Using" : "Disabling", key->keyidx, > > - print_mac(mac, addr)); > > + print_mac(mac, sta ? sta->addr : bcast_addr)); > > Will throw "unused variable bcast_addr" for !DEBUG. > Use something like > sta ? print_mac(mac, sta->addr) : "group/tx-only"); Crap. What you're proposing won't work well either because then this code cannot be converted to %pM... I guess I'll have mark the variable __maybe_unused or #ifdef it. johannes
Attachment:
signature.asc
Description: This is a digitally signed message part