The statistic counter is used in common layer and in the bus layer
in different thread contexts so change to use atomic operations.
Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
struct brcmf_pub *drvr;
enum brcmf_bus_state state;
uint maxctl;
- unsigned long tx_realloc;
+ atomic_t tx_realloc;
u32 chip;
u32 chiprev;
bool always_use_fws_queue;
head_pad = ((unsigned long)dat_buf % bus->head_align);
if (head_pad) {
if (skb_headroom(pkt) < head_pad) {
- bus->sdiodev->bus_if->tx_realloc++;
+ atomic_inc(&bus->sdiodev->bus_if->tx_realloc);
head_pad = 0;
if (skb_cow(pkt, head_pad))
return -ENOMEM;