提交 c48ba040 编写于 作者: A Amitkumar Karwar 提交者: John W. Linville

mwifiex: minor cleanup in multiport aggregation

'mp_data_port_mask' and 'mp_end_port' gives correct information
even for the chipsets supporting SDIO new mode (32 ports).
We will get rid of this chip specific handling.
Signed-off-by: NAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: NAvinash Patil <patila@marvell.com>
Signed-off-by: NBing Zhao <bzhao@marvell.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 c7346c32
...@@ -622,22 +622,15 @@ static int mwifiex_get_wr_port_data(struct mwifiex_adapter *adapter, u32 *port) ...@@ -622,22 +622,15 @@ static int mwifiex_get_wr_port_data(struct mwifiex_adapter *adapter, u32 *port)
dev_dbg(adapter->dev, "data: mp_wr_bitmap=0x%08x\n", wr_bitmap); dev_dbg(adapter->dev, "data: mp_wr_bitmap=0x%08x\n", wr_bitmap);
if (card->supports_sdio_new_mode && if (!(wr_bitmap & card->mp_data_port_mask)) {
!(wr_bitmap & reg->data_port_mask)) {
adapter->data_sent = true; adapter->data_sent = true;
return -EBUSY; return -EBUSY;
} else if (!card->supports_sdio_new_mode &&
!(wr_bitmap & card->mp_data_port_mask)) {
return -1;
} }
if (card->mp_wr_bitmap & (1 << card->curr_wr_port)) { if (card->mp_wr_bitmap & (1 << card->curr_wr_port)) {
card->mp_wr_bitmap &= (u32) (~(1 << card->curr_wr_port)); card->mp_wr_bitmap &= (u32) (~(1 << card->curr_wr_port));
*port = card->curr_wr_port; *port = card->curr_wr_port;
if (((card->supports_sdio_new_mode) && if (++card->curr_wr_port == card->mp_end_port)
(++card->curr_wr_port == card->max_ports)) ||
((!card->supports_sdio_new_mode) &&
(++card->curr_wr_port == card->mp_end_port)))
card->curr_wr_port = reg->start_wr_port; card->curr_wr_port = reg->start_wr_port;
} else { } else {
adapter->data_sent = true; adapter->data_sent = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册