Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351842
b: refs/heads/master
c: c6d1d87
h: refs/heads/master
v: v3
  • Loading branch information
Avinash Patil authored and John W. Linville committed Jan 7, 2013
1 parent 51aeb3b commit 2579475
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 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: 659c4788611f725ede2def6e4db5d8d4a59b93b5
refs/heads/master: c6d1d87a10d1e5317701676c39bbec20e4651b91
6 changes: 6 additions & 0 deletions trunk/drivers/net/wireless/mwifiex/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,12 @@ int mwifiex_init_fw(struct mwifiex_adapter *adapter)
return -1;
}
}

if (adapter->if_ops.init_fw_port) {
if (adapter->if_ops.init_fw_port(adapter))
return -1;
}

for (i = 0; i < adapter->priv_num; i++) {
if (adapter->priv[i]) {
ret = mwifiex_sta_init_cmd(adapter->priv[i], first_sta);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/mwifiex/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,7 @@ struct mwifiex_if_ops {
int (*cmdrsp_complete) (struct mwifiex_adapter *, struct sk_buff *);
int (*event_complete) (struct mwifiex_adapter *, struct sk_buff *);
int (*data_complete) (struct mwifiex_adapter *, struct sk_buff *);
int (*init_fw_port) (struct mwifiex_adapter *);
int (*dnld_fw) (struct mwifiex_adapter *, struct mwifiex_fw_image *);
void (*card_reset) (struct mwifiex_adapter *);
};
Expand Down
20 changes: 18 additions & 2 deletions trunk/drivers/net/wireless/mwifiex/pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -966,8 +966,23 @@ mwifiex_pcie_send_boot_cmd(struct mwifiex_adapter *adapter, struct sk_buff *skb)
return 0;
}

/*
* This function downloads commands to the device
/* This function init rx port in firmware which in turn enables to receive data
* from device before transmitting any packet.
*/
static int mwifiex_pcie_init_fw_port(struct mwifiex_adapter *adapter)
{
struct pcie_service_card *card = adapter->card;

/* Write the RX ring read pointer in to REG_RXBD_RDPTR */
if (mwifiex_write_reg(adapter, REG_RXBD_RDPTR, card->rxbd_rdptr | 0)) {
dev_err(adapter->dev,
"RECV DATA: failed to write REG_RXBD_RDPTR\n");
return -1;
}
return 0;
}

/* This function downloads commands to the device
*/
static int
mwifiex_pcie_send_cmd(struct mwifiex_adapter *adapter, struct sk_buff *skb)
Expand Down Expand Up @@ -1899,6 +1914,7 @@ static struct mwifiex_if_ops pcie_ops = {
.event_complete = mwifiex_pcie_event_complete,
.update_mp_end_port = NULL,
.cleanup_mpa_buf = NULL,
.init_fw_port = mwifiex_pcie_init_fw_port,
};

/*
Expand Down

0 comments on commit 2579475

Please sign in to comment.