On Tue, 2010-10-12 at 14:49 +0200, Ido Yariv wrote: > + id = find_first_zero_bit(wl->tx_frames_map, ACX_TX_DESCRIPTORS); > + if (id >= ACX_TX_DESCRIPTORS) > + return -EBUSY; > + > + set_bit(id, wl->tx_frames_map); > + wl->tx_frames[id] = skb; > + wl->tx_frames_cnt++; This is all under some lock, right? (If that isn't the case, it's racy) Therefore, you need not use atomic bitops which will be fairly expensive... Have you actually measured this? It seems that it con't have a huge effect, and the atomic bitops you use now might even negate it. > + if (test_and_clear_bit(id, wl->tx_frames_map)) { There too. johannes -- 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