Commit 7269178c authored by Franky Lin's avatar Franky Lin Committed by Greg Kroah-Hartman

staging: brcm80211: remove empty sdrxqlock from fullmac

Remove empty lock functions for sdio rx queue
Signed-off-by: default avatarFranky Lin <frankyl@broadcom.com>
Reviewed-by: default avatarRoland Vossen <rvossen@broadcom.com>
Reviewed-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 5bf2b52f
...@@ -974,8 +974,6 @@ extern void dhd_os_sdlock(dhd_pub_t *pub); ...@@ -974,8 +974,6 @@ extern void dhd_os_sdlock(dhd_pub_t *pub);
extern void dhd_os_sdunlock(dhd_pub_t *pub); extern void dhd_os_sdunlock(dhd_pub_t *pub);
extern void dhd_os_sdlock_txq(dhd_pub_t *pub); extern void dhd_os_sdlock_txq(dhd_pub_t *pub);
extern void dhd_os_sdunlock_txq(dhd_pub_t *pub); extern void dhd_os_sdunlock_txq(dhd_pub_t *pub);
extern void dhd_os_sdlock_rxq(dhd_pub_t *pub);
extern void dhd_os_sdunlock_rxq(dhd_pub_t *pub);
extern void dhd_os_sdlock_sndup_rxq(dhd_pub_t *pub); extern void dhd_os_sdlock_sndup_rxq(dhd_pub_t *pub);
extern void dhd_customer_gpio_wlan_ctrl(int onoff); extern void dhd_customer_gpio_wlan_ctrl(int onoff);
extern int dhd_custom_get_mac_address(unsigned char *buf); extern int dhd_custom_get_mac_address(unsigned char *buf);
......
...@@ -2595,14 +2595,6 @@ void dhd_os_sdunlock_txq(dhd_pub_t *pub) ...@@ -2595,14 +2595,6 @@ void dhd_os_sdunlock_txq(dhd_pub_t *pub)
spin_unlock_bh(&dhd->txqlock); spin_unlock_bh(&dhd->txqlock);
} }
void dhd_os_sdlock_rxq(dhd_pub_t *pub)
{
}
void dhd_os_sdunlock_rxq(dhd_pub_t *pub)
{
}
static int static int
dhd_wl_host_event(dhd_info_t *dhd, int *ifidx, void *pktdata, dhd_wl_host_event(dhd_info_t *dhd, int *ifidx, void *pktdata,
wl_event_msg_t *event, void **data) wl_event_msg_t *event, void **data)
......
...@@ -796,10 +796,8 @@ static void dhdsdio_chip_detach(struct dhd_bus *bus); ...@@ -796,10 +796,8 @@ static void dhdsdio_chip_detach(struct dhd_bus *bus);
*/ */
static void dhdsdio_pktfree2(dhd_bus_t *bus, struct sk_buff *pkt) static void dhdsdio_pktfree2(dhd_bus_t *bus, struct sk_buff *pkt)
{ {
dhd_os_sdlock_rxq(bus->dhd);
if ((bus->bus != SPI_BUS) || bus->usebufpool) if ((bus->bus != SPI_BUS) || bus->usebufpool)
brcmu_pkt_buf_free_skb(pkt); brcmu_pkt_buf_free_skb(pkt);
dhd_os_sdunlock_rxq(bus->dhd);
} }
static void dhd_dongle_setmemsize(struct dhd_bus *bus, int mem_size) static void dhd_dongle_setmemsize(struct dhd_bus *bus, int mem_size)
...@@ -3379,8 +3377,6 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq) ...@@ -3379,8 +3377,6 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq)
/* If there's a descriptor, generate the packet chain */ /* If there's a descriptor, generate the packet chain */
if (bus->glomd) { if (bus->glomd) {
dhd_os_sdlock_rxq(bus->dhd);
pfirst = plast = pnext = NULL; pfirst = plast = pnext = NULL;
dlen = (u16) (bus->glomd->len); dlen = (u16) (bus->glomd->len);
dptr = bus->glomd->data; dptr = bus->glomd->data;
...@@ -3464,8 +3460,6 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq) ...@@ -3464,8 +3460,6 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq)
brcmu_pkt_buf_free_skb(bus->glomd); brcmu_pkt_buf_free_skb(bus->glomd);
bus->glomd = NULL; bus->glomd = NULL;
bus->nextlen = 0; bus->nextlen = 0;
dhd_os_sdunlock_rxq(bus->dhd);
} }
/* Ok -- either we just generated a packet chain, /* Ok -- either we just generated a packet chain,
...@@ -3525,9 +3519,7 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq) ...@@ -3525,9 +3519,7 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq)
} else { } else {
bus->glomerr = 0; bus->glomerr = 0;
dhdsdio_rxfail(bus, true, false); dhdsdio_rxfail(bus, true, false);
dhd_os_sdlock_rxq(bus->dhd);
brcmu_pkt_buf_free_skb(bus->glom); brcmu_pkt_buf_free_skb(bus->glom);
dhd_os_sdunlock_rxq(bus->dhd);
bus->rxglomfail++; bus->rxglomfail++;
bus->glom = NULL; bus->glom = NULL;
} }
...@@ -3658,9 +3650,7 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq) ...@@ -3658,9 +3650,7 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq)
} else { } else {
bus->glomerr = 0; bus->glomerr = 0;
dhdsdio_rxfail(bus, true, false); dhdsdio_rxfail(bus, true, false);
dhd_os_sdlock_rxq(bus->dhd);
brcmu_pkt_buf_free_skb(bus->glom); brcmu_pkt_buf_free_skb(bus->glom);
dhd_os_sdunlock_rxq(bus->dhd);
bus->rxglomfail++; bus->rxglomfail++;
bus->glom = NULL; bus->glom = NULL;
} }
...@@ -3673,7 +3663,6 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq) ...@@ -3673,7 +3663,6 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq)
bus->glom = NULL; bus->glom = NULL;
plast = NULL; plast = NULL;
dhd_os_sdlock_rxq(bus->dhd);
for (num = 0; pfirst; rxseq++, pfirst = pnext) { for (num = 0; pfirst; rxseq++, pfirst = pnext) {
pnext = pfirst->next; pnext = pfirst->next;
pfirst->next = NULL; pfirst->next = NULL;
...@@ -3752,7 +3741,6 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq) ...@@ -3752,7 +3741,6 @@ static u8 dhdsdio_rxglom(dhd_bus_t *bus, u8 rxseq)
} }
#endif /* DHD_DEBUG */ #endif /* DHD_DEBUG */
} }
dhd_os_sdunlock_rxq(bus->dhd);
if (num) { if (num) {
dhd_os_sdunlock(bus->dhd); dhd_os_sdunlock(bus->dhd);
dhd_rx_frame(bus->dhd, ifidx, save_pfirst, num); dhd_rx_frame(bus->dhd, ifidx, save_pfirst, num);
...@@ -3860,7 +3848,6 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished) ...@@ -3860,7 +3848,6 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
* or non-data frame. * or non-data frame.
*/ */
/* Allocate a packet buffer */ /* Allocate a packet buffer */
dhd_os_sdlock_rxq(bus->dhd);
pkt = brcmu_pkt_buf_get_skb(rdlen + DHD_SDALIGN); pkt = brcmu_pkt_buf_get_skb(rdlen + DHD_SDALIGN);
if (!pkt) { if (!pkt) {
if (bus->bus == SPI_BUS) { if (bus->bus == SPI_BUS) {
...@@ -3894,7 +3881,6 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished) ...@@ -3894,7 +3881,6 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
rdlen, sdret)); rdlen, sdret));
/* dhd.rx_ctlerrs is higher */ /* dhd.rx_ctlerrs is higher */
bus->rxc_errors++; bus->rxc_errors++;
dhd_os_sdunlock_rxq(bus->dhd);
dhdsdio_rxfail(bus, true, dhdsdio_rxfail(bus, true,
(bus->bus == (bus->bus ==
SPI_BUS) ? false SPI_BUS) ? false
...@@ -3910,9 +3896,6 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished) ...@@ -3910,9 +3896,6 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
" len %d rdlen %d expected" " len %d rdlen %d expected"
" rxseq %d\n", __func__, " rxseq %d\n", __func__,
len, rdlen, rxseq)); len, rdlen, rxseq));
/* Just go try again w/normal
header read */
dhd_os_sdunlock_rxq(bus->dhd);
continue; continue;
} }
} else { } else {
...@@ -3936,7 +3919,6 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished) ...@@ -3936,7 +3919,6 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
__func__, rdlen, sdret)); __func__, rdlen, sdret));
brcmu_pkt_buf_free_skb(pkt); brcmu_pkt_buf_free_skb(pkt);
bus->dhd->rx_errors++; bus->dhd->rx_errors++;
dhd_os_sdunlock_rxq(bus->dhd);
/* Force retry w/normal header read. /* Force retry w/normal header read.
* Don't attempt NAK for * Don't attempt NAK for
* gSPI * gSPI
...@@ -3948,7 +3930,6 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished) ...@@ -3948,7 +3930,6 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
continue; continue;
} }
} }
dhd_os_sdunlock_rxq(bus->dhd);
/* Now check the header */ /* Now check the header */
memcpy(bus->rxhdr, rxbuf, SDPCM_HDRLEN); memcpy(bus->rxhdr, rxbuf, SDPCM_HDRLEN);
...@@ -4246,18 +4227,15 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished) ...@@ -4246,18 +4227,15 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
continue; continue;
} }
dhd_os_sdlock_rxq(bus->dhd);
pkt = brcmu_pkt_buf_get_skb(rdlen + firstread + DHD_SDALIGN); pkt = brcmu_pkt_buf_get_skb(rdlen + firstread + DHD_SDALIGN);
if (!pkt) { if (!pkt) {
/* Give up on data, request rtx of events */ /* Give up on data, request rtx of events */
DHD_ERROR(("%s: brcmu_pkt_buf_get_skb failed: rdlen %d" DHD_ERROR(("%s: brcmu_pkt_buf_get_skb failed: rdlen %d"
" chan %d\n", __func__, rdlen, chan)); " chan %d\n", __func__, rdlen, chan));
bus->dhd->rx_dropped++; bus->dhd->rx_dropped++;
dhd_os_sdunlock_rxq(bus->dhd);
dhdsdio_rxfail(bus, false, RETRYCHAN(chan)); dhdsdio_rxfail(bus, false, RETRYCHAN(chan));
continue; continue;
} }
dhd_os_sdunlock_rxq(bus->dhd);
ASSERT(!(pkt->prev)); ASSERT(!(pkt->prev));
...@@ -4281,9 +4259,7 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished) ...@@ -4281,9 +4259,7 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
SDPCM_DATA_CHANNEL) SDPCM_DATA_CHANNEL)
? "data" : "test")), ? "data" : "test")),
sdret)); sdret));
dhd_os_sdlock_rxq(bus->dhd);
brcmu_pkt_buf_free_skb(pkt); brcmu_pkt_buf_free_skb(pkt);
dhd_os_sdunlock_rxq(bus->dhd);
bus->dhd->rx_errors++; bus->dhd->rx_errors++;
dhdsdio_rxfail(bus, true, RETRYCHAN(chan)); dhdsdio_rxfail(bus, true, RETRYCHAN(chan));
continue; continue;
...@@ -4340,15 +4316,11 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished) ...@@ -4340,15 +4316,11 @@ static uint dhdsdio_readframes(dhd_bus_t *bus, uint maxframes, bool *finished)
#endif /* SDTEST */ #endif /* SDTEST */
if (pkt->len == 0) { if (pkt->len == 0) {
dhd_os_sdlock_rxq(bus->dhd);
brcmu_pkt_buf_free_skb(pkt); brcmu_pkt_buf_free_skb(pkt);
dhd_os_sdunlock_rxq(bus->dhd);
continue; continue;
} else if (dhd_prot_hdrpull(bus->dhd, &ifidx, pkt) != 0) { } else if (dhd_prot_hdrpull(bus->dhd, &ifidx, pkt) != 0) {
DHD_ERROR(("%s: rx protocol error\n", __func__)); DHD_ERROR(("%s: rx protocol error\n", __func__));
dhd_os_sdlock_rxq(bus->dhd);
brcmu_pkt_buf_free_skb(pkt); brcmu_pkt_buf_free_skb(pkt);
dhd_os_sdunlock_rxq(bus->dhd);
bus->dhd->rx_errors++; bus->dhd->rx_errors++;
continue; continue;
} }
......
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