Commit a833f3d4 authored by Arend Van Spriel's avatar Arend Van Spriel Committed by Kalle Valo

brcmfmac: use atomic_t for statistic counter in struct brcmf_bus

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: default avatarHante Meuleman <hante.meuleman@broadcom.com>
Reviewed-by: default avatarPieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: default avatarFranky Lin <franky.lin@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent ca2e99b2
......@@ -138,7 +138,7 @@ struct brcmf_bus {
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;
......
......@@ -2046,7 +2046,7 @@ static int brcmf_sdio_txpkt_hdalign(struct brcmf_sdio *bus, struct sk_buff *pkt)
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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment