diff options
Diffstat (limited to 'drivers/staging/gdm72xx/gdm_sdio.c')
-rw-r--r-- | drivers/staging/gdm72xx/gdm_sdio.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/staging/gdm72xx/gdm_sdio.c b/drivers/staging/gdm72xx/gdm_sdio.c index c246537..7398d45 100644 --- a/drivers/staging/gdm72xx/gdm_sdio.c +++ b/drivers/staging/gdm72xx/gdm_sdio.c @@ -31,11 +31,11 @@ #define MAX_NR_RX_BUF 4 #define SDU_TX_BUF_SIZE 2048 -#define TX_BUF_SIZE 2048 +#define TX_BUF_SIZE 2048 #define TX_CHUNK_SIZE (2048 - TYPE_A_HEADER_SIZE) -#define RX_BUF_SIZE (25*1024) +#define RX_BUF_SIZE (25*1024) -#define TX_HZ 2000 +#define TX_HZ 2000 #define TX_INTERVAL (1000000/TX_HZ) static int init_sdio(struct sdiowm_dev *sdev); @@ -127,10 +127,10 @@ static void put_rx_struct(struct rx_cxt *rx, struct sdio_rx *r) static int init_sdio(struct sdiowm_dev *sdev) { int ret = 0, i; - struct tx_cxt *tx = &sdev->tx; - struct rx_cxt *rx = &sdev->rx; - struct sdio_tx *t; - struct sdio_rx *r; + struct tx_cxt *tx = &sdev->tx; + struct rx_cxt *rx = &sdev->rx; + struct sdio_tx *t; + struct sdio_rx *r; INIT_LIST_HEAD(&tx->free_list); INIT_LIST_HEAD(&tx->sdu_list); @@ -313,7 +313,7 @@ static void send_sdu(struct sdio_func *func, struct tx_cxt *tx) } static void send_hci(struct sdio_func *func, struct tx_cxt *tx, - struct sdio_tx *t) + struct sdio_tx *t) { unsigned long flags; @@ -380,7 +380,7 @@ static void do_tx(struct work_struct *work) } static int gdm_sdio_send(void *priv_dev, void *data, int len, - void (*cb)(void *data), void *cb_data) + void (*cb)(void *data), void *cb_data) { struct sdiowm_dev *sdev = priv_dev; struct tx_cxt *tx = &sdev->tx; @@ -510,6 +510,7 @@ static void gdm_sdio_irq(struct sdio_func *func) if (hdr[3] == 1) { /* Ack */ u32 *ack_seq = (u32 *)&hdr[4]; + spin_lock_irqsave(&tx->lock, flags); tx->can_send = 1; @@ -521,7 +522,7 @@ static void gdm_sdio_irq(struct sdio_func *func) } memcpy(rx->rx_buf, hdr + TYPE_A_HEADER_SIZE, - TYPE_A_LOOKAHEAD_SIZE - TYPE_A_HEADER_SIZE); + TYPE_A_LOOKAHEAD_SIZE - TYPE_A_HEADER_SIZE); buf = rx->rx_buf + TYPE_A_LOOKAHEAD_SIZE - TYPE_A_HEADER_SIZE; remain = len - TYPE_A_LOOKAHEAD_SIZE + TYPE_A_HEADER_SIZE; @@ -577,8 +578,8 @@ done: } static int gdm_sdio_receive(void *priv_dev, - void (*cb)(void *cb_data, void *data, int len), - void *cb_data) + void (*cb)(void *cb_data, void *data, int len), + void *cb_data) { struct sdiowm_dev *sdev = priv_dev; struct rx_cxt *rx = &sdev->rx; @@ -602,7 +603,7 @@ static int gdm_sdio_receive(void *priv_dev, } static int sdio_wimax_probe(struct sdio_func *func, - const struct sdio_device_id *id) + const struct sdio_device_id *id) { int ret; struct phy_dev *phy_dev = NULL; |