Skip to content

Commit

Permalink
brcmsmac: Use correct descriptor count when calculating next rx descr…
Browse files Browse the repository at this point in the history
…iptor

nextrxd() is calling txd(), which means that the tx descriptor count is
used to determine when to wrap for determining the next ring buffer
entry. This has worked so far since the driver has been using the same
number of rx and tx descriptors, but it's obviously going to be a
problem if different numbers of descriptors are used.

Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Tested-by: Daniel Wagner <wagi@monom.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Seth Forshee authored and John W. Linville committed Nov 20, 2012
1 parent e041f65 commit b05618d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/brcm80211/brcmsmac/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ static uint prevtxd(struct dma_info *di, uint i)

static uint nextrxd(struct dma_info *di, uint i)
{
return txd(di, i + 1);
return rxd(di, i + 1);
}

static uint ntxdactive(struct dma_info *di, uint h, uint t)
Expand Down

0 comments on commit b05618d

Please sign in to comment.