Commit 63af6333 authored by Yogesh Ashok Powar's avatar Yogesh Ashok Powar Committed by John W. Linville

mwifiex: fix coding style

Rename DataRate to data_rate and arrange 'for' loop
for better readability.
Signed-off-by: default avatarYogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent ab581472
...@@ -673,7 +673,7 @@ struct host_cmd_ds_802_11_ad_hoc_start { ...@@ -673,7 +673,7 @@ struct host_cmd_ds_802_11_ad_hoc_start {
union ieee_types_phy_param_set phy_param_set; union ieee_types_phy_param_set phy_param_set;
u16 reserved1; u16 reserved1;
__le16 cap_info_bitmap; __le16 cap_info_bitmap;
u8 DataRate[HOSTCMD_SUPPORTED_RATES]; u8 data_rate[HOSTCMD_SUPPORTED_RATES];
} __packed; } __packed;
struct host_cmd_ds_802_11_ad_hoc_result { struct host_cmd_ds_802_11_ad_hoc_result {
......
...@@ -837,8 +837,8 @@ mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv, ...@@ -837,8 +837,8 @@ mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv,
bss_desc->privacy = MWIFIEX_802_11_PRIV_FILTER_ACCEPT_ALL; bss_desc->privacy = MWIFIEX_802_11_PRIV_FILTER_ACCEPT_ALL;
} }
memset(adhoc_start->DataRate, 0, sizeof(adhoc_start->DataRate)); memset(adhoc_start->data_rate, 0, sizeof(adhoc_start->data_rate));
mwifiex_get_active_data_rates(priv, adhoc_start->DataRate); mwifiex_get_active_data_rates(priv, adhoc_start->data_rate);
if ((adapter->adhoc_start_band & BAND_G) && if ((adapter->adhoc_start_band & BAND_G) &&
(priv->curr_pkt_filter & HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON)) { (priv->curr_pkt_filter & HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON)) {
if (mwifiex_send_cmd_async(priv, HostCmd_CMD_MAC_CONTROL, if (mwifiex_send_cmd_async(priv, HostCmd_CMD_MAC_CONTROL,
...@@ -850,20 +850,19 @@ mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv, ...@@ -850,20 +850,19 @@ mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv,
} }
} }
/* Find the last non zero */ /* Find the last non zero */
for (i = 0; i < sizeof(adhoc_start->DataRate) && for (i = 0; i < sizeof(adhoc_start->data_rate); i++)
adhoc_start->DataRate[i]; if (!adhoc_start->data_rate[i])
i++) break;
;
priv->curr_bss_params.num_of_rates = i; priv->curr_bss_params.num_of_rates = i;
/* Copy the ad-hoc creating rates into Current BSS rate structure */ /* Copy the ad-hoc creating rates into Current BSS rate structure */
memcpy(&priv->curr_bss_params.data_rates, memcpy(&priv->curr_bss_params.data_rates,
&adhoc_start->DataRate, priv->curr_bss_params.num_of_rates); &adhoc_start->data_rate, priv->curr_bss_params.num_of_rates);
dev_dbg(adapter->dev, "info: ADHOC_S_CMD: rates=%02x %02x %02x %02x\n", dev_dbg(adapter->dev, "info: ADHOC_S_CMD: rates=%02x %02x %02x %02x\n",
adhoc_start->DataRate[0], adhoc_start->DataRate[1], adhoc_start->data_rate[0], adhoc_start->data_rate[1],
adhoc_start->DataRate[2], adhoc_start->DataRate[3]); adhoc_start->data_rate[2], adhoc_start->data_rate[3]);
dev_dbg(adapter->dev, "info: ADHOC_S_CMD: AD-HOC Start command is ready\n"); dev_dbg(adapter->dev, "info: ADHOC_S_CMD: AD-HOC Start command is ready\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment