Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352306
b: refs/heads/master
c: 5b2e2ec
h: refs/heads/master
v: v3
  • Loading branch information
Bing Zhao authored and John W. Linville committed Jan 30, 2013
1 parent 9faf3a3 commit a60e661
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3220712d3aa4f5df12b7305ce340f6d216a84477
refs/heads/master: 5b2e2eccab80e2f56d06df582e473fb0d8630f35
10 changes: 4 additions & 6 deletions trunk/drivers/net/wireless/mwifiex/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ mwifiex_write_data_sync(struct mwifiex_adapter *adapter,
u8 *buffer, u32 pkt_len, u32 port)
{
struct sdio_mmc_card *card = adapter->card;
int ret = -1;
int ret;
u8 blk_mode =
(port & MWIFIEX_SDIO_BYTE_MODE_MASK) ? BYTE_MODE : BLOCK_MODE;
u32 blk_size = (blk_mode == BLOCK_MODE) ? MWIFIEX_SDIO_BLOCK_SIZE : 1;
Expand All @@ -350,8 +350,7 @@ mwifiex_write_data_sync(struct mwifiex_adapter *adapter,

sdio_claim_host(card->func);

if (!sdio_writesb(card->func, ioport, buffer, blk_cnt * blk_size))
ret = 0;
ret = sdio_writesb(card->func, ioport, buffer, blk_cnt * blk_size);

sdio_release_host(card->func);

Expand All @@ -365,7 +364,7 @@ static int mwifiex_read_data_sync(struct mwifiex_adapter *adapter, u8 *buffer,
u32 len, u32 port, u8 claim)
{
struct sdio_mmc_card *card = adapter->card;
int ret = -1;
int ret;
u8 blk_mode = (port & MWIFIEX_SDIO_BYTE_MODE_MASK) ? BYTE_MODE
: BLOCK_MODE;
u32 blk_size = (blk_mode == BLOCK_MODE) ? MWIFIEX_SDIO_BLOCK_SIZE : 1;
Expand All @@ -376,8 +375,7 @@ static int mwifiex_read_data_sync(struct mwifiex_adapter *adapter, u8 *buffer,
if (claim)
sdio_claim_host(card->func);

if (!sdio_readsb(card->func, buffer, ioport, blk_cnt * blk_size))
ret = 0;
ret = sdio_readsb(card->func, buffer, ioport, blk_cnt * blk_size);

if (claim)
sdio_release_host(card->func);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/mwifiex/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ static int mwifiex_write_data_sync(struct mwifiex_adapter *adapter, u8 *pbuf,
*len, &actual_length, timeout);
if (ret) {
dev_err(adapter->dev, "usb_bulk_msg for tx failed: %d\n", ret);
ret = -1;
return ret;
}

*len = actual_length;
Expand All @@ -691,7 +691,7 @@ static int mwifiex_read_data_sync(struct mwifiex_adapter *adapter, u8 *pbuf,
*len, &actual_length, timeout);
if (ret) {
dev_err(adapter->dev, "usb_bulk_msg for rx failed: %d\n", ret);
ret = -1;
return ret;
}

*len = actual_length;
Expand Down

0 comments on commit a60e661

Please sign in to comment.