Commit a9f47a45 authored by Rithvik Patibandla's avatar Rithvik Patibandla Committed by Greg Kroah-Hartman

staging:vt6656:card.c:fix alignment checks

Fix "Alignment should match with open paranthesis" check thrown by
checkpatch.pl
Signed-off-by: default avatarRithvik Patibandla <rithvikp98@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b01a5d71
...@@ -77,10 +77,10 @@ void vnt_set_channel(struct vnt_private *priv, u32 connection_channel) ...@@ -77,10 +77,10 @@ void vnt_set_channel(struct vnt_private *priv, u32 connection_channel)
vnt_mac_reg_bits_off(priv, MAC_REG_CHANNEL, 0xb0); vnt_mac_reg_bits_off(priv, MAC_REG_CHANNEL, 0xb0);
vnt_control_out(priv, MESSAGE_TYPE_SELECT_CHANNEL, vnt_control_out(priv, MESSAGE_TYPE_SELECT_CHANNEL,
connection_channel, 0, 0, NULL); connection_channel, 0, 0, NULL);
vnt_control_out_u8(priv, MESSAGE_REQUEST_MACREG, MAC_REG_CHANNEL, vnt_control_out_u8(priv, MESSAGE_REQUEST_MACREG, MAC_REG_CHANNEL,
(u8)(connection_channel | 0x80)); (u8)(connection_channel | 0x80));
} }
/* /*
...@@ -127,11 +127,11 @@ static u16 vnt_get_ofdm_rate(struct vnt_private *priv, u16 rate_idx) ...@@ -127,11 +127,11 @@ static u16 vnt_get_ofdm_rate(struct vnt_private *priv, u16 rate_idx)
u16 ui = rate_idx; u16 ui = rate_idx;
dev_dbg(&priv->usb->dev, "%s basic rate: %d\n", dev_dbg(&priv->usb->dev, "%s basic rate: %d\n",
__func__, priv->basic_rates); __func__, priv->basic_rates);
if (!vnt_ofdm_min_rate(priv)) { if (!vnt_ofdm_min_rate(priv)) {
dev_dbg(&priv->usb->dev, "%s (NO OFDM) %d\n", dev_dbg(&priv->usb->dev, "%s (NO OFDM) %d\n",
__func__, rate_idx); __func__, rate_idx);
if (rate_idx > RATE_24M) if (rate_idx > RATE_24M)
rate_idx = RATE_24M; rate_idx = RATE_24M;
return rate_idx; return rate_idx;
...@@ -140,7 +140,7 @@ static u16 vnt_get_ofdm_rate(struct vnt_private *priv, u16 rate_idx) ...@@ -140,7 +140,7 @@ static u16 vnt_get_ofdm_rate(struct vnt_private *priv, u16 rate_idx)
while (ui > RATE_11M) { while (ui > RATE_11M) {
if (priv->basic_rates & (1 << ui)) { if (priv->basic_rates & (1 << ui)) {
dev_dbg(&priv->usb->dev, "%s rate: %d\n", dev_dbg(&priv->usb->dev, "%s rate: %d\n",
__func__, ui); __func__, ui);
return ui; return ui;
} }
ui--; ui--;
...@@ -166,7 +166,7 @@ static u16 vnt_get_ofdm_rate(struct vnt_private *priv, u16 rate_idx) ...@@ -166,7 +166,7 @@ static u16 vnt_get_ofdm_rate(struct vnt_private *priv, u16 rate_idx)
* *
*/ */
static void vnt_calculate_ofdm_rate(u16 rate, u8 bb_type, static void vnt_calculate_ofdm_rate(u16 rate, u8 bb_type,
u8 *tx_rate, u8 *rsv_time) u8 *tx_rate, u8 *rsv_time)
{ {
switch (rate) { switch (rate) {
...@@ -268,20 +268,20 @@ void vnt_set_rspinf(struct vnt_private *priv, u8 bb_type) ...@@ -268,20 +268,20 @@ void vnt_set_rspinf(struct vnt_private *priv, u8 bb_type)
int i; int i;
/*RSPINF_b_1*/ /*RSPINF_b_1*/
vnt_get_phy_field(priv, 14, vnt_get_phy_field(priv, 14, vnt_get_cck_rate(priv, RATE_1M),
vnt_get_cck_rate(priv, RATE_1M), PK_TYPE_11B, &phy[0]); PK_TYPE_11B, &phy[0]);
/*RSPINF_b_2*/ /*RSPINF_b_2*/
vnt_get_phy_field(priv, 14, vnt_get_phy_field(priv, 14, vnt_get_cck_rate(priv, RATE_2M),
vnt_get_cck_rate(priv, RATE_2M), PK_TYPE_11B, &phy[1]); PK_TYPE_11B, &phy[1]);
/*RSPINF_b_5*/ /*RSPINF_b_5*/
vnt_get_phy_field(priv, 14, vnt_get_phy_field(priv, 14, vnt_get_cck_rate(priv, RATE_5M),
vnt_get_cck_rate(priv, RATE_5M), PK_TYPE_11B, &phy[2]); PK_TYPE_11B, &phy[2]);
/*RSPINF_b_11*/ /*RSPINF_b_11*/
vnt_get_phy_field(priv, 14, vnt_get_phy_field(priv, 14, vnt_get_cck_rate(priv, RATE_11M),
vnt_get_cck_rate(priv, RATE_11M), PK_TYPE_11B, &phy[3]); PK_TYPE_11B, &phy[3]);
/*RSPINF_a_6*/ /*RSPINF_a_6*/
vnt_calculate_ofdm_rate(RATE_6M, bb_type, &tx_rate[0], &rsv_time[0]); vnt_calculate_ofdm_rate(RATE_6M, bb_type, &tx_rate[0], &rsv_time[0]);
...@@ -300,19 +300,19 @@ void vnt_set_rspinf(struct vnt_private *priv, u8 bb_type) ...@@ -300,19 +300,19 @@ void vnt_set_rspinf(struct vnt_private *priv, u8 bb_type)
/*RSPINF_a_36*/ /*RSPINF_a_36*/
vnt_calculate_ofdm_rate(vnt_get_ofdm_rate(priv, RATE_36M), vnt_calculate_ofdm_rate(vnt_get_ofdm_rate(priv, RATE_36M),
bb_type, &tx_rate[5], &rsv_time[5]); bb_type, &tx_rate[5], &rsv_time[5]);
/*RSPINF_a_48*/ /*RSPINF_a_48*/
vnt_calculate_ofdm_rate(vnt_get_ofdm_rate(priv, RATE_48M), vnt_calculate_ofdm_rate(vnt_get_ofdm_rate(priv, RATE_48M),
bb_type, &tx_rate[6], &rsv_time[6]); bb_type, &tx_rate[6], &rsv_time[6]);
/*RSPINF_a_54*/ /*RSPINF_a_54*/
vnt_calculate_ofdm_rate(vnt_get_ofdm_rate(priv, RATE_54M), vnt_calculate_ofdm_rate(vnt_get_ofdm_rate(priv, RATE_54M),
bb_type, &tx_rate[7], &rsv_time[7]); bb_type, &tx_rate[7], &rsv_time[7]);
/*RSPINF_a_72*/ /*RSPINF_a_72*/
vnt_calculate_ofdm_rate(vnt_get_ofdm_rate(priv, RATE_54M), vnt_calculate_ofdm_rate(vnt_get_ofdm_rate(priv, RATE_54M),
bb_type, &tx_rate[8], &rsv_time[8]); bb_type, &tx_rate[8], &rsv_time[8]);
put_unaligned(phy[0].len, (u16 *)&data[0]); put_unaligned(phy[0].len, (u16 *)&data[0]);
data[2] = phy[0].signal; data[2] = phy[0].signal;
...@@ -335,8 +335,8 @@ void vnt_set_rspinf(struct vnt_private *priv, u8 bb_type) ...@@ -335,8 +335,8 @@ void vnt_set_rspinf(struct vnt_private *priv, u8 bb_type)
data[16 + i * 2 + 1] = rsv_time[i]; data[16 + i * 2 + 1] = rsv_time[i];
} }
vnt_control_out(priv, MESSAGE_TYPE_WRITE, vnt_control_out(priv, MESSAGE_TYPE_WRITE, MAC_REG_RSPINF_B_1,
MAC_REG_RSPINF_B_1, MESSAGE_REQUEST_MACREG, 34, &data[0]); MESSAGE_REQUEST_MACREG, 34, &data[0]);
} }
/* /*
...@@ -430,12 +430,12 @@ void vnt_update_ifs(struct vnt_private *priv) ...@@ -430,12 +430,12 @@ void vnt_update_ifs(struct vnt_private *priv)
data[3] = (u8)priv->slot; data[3] = (u8)priv->slot;
vnt_control_out(priv, MESSAGE_TYPE_WRITE, MAC_REG_SIFS, vnt_control_out(priv, MESSAGE_TYPE_WRITE, MAC_REG_SIFS,
MESSAGE_REQUEST_MACREG, 4, &data[0]); MESSAGE_REQUEST_MACREG, 4, &data[0]);
max_min |= 0xa0; max_min |= 0xa0;
vnt_control_out(priv, MESSAGE_TYPE_WRITE, MAC_REG_CWMAXMIN0, vnt_control_out(priv, MESSAGE_TYPE_WRITE, MAC_REG_CWMAXMIN0,
MESSAGE_REQUEST_MACREG, 1, &max_min); MESSAGE_REQUEST_MACREG, 1, &max_min);
} }
void vnt_update_top_rates(struct vnt_private *priv) void vnt_update_top_rates(struct vnt_private *priv)
...@@ -532,7 +532,7 @@ u64 vnt_get_tsf_offset(u8 rx_rate, u64 tsf1, u64 tsf2) ...@@ -532,7 +532,7 @@ u64 vnt_get_tsf_offset(u8 rx_rate, u64 tsf1, u64 tsf2)
* *
*/ */
void vnt_adjust_tsf(struct vnt_private *priv, u8 rx_rate, void vnt_adjust_tsf(struct vnt_private *priv, u8 rx_rate,
u64 time_stamp, u64 local_tsf) u64 time_stamp, u64 local_tsf)
{ {
u64 tsf_offset = 0; u64 tsf_offset = 0;
u8 data[8]; u8 data[8];
...@@ -549,7 +549,7 @@ void vnt_adjust_tsf(struct vnt_private *priv, u8 rx_rate, ...@@ -549,7 +549,7 @@ void vnt_adjust_tsf(struct vnt_private *priv, u8 rx_rate,
data[7] = (u8)(tsf_offset >> 56); data[7] = (u8)(tsf_offset >> 56);
vnt_control_out(priv, MESSAGE_TYPE_SET_TSFTBTT, vnt_control_out(priv, MESSAGE_TYPE_SET_TSFTBTT,
MESSAGE_REQUEST_TSF, 0, 8, data); MESSAGE_REQUEST_TSF, 0, 8, data);
} }
/* /*
* Description: Read NIC TSF counter * Description: Read NIC TSF counter
...@@ -658,7 +658,7 @@ void vnt_reset_next_tbtt(struct vnt_private *priv, u16 beacon_interval) ...@@ -658,7 +658,7 @@ void vnt_reset_next_tbtt(struct vnt_private *priv, u16 beacon_interval)
data[7] = (u8)(next_tbtt >> 56); data[7] = (u8)(next_tbtt >> 56);
vnt_control_out(priv, MESSAGE_TYPE_SET_TSFTBTT, vnt_control_out(priv, MESSAGE_TYPE_SET_TSFTBTT,
MESSAGE_REQUEST_TBTT, 0, 8, data); MESSAGE_REQUEST_TBTT, 0, 8, data);
} }
/* /*
...@@ -677,7 +677,7 @@ void vnt_reset_next_tbtt(struct vnt_private *priv, u16 beacon_interval) ...@@ -677,7 +677,7 @@ void vnt_reset_next_tbtt(struct vnt_private *priv, u16 beacon_interval)
* *
*/ */
void vnt_update_next_tbtt(struct vnt_private *priv, u64 tsf, void vnt_update_next_tbtt(struct vnt_private *priv, u64 tsf,
u16 beacon_interval) u16 beacon_interval)
{ {
u8 data[8]; u8 data[8];
...@@ -722,7 +722,7 @@ int vnt_radio_power_off(struct vnt_private *priv) ...@@ -722,7 +722,7 @@ int vnt_radio_power_off(struct vnt_private *priv)
case RF_VT3226D0: case RF_VT3226D0:
case RF_VT3342A0: case RF_VT3342A0:
vnt_mac_reg_bits_off(priv, MAC_REG_SOFTPWRCTL, vnt_mac_reg_bits_off(priv, MAC_REG_SOFTPWRCTL,
(SOFTPWRCTL_SWPE2 | SOFTPWRCTL_SWPE3)); (SOFTPWRCTL_SWPE2 | SOFTPWRCTL_SWPE3));
break; break;
} }
...@@ -763,7 +763,7 @@ int vnt_radio_power_on(struct vnt_private *priv) ...@@ -763,7 +763,7 @@ int vnt_radio_power_on(struct vnt_private *priv)
case RF_VT3226D0: case RF_VT3226D0:
case RF_VT3342A0: case RF_VT3342A0:
vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL, vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL,
(SOFTPWRCTL_SWPE2 | SOFTPWRCTL_SWPE3)); (SOFTPWRCTL_SWPE2 | SOFTPWRCTL_SWPE3));
break; break;
} }
...@@ -796,7 +796,7 @@ void vnt_set_bss_mode(struct vnt_private *priv) ...@@ -796,7 +796,7 @@ void vnt_set_bss_mode(struct vnt_private *priv)
priv->bb_vga[0] = 0x20; priv->bb_vga[0] = 0x20;
vnt_control_out_u8(priv, MESSAGE_REQUEST_BBREG, vnt_control_out_u8(priv, MESSAGE_REQUEST_BBREG,
0xe7, priv->bb_vga[0]); 0xe7, priv->bb_vga[0]);
} }
priv->bb_vga[2] = 0x10; priv->bb_vga[2] = 0x10;
...@@ -806,7 +806,7 @@ void vnt_set_bss_mode(struct vnt_private *priv) ...@@ -806,7 +806,7 @@ void vnt_set_bss_mode(struct vnt_private *priv)
priv->bb_vga[0] = 0x1c; priv->bb_vga[0] = 0x1c;
vnt_control_out_u8(priv, MESSAGE_REQUEST_BBREG, vnt_control_out_u8(priv, MESSAGE_REQUEST_BBREG,
0xe7, priv->bb_vga[0]); 0xe7, priv->bb_vga[0]);
} }
priv->bb_vga[2] = 0x0; priv->bb_vga[2] = 0x0;
......
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