Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 246894
b: refs/heads/master
c: 572e8f3
h: refs/heads/master
v: v3
  • Loading branch information
Amitkumar Karwar authored and John W. Linville committed Apr 14, 2011
1 parent eeb0640 commit 39f9ca6
Show file tree
Hide file tree
Showing 15 changed files with 81 additions and 137 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: 19a898601ad192d8c59c3a8f1a4501919f53b94d
refs/heads/master: 572e8f3ead47ad223fb428a4f1db986317e8e0ec
13 changes: 4 additions & 9 deletions trunk/drivers/net/wireless/mwifiex/11n.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,7 @@ int mwifiex_ret_11n_addba_req(struct mwifiex_private *priv,
*
* Handling includes changing the header fields into CPU format.
*/
int mwifiex_ret_11n_cfg(struct mwifiex_private *priv,
struct host_cmd_ds_command *resp,
void *data_buf)
int mwifiex_ret_11n_cfg(struct host_cmd_ds_command *resp, void *data_buf)
{
struct mwifiex_ds_11n_tx_cfg *tx_cfg = NULL;
struct host_cmd_ds_11n_cfg *htcfg = &resp->params.htcfg;
Expand Down Expand Up @@ -298,8 +296,7 @@ int mwifiex_cmd_recfg_tx_buf(struct mwifiex_private *priv,
* - Setting AMSDU control parameters (for SET only)
* - Ensuring correct endian-ness
*/
int mwifiex_cmd_amsdu_aggr_ctrl(struct mwifiex_private *priv,
struct host_cmd_ds_command *cmd,
int mwifiex_cmd_amsdu_aggr_ctrl(struct host_cmd_ds_command *cmd,
int cmd_action, void *data_buf)
{
struct host_cmd_ds_amsdu_aggr_ctrl *amsdu_ctrl =
Expand Down Expand Up @@ -331,8 +328,7 @@ int mwifiex_cmd_amsdu_aggr_ctrl(struct mwifiex_private *priv,
*
* Handling includes changing the header fields into CPU format.
*/
int mwifiex_ret_amsdu_aggr_ctrl(struct mwifiex_private *priv,
struct host_cmd_ds_command *resp,
int mwifiex_ret_amsdu_aggr_ctrl(struct host_cmd_ds_command *resp,
void *data_buf)
{
struct mwifiex_ds_11n_amsdu_aggr_ctrl *amsdu_aggr_ctrl = NULL;
Expand All @@ -357,8 +353,7 @@ int mwifiex_ret_amsdu_aggr_ctrl(struct mwifiex_private *priv,
* - Setting HT Tx capability and HT Tx information fields
* - Ensuring correct endian-ness
*/
int mwifiex_cmd_11n_cfg(struct mwifiex_private *priv,
struct host_cmd_ds_command *cmd,
int mwifiex_cmd_11n_cfg(struct host_cmd_ds_command *cmd,
u16 cmd_action, void *data_buf)
{
struct host_cmd_ds_11n_cfg *htcfg = &cmd->params.htcfg;
Expand Down
50 changes: 17 additions & 33 deletions trunk/drivers/net/wireless/mwifiex/11n.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,9 @@ int mwifiex_ret_11n_delba(struct mwifiex_private *priv,
struct host_cmd_ds_command *resp);
int mwifiex_ret_11n_addba_req(struct mwifiex_private *priv,
struct host_cmd_ds_command *resp);
int mwifiex_ret_11n_cfg(struct mwifiex_private *priv,
struct host_cmd_ds_command *resp,
int mwifiex_ret_11n_cfg(struct host_cmd_ds_command *resp,
void *data_buf);
int mwifiex_cmd_11n_cfg(struct mwifiex_private *priv,
struct host_cmd_ds_command *cmd,
u16 cmd_action, void *data_buf);

int mwifiex_cmd_11n_cfg(struct mwifiex_private *priv,
struct host_cmd_ds_command *cmd,
int mwifiex_cmd_11n_cfg(struct host_cmd_ds_command *cmd,
u16 cmd_action, void *data_buf);

int mwifiex_cmd_append_11n_tlv(struct mwifiex_private *priv,
Expand Down Expand Up @@ -67,24 +61,19 @@ int mwifiex_get_rx_reorder_tbl(struct mwifiex_private *priv,
struct mwifiex_ds_rx_reorder_tbl *buf);
int mwifiex_get_tx_ba_stream_tbl(struct mwifiex_private *priv,
struct mwifiex_ds_tx_ba_stream_tbl *buf);
int mwifiex_ret_amsdu_aggr_ctrl(struct mwifiex_private *priv,
struct host_cmd_ds_command
*resp,
int mwifiex_ret_amsdu_aggr_ctrl(struct host_cmd_ds_command *resp,
void *data_buf);
int mwifiex_cmd_recfg_tx_buf(struct mwifiex_private *priv,
struct host_cmd_ds_command *cmd,
int cmd_action, void *data_buf);
int mwifiex_cmd_amsdu_aggr_ctrl(struct mwifiex_private *priv,
struct host_cmd_ds_command *cmd,
int cmd_action,
void *data_buf);
int mwifiex_cmd_amsdu_aggr_ctrl(struct host_cmd_ds_command *cmd,
int cmd_action, void *data_buf);

/*
* This function checks whether AMPDU is allowed or not for a particular TID.
*/
static inline u8
mwifiex_is_ampdu_allowed(struct mwifiex_private *priv,
struct mwifiex_ra_list_tbl *ptr, int tid)
mwifiex_is_ampdu_allowed(struct mwifiex_private *priv, int tid)
{
return ((priv->aggr_prio_tbl[tid].ampdu_ap != BA_STREAM_NOT_ALLOWED)
? true : false);
Expand All @@ -94,8 +83,7 @@ mwifiex_is_ampdu_allowed(struct mwifiex_private *priv,
* This function checks whether AMSDU is allowed or not for a particular TID.
*/
static inline u8
mwifiex_is_amsdu_allowed(struct mwifiex_private *priv,
struct mwifiex_ra_list_tbl *ptr, int tid)
mwifiex_is_amsdu_allowed(struct mwifiex_private *priv, int tid)
{
return (((priv->aggr_prio_tbl[tid].amsdu != BA_STREAM_NOT_ALLOWED)
&& ((priv->is_data_rate_auto)
Expand All @@ -106,21 +94,18 @@ mwifiex_is_amsdu_allowed(struct mwifiex_private *priv,
/*
* This function checks whether a BA stream is available or not.
*/
static inline u8
mwifiex_is_ba_stream_avail(struct mwifiex_private *priv)
static inline u8 mwifiex_is_ba_stream_avail(struct mwifiex_adapter *adapter)
{
struct mwifiex_private *pmpriv = NULL;
u8 i = 0;
struct mwifiex_private *priv;
u8 i;
u32 ba_stream_num = 0;

for (i = 0; i < priv->adapter->priv_num; i++) {
pmpriv = priv->adapter->priv[i];
if (pmpriv)
ba_stream_num +=
mwifiex_wmm_list_len(priv->adapter,
(struct list_head
*) &pmpriv->
tx_ba_stream_tbl_ptr);
for (i = 0; i < adapter->priv_num; i++) {
priv = adapter->priv[i];
if (priv)
ba_stream_num += mwifiex_wmm_list_len(
(struct list_head *)
&priv->tx_ba_stream_tbl_ptr);
}

return ((ba_stream_num <
Expand All @@ -133,8 +118,7 @@ mwifiex_is_ba_stream_avail(struct mwifiex_private *priv)
* Upon successfully locating, both the TID and the RA are returned.
*/
static inline u8
mwifiex_find_stream_to_delete(struct mwifiex_private *priv,
struct mwifiex_ra_list_tbl *ptr, int ptr_tid,
mwifiex_find_stream_to_delete(struct mwifiex_private *priv, int ptr_tid,
int *ptid, u8 *ra)
{
int tid;
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/net/wireless/mwifiex/11n_aggr.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@
* MSDU => |DA|SA|Length|SNAP|...... ..|
*/
static int
mwifiex_11n_form_amsdu_pkt(struct mwifiex_adapter *adapter,
struct sk_buff *skb_aggr,
mwifiex_11n_form_amsdu_pkt(struct sk_buff *skb_aggr,
struct sk_buff *skb_src, int *pad)

{
Expand Down Expand Up @@ -324,7 +323,7 @@ mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv,

spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock,
ra_list_flags);
mwifiex_11n_form_amsdu_pkt(adapter, skb_aggr, skb_src, &pad);
mwifiex_11n_form_amsdu_pkt(skb_aggr, skb_src, &pad);

mwifiex_write_data_complete(adapter, skb_src, 0);

Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/net/wireless/mwifiex/11n_rxreorder.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,7 @@ mwifiex_11n_create_rx_reorder_tbl(struct mwifiex_private *priv, u8 *ta,
* - Setting add BA request buffer
* - Ensuring correct endian-ness
*/
int mwifiex_cmd_11n_addba_req(struct mwifiex_private *priv,
struct host_cmd_ds_command *cmd, void *data_buf)
int mwifiex_cmd_11n_addba_req(struct host_cmd_ds_command *cmd, void *data_buf)
{
struct host_cmd_ds_11n_addba_req *add_ba_req =
(struct host_cmd_ds_11n_addba_req *)
Expand Down Expand Up @@ -391,8 +390,7 @@ int mwifiex_cmd_11n_addba_rsp_gen(struct mwifiex_private *priv,
* - Setting del BA request buffer
* - Ensuring correct endian-ness
*/
int mwifiex_cmd_11n_delba(struct mwifiex_private *priv,
struct host_cmd_ds_command *cmd, void *data_buf)
int mwifiex_cmd_11n_delba(struct host_cmd_ds_command *cmd, void *data_buf)
{
struct host_cmd_ds_11n_delba *del_ba = (struct host_cmd_ds_11n_delba *)
&cmd->params.del_ba;
Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/net/wireless/mwifiex/11n_rxreorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,12 @@ void mwifiex_11n_ba_stream_timeout(struct mwifiex_private *priv,
int mwifiex_ret_11n_addba_resp(struct mwifiex_private *priv,
struct host_cmd_ds_command
*resp);
int mwifiex_cmd_11n_delba(struct mwifiex_private *priv,
struct host_cmd_ds_command *cmd,
int mwifiex_cmd_11n_delba(struct host_cmd_ds_command *cmd,
void *data_buf);
int mwifiex_cmd_11n_addba_rsp_gen(struct mwifiex_private *priv,
struct host_cmd_ds_command
*cmd, void *data_buf);
int mwifiex_cmd_11n_addba_req(struct mwifiex_private *priv,
struct host_cmd_ds_command *cmd,
int mwifiex_cmd_11n_addba_req(struct host_cmd_ds_command *cmd,
void *data_buf);
void mwifiex_11n_cleanup_reorder_tbl(struct mwifiex_private *priv);
struct mwifiex_rx_reorder_tbl *mwifiex_11n_get_rxreorder_tbl(struct
Expand Down
9 changes: 3 additions & 6 deletions trunk/drivers/net/wireless/mwifiex/cfp.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ u8 supported_rates_n[N_SUPPORTED_RATES] = { 0x02, 0x04, 0 };
* This function maps an index in supported rates table into
* the corresponding data rate.
*/
u32 mwifiex_index_to_data_rate(struct mwifiex_adapter *adapter, u8 index,
u8 ht_info)
u32 mwifiex_index_to_data_rate(u8 index, u8 ht_info)
{
u16 mcs_rate[4][8] = {
{0x1b, 0x36, 0x51, 0x6c, 0xa2, 0xd8, 0xf3, 0x10e}
Expand Down Expand Up @@ -126,7 +125,7 @@ u32 mwifiex_index_to_data_rate(struct mwifiex_adapter *adapter, u8 index,
* This function maps a data rate value into corresponding index in supported
* rates table.
*/
u8 mwifiex_data_rate_to_index(struct mwifiex_adapter *adapter, u32 rate)
u8 mwifiex_data_rate_to_index(u32 rate)
{
u16 *ptr;

Expand Down Expand Up @@ -265,9 +264,7 @@ mwifiex_is_rate_auto(struct mwifiex_private *priv)
/*
* This function converts rate bitmap into rate index.
*/
int
mwifiex_get_rate_index(struct mwifiex_adapter *adapter, u16 *rate_bitmap,
int size)
int mwifiex_get_rate_index(u16 *rate_bitmap, int size)
{
int i;

Expand Down
17 changes: 5 additions & 12 deletions trunk/drivers/net/wireless/mwifiex/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -767,8 +767,7 @@ void *mwifiex_process_sta_txpd(struct mwifiex_private *, struct sk_buff *skb);
int mwifiex_sta_init_cmd(struct mwifiex_private *, u8 first_sta);
int mwifiex_scan_networks(struct mwifiex_private *priv,
const struct mwifiex_user_scan_cfg *user_scan_in);
int mwifiex_cmd_802_11_scan(struct mwifiex_private *priv,
struct host_cmd_ds_command *cmd,
int mwifiex_cmd_802_11_scan(struct host_cmd_ds_command *cmd,
void *data_buf);
void mwifiex_queue_scan_cmd(struct mwifiex_private *priv,
struct cmd_ctrl_node *cmd_node);
Expand Down Expand Up @@ -806,30 +805,24 @@ int mwifiex_cmd_802_11_ad_hoc_join(struct mwifiex_private *priv,
void *data_buf);
int mwifiex_ret_802_11_ad_hoc(struct mwifiex_private *priv,
struct host_cmd_ds_command *resp);
int mwifiex_cmd_802_11_bg_scan_query(struct mwifiex_private *priv,
struct host_cmd_ds_command *cmd,
void *data_buf);
int mwifiex_cmd_802_11_bg_scan_query(struct host_cmd_ds_command *cmd);
struct mwifiex_chan_freq_power *
mwifiex_get_cfp_by_band_and_channel_from_cfg80211(
struct mwifiex_private *priv,
u8 band, u16 channel);
struct mwifiex_chan_freq_power *mwifiex_get_cfp_by_band_and_freq_from_cfg80211(
struct mwifiex_private *priv,
u8 band, u32 freq);
u32 mwifiex_index_to_data_rate(struct mwifiex_adapter *adapter, u8 index,
u8 ht_info);
u32 mwifiex_index_to_data_rate(u8 index, u8 ht_info);
u32 mwifiex_find_freq_from_band_chan(u8, u8);
int mwifiex_cmd_append_vsie_tlv(struct mwifiex_private *priv, u16 vsie_mask,
u8 **buffer);
u32 mwifiex_index_to_data_rate(struct mwifiex_adapter *adapter, u8 index,
u8 ht_info);
u32 mwifiex_get_active_data_rates(struct mwifiex_private *priv,
u8 *rates);
u32 mwifiex_get_supported_rates(struct mwifiex_private *priv, u8 *rates);
u8 mwifiex_data_rate_to_index(struct mwifiex_adapter *adapter, u32 rate);
u8 mwifiex_data_rate_to_index(u32 rate);
u8 mwifiex_is_rate_auto(struct mwifiex_private *priv);
int mwifiex_get_rate_index(struct mwifiex_adapter *adapter,
u16 *rateBitmap, int size);
int mwifiex_get_rate_index(u16 *rateBitmap, int size);
extern u16 region_code_index[MWIFIEX_MAX_REGION_CODE];
void mwifiex_save_curr_bcn(struct mwifiex_private *priv);
void mwifiex_free_curr_bcn(struct mwifiex_private *priv);
Expand Down
7 changes: 2 additions & 5 deletions trunk/drivers/net/wireless/mwifiex/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2364,8 +2364,7 @@ int mwifiex_scan_networks(struct mwifiex_private *priv,
* - Setting command ID, and proper size
* - Ensuring correct endian-ness
*/
int mwifiex_cmd_802_11_scan(struct mwifiex_private *priv,
struct host_cmd_ds_command *cmd, void *data_buf)
int mwifiex_cmd_802_11_scan(struct host_cmd_ds_command *cmd, void *data_buf)
{
struct host_cmd_ds_802_11_scan *scan_cmd = &cmd->params.scan;
struct mwifiex_scan_cmd_config *scan_cfg;
Expand Down Expand Up @@ -2658,9 +2657,7 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv,
* - Setting background scan flush parameter
* - Ensuring correct endian-ness
*/
int mwifiex_cmd_802_11_bg_scan_query(struct mwifiex_private *priv,
struct host_cmd_ds_command *cmd,
void *data_buf)
int mwifiex_cmd_802_11_bg_scan_query(struct host_cmd_ds_command *cmd)
{
struct host_cmd_ds_802_11_bg_scan_query *bg_query =
&cmd->params.bg_scan_query;
Expand Down
18 changes: 8 additions & 10 deletions trunk/drivers/net/wireless/mwifiex/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ mwifiex_read_reg(struct mwifiex_adapter *adapter, u32 reg, u32 *data)
*/
static int
mwifiex_write_data_sync(struct mwifiex_adapter *adapter,
u8 *buffer, u32 pkt_len, u32 port, u32 timeout)
u8 *buffer, u32 pkt_len, u32 port)
{
struct sdio_mmc_card *card = adapter->card;
int ret = -1;
Expand Down Expand Up @@ -314,9 +314,8 @@ mwifiex_write_data_sync(struct mwifiex_adapter *adapter,
/*
* This function reads multiple data from SDIO card memory.
*/
static int mwifiex_read_data_sync(struct mwifiex_adapter *adapter,
u8 *buffer, u32 len,
u32 port, u32 timeout, u8 claim)
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;
Expand Down Expand Up @@ -430,8 +429,7 @@ static int mwifiex_write_data_to_card(struct mwifiex_adapter *adapter,
int ret = 0;

do {
ret = mwifiex_write_data_sync(adapter, payload, pkt_len,
port, 0);
ret = mwifiex_write_data_sync(adapter, payload, pkt_len, port);
if (ret) {
i++;
dev_err(adapter->dev, "host_to_card, write iomem"
Expand Down Expand Up @@ -630,7 +628,7 @@ static int mwifiex_sdio_card_to_host(struct mwifiex_adapter *adapter,
return -1;
}

ret = mwifiex_read_data_sync(adapter, buffer, npayload, ioport, 0, 1);
ret = mwifiex_read_data_sync(adapter, buffer, npayload, ioport, 1);

if (ret) {
dev_err(adapter->dev, "%s: read iomem failed: %d\n", __func__,
Expand Down Expand Up @@ -769,7 +767,7 @@ static int mwifiex_prog_fw_w_helper(struct mwifiex_adapter *adapter,

ret = mwifiex_write_data_sync(adapter, fwbuf, tx_blocks *
MWIFIEX_SDIO_BLOCK_SIZE,
adapter->ioport, 0);
adapter->ioport);
if (ret) {
dev_err(adapter->dev, "FW download, write iomem (%d)"
" failed @ %d\n", i, offset);
Expand Down Expand Up @@ -842,7 +840,7 @@ static void mwifiex_interrupt_status(struct mwifiex_adapter *adapter)
unsigned long flags;

if (mwifiex_read_data_sync(adapter, card->mp_regs, MAX_MP_REGS,
REG_PORT | MWIFIEX_SDIO_BYTE_MODE_MASK, 0,
REG_PORT | MWIFIEX_SDIO_BYTE_MODE_MASK,
0)) {
dev_err(adapter->dev, "read mp_regs failed\n");
return;
Expand Down Expand Up @@ -1050,7 +1048,7 @@ static int mwifiex_sdio_card_to_host_mp_aggr(struct mwifiex_adapter *adapter,
card->mpa_rx.buf_len,
(adapter->ioport | 0x1000 |
(card->mpa_rx.ports << 4)) +
card->mpa_rx.start_port, 0, 1))
card->mpa_rx.start_port, 1))
return -1;

curr_ptr = card->mpa_rx.buf;
Expand Down
Loading

0 comments on commit 39f9ca6

Please sign in to comment.