staging: vt6656: struct vnt_private replace byBBType with bb_type
PATCH 1/25 staging: vt6656: struct vnt_private replace byBBType with bb_type
Removing type prefix and camel case.
--- drivers/staging/vt6656/card.c | 24 ++++++++++++------------ drivers/staging/vt6656/device.h | 2 +- drivers/staging/vt6656/dpc.c | 2 +- drivers/staging/vt6656/main_usb.c | 14 +++++++------- drivers/staging/vt6656/rxtx.c | 2 +- 5 files changed, 22 insertions(+), 22 deletions(-)
drivers/staging/vt6656/card.c +12 -12
@@ -405,7 +405,7 @@ void vnt_update_ifs(struct vnt_private *priv)switch (priv->rf_type) {case RF_VT3226D0 : -if (priv->byBBType !=BB_TYPE_11B ) { +if (priv->bb_type !=BB_TYPE_11B ) { priv->sifs -=1 ; priv->difs -=1 ;break ;
@@ -413,7 +413,7 @@ void vnt_update_ifs(struct vnt_private *priv)case RF_AIROHA7230 :case RF_AL2230 :case RF_AL2230S : -if (priv->byBBType !=BB_TYPE_11B ) +if (priv->bb_type !=BB_TYPE_11B )break ;case RF_RFMD2959 :case RF_VT3226 :
@@ -422,7 +422,7 @@ void vnt_update_ifs(struct vnt_private *priv) priv->difs -=3 ;break ;case RF_MAXIM2829 : -if (priv->byBBType ==BB_TYPE_11A ) { +if (priv->bb_type ==BB_TYPE_11A ) { priv->sifs -=5 ; priv->difs -=5 ; }else {
@@ -489,8 +489,8 @@ int vnt_ofdm_min_rate(struct vnt_private *priv)u8 vnt_get_pkt_type (struct vnt_private *priv) { -if (priv->byBBType ==BB_TYPE_11A || priv->byBBType ==BB_TYPE_11B ) -return (u8 )priv->byBBType; +if (priv->bb_type ==BB_TYPE_11A || priv->bb_type ==BB_TYPE_11B ) +return (u8 )priv->bb_type;else if (vnt_ofdm_min_rate (priv))return PK_TYPE_11GA ;else
@@ -788,24 +788,24 @@ int vnt_radio_power_on(struct vnt_private *priv)void vnt_set_bss_mode (struct vnt_private *priv) { -if (priv->rf_type ==RF_AIROHA7230 && priv->byBBType ==BB_TYPE_11A ) +if (priv->rf_type ==RF_AIROHA7230 && priv->bb_type ==BB_TYPE_11A )vnt_mac_set_bb_type (priv,BB_TYPE_11G );else -vnt_mac_set_bb_type (priv, priv->byBBType); +vnt_mac_set_bb_type (priv, priv->bb_type); priv->byPacketType =vnt_get_pkt_type (priv); -if (priv->byBBType ==BB_TYPE_11A ) +if (priv->bb_type ==BB_TYPE_11A )vnt_control_out_u8 (priv,MESSAGE_REQUEST_BBREG ,0x88 ,0x03 ); -else if (priv->byBBType ==BB_TYPE_11B ) +else if (priv->bb_type ==BB_TYPE_11B )vnt_control_out_u8 (priv,MESSAGE_REQUEST_BBREG ,0x88 ,0x02 ); -else if (priv->byBBType ==BB_TYPE_11G ) +else if (priv->bb_type ==BB_TYPE_11G )vnt_control_out_u8 (priv,MESSAGE_REQUEST_BBREG ,0x88 ,0x08 );vnt_update_ifs (priv); -vnt_set_rspinf (priv, (u8 )priv->byBBType); +vnt_set_rspinf (priv, (u8 )priv->bb_type); -if (priv->byBBType ==BB_TYPE_11A ) { +if (priv->bb_type ==BB_TYPE_11A ) {if (priv->rf_type ==RF_AIROHA7230 ) { priv->abyBBVGA[0 ] =0x20 ;
drivers/staging/vt6656/device.h +1 -1
@@ -330,7 +330,7 @@ struct vnt_private {u32 slot;/* Current SlotTime */ /* Rate */ -u8 byBBType;/* 0: 11A, 1:11B, 2:11G */ +u8 bb_type;/* 0: 11A, 1:11B, 2:11G */ u8 byPacketType;/* 0:11a 1:11b 2:11gb 3:11ga */ u32 wBasicRate;u8 byTopOFDMBasicRate;
drivers/staging/vt6656/dpc.c +1 -1
@@ -133,7 +133,7 @@ int vnt_rx_data(struct vnt_private *priv, struct vnt_rcb *ptr_rcb, priv->tsf_time =le64_to_cpu (*tsf_time); -if (priv->byBBType ==BB_TYPE_11G ) { +if (priv->bb_type ==BB_TYPE_11G ) { sq_3 = skb_data +8 + pay_load_with_padding +12 ; sq = sq_3; }else {
drivers/staging/vt6656/main_usb.c +7 -7
@@ -121,8 +121,8 @@ static void device_set_options(struct vnt_private *priv) priv->byShortRetryLimit =SHORT_RETRY_DEF ; priv->byLongRetryLimit =LONG_RETRY_DEF ; priv->op_mode =NL80211_IFTYPE_UNSPECIFIED ; - priv->byBBType =BBP_TYPE_DEF ; - priv->byPacketType = priv->byBBType; + priv->bb_type =BBP_TYPE_DEF ; + priv->byPacketType = priv->bb_type; priv->byAutoFBCtrl =AUTO_FB_0 ; priv->byPreambleType =0 ; priv->exist_sw_net_addr = false;
@@ -283,7 +283,7 @@ static int device_init_registers(struct vnt_private *priv) priv->byAutoFBCtrl =AUTO_FB_0 ;/* default Auto Mode */ - priv->byBBType =BB_TYPE_11G ; + priv->bb_type =BB_TYPE_11G ;/* get RFType */ priv->rf_type = init_rsp->rf_type;
@@ -341,7 +341,7 @@ static int device_init_registers(struct vnt_private *priv)* set BB and packet type at the same time * set Short Slot Time, xIFS, and RSPINF */ -if (priv->byBBType ==BB_TYPE_11A ) +if (priv->bb_type ==BB_TYPE_11A ) priv->bShortSlotTime = true;else priv->bShortSlotTime = false;
@@ -709,15 +709,15 @@ static int vnt_config(struct ieee80211_hw *hw, u32 changed)else bb_type =BB_TYPE_11G ; -if (priv->byBBType != bb_type) { - priv->byBBType = bb_type; +if (priv->bb_type != bb_type) { + priv->bb_type = bb_type;vnt_set_bss_mode (priv); } }if (changed &IEEE80211_CONF_CHANGE_POWER ) { -if (priv->byBBType ==BB_TYPE_11B ) +if (priv->bb_type ==BB_TYPE_11B ) priv->wCurrentRate =RATE_1M ;else priv->wCurrentRate =RATE_54M ;
drivers/staging/vt6656/rxtx.c +1 -1
@@ -966,7 +966,7 @@ static int vnt_beacon_xmit(struct vnt_private *priv, beacon_buffer = (struct vnt_beacon_buffer *)&context->data[0 ]; short_head = &beacon_buffer->short_head; -if (priv->byBBType ==BB_TYPE_11A ) { +if (priv->bb_type ==BB_TYPE_11A ) { current_rate =RATE_6M ;/* Get SignalField,ServiceField,Length */
Signature · 1 line
2.0.1
PATCH 2/25 staging: vt6656: struct vnt_private replace byPacketType with packet_type
Removing type prefix and camel case.
--- drivers/staging/vt6656/card.c | 6 +++--- drivers/staging/vt6656/device.h | 2 +- drivers/staging/vt6656/main_usb.c | 4 ++-- drivers/staging/vt6656/rxtx.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-)
drivers/staging/vt6656/card.c +3 -3
@@ -365,12 +365,12 @@ void vnt_update_ifs(struct vnt_private *priv)u8 max_min =0 ;u8 data[4 ]; -if (priv->byPacketType ==PK_TYPE_11A ) { +if (priv->packet_type ==PK_TYPE_11A ) { priv->slot =C_SLOT_SHORT ; priv->sifs =C_SIFS_A ; priv->difs =C_SIFS_A +2 *C_SLOT_SHORT ; max_min =4 ; - }else if (priv->byPacketType ==PK_TYPE_11B ) { + }else if (priv->packet_type ==PK_TYPE_11B ) { priv->slot =C_SLOT_LONG ; priv->sifs =C_SIFS_BG ; priv->difs =C_SIFS_BG +2 *C_SLOT_LONG ;
@@ -793,7 +793,7 @@ void vnt_set_bss_mode(struct vnt_private *priv)else vnt_mac_set_bb_type (priv, priv->bb_type); - priv->byPacketType =vnt_get_pkt_type (priv); + priv->packet_type =vnt_get_pkt_type (priv);if (priv->bb_type ==BB_TYPE_11A )vnt_control_out_u8 (priv,MESSAGE_REQUEST_BBREG ,0x88 ,0x03 );
drivers/staging/vt6656/device.h +1 -1
@@ -331,7 +331,7 @@ struct vnt_private {/* Rate */ u8 bb_type;/* 0: 11A, 1:11B, 2:11G */ -u8 byPacketType;/* 0:11a 1:11b 2:11gb 3:11ga */ +u8 packet_type;/* 0:11a 1:11b 2:11gb 3:11ga */ u32 wBasicRate;u8 byTopOFDMBasicRate;u8 byTopCCKBasicRate;
drivers/staging/vt6656/main_usb.c +2 -2
@@ -122,7 +122,7 @@ static void device_set_options(struct vnt_private *priv) priv->byLongRetryLimit =LONG_RETRY_DEF ; priv->op_mode =NL80211_IFTYPE_UNSPECIFIED ; priv->bb_type =BBP_TYPE_DEF ; - priv->byPacketType = priv->bb_type; + priv->packet_type = priv->bb_type; priv->byAutoFBCtrl =AUTO_FB_0 ; priv->byPreambleType =0 ; priv->exist_sw_net_addr = false;
@@ -142,7 +142,7 @@ static int device_init_registers(struct vnt_private *priv)u8 calib_tx_iq =0 , calib_tx_dc =0 , calib_rx_iq =0 ;dev_dbg (&priv->usb->dev,"---->INIbInitAdapter. [%d][%d]\n" , -DEVICE_INIT_COLD , priv->byPacketType); +DEVICE_INIT_COLD , priv->packet_type);if (!vnt_check_firmware_version (priv)) {if (vnt_download_firmware (priv) == true) {
drivers/staging/vt6656/rxtx.c +1 -1
@@ -771,7 +771,7 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb) }if (current_rate >RATE_11M ) - pkt_type = priv->byPacketType; + pkt_type = priv->packet_type;else pkt_type =PK_TYPE_11B ;
Signature · 1 line
2.0.1
PATCH 3/25 staging: vt6656: struct vnt_private replace wBasicRate with basic_rates
In reply to Malcolm PriestleyThe same name as in struct ieee80211_bss_conf
--- drivers/staging/vt6656/card.c | 14 +++++++------- drivers/staging/vt6656/device.h | 2 +- drivers/staging/vt6656/main_usb.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-)
drivers/staging/vt6656/card.c +7 -7
@@ -109,7 +109,7 @@ static u16 vnt_get_cck_rate(struct vnt_private *priv, u16 rate_idx)u16 ui = rate_idx;while (ui >RATE_1M ) { -if (priv->wBasicRate & (1 << ui)) +if (priv->basic_rates & (1 << ui))return ui; ui--; }
@@ -135,7 +135,7 @@ static u16 vnt_get_ofdm_rate(struct vnt_private *priv, u16 rate_idx)u16 ui = rate_idx;dev_dbg (&priv->usb->dev,"%s basic rate: %d\n" , - __func__, priv->wBasicRate); + __func__, priv->basic_rates);if (!vnt_ofdm_min_rate (priv)) { dev_dbg(&priv->usb->dev, "%s (NO OFDM) %d\n",
@@ -146,7 +146,7 @@ static u16 vnt_get_ofdm_rate(struct vnt_private *priv, u16 rate_idx) }while (ui >RATE_11M ) { -if (priv->wBasicRate & (1 << ui)) { +if (priv->basic_rates & (1 << ui)) {dev_dbg (&priv->usb->dev,"%s rate: %d\n" , __func__, ui);return ui;
@@ -389,7 +389,7 @@ void vnt_update_ifs(struct vnt_private *priv) priv->difs =C_SIFS_BG +2 * priv->slot;for (ii =RATE_54M ; ii >=RATE_6M ; ii--) { -if (priv->wBasicRate & ((u32)(0x1 << ii))) { +if (priv->basic_rates & ((u32)(0x1 << ii))) { ofdm_rate = true;break ; }
@@ -454,7 +454,7 @@ void vnt_update_top_rates(struct vnt_private *priv)/*Determines the highest basic rate.*/ for (i =RATE_54M ; i >=RATE_6M ; i--) { -if (priv->wBasicRate & (u16)(1 << i)) { +if (priv->basic_rates & (u16)(1 << i)) { top_ofdm = i;break ; }
@@ -463,7 +463,7 @@ void vnt_update_top_rates(struct vnt_private *priv) priv->byTopOFDMBasicRate = top_ofdm;for (i =RATE_11M ;; i--) { -if (priv->wBasicRate & (u16)(1 << i)) { +if (priv->basic_rates & (u16)(1 << i)) { top_cck = i;break ; }
@@ -479,7 +479,7 @@ int vnt_ofdm_min_rate(struct vnt_private *priv)int ii;for (ii =RATE_54M ; ii >=RATE_6M ; ii--) { -if ((priv->wBasicRate) & ((u16)(1 << ii))) +if ((priv->basic_rates) & ((u16)(1 << ii)))return true; }
drivers/staging/vt6656/device.h +1 -1
@@ -332,7 +332,7 @@ struct vnt_private {/* Rate */ u8 bb_type;/* 0: 11A, 1:11B, 2:11G */ u8 packet_type;/* 0:11a 1:11b 2:11gb 3:11ga */ -u32 wBasicRate; +u32 basic_rates;u8 byTopOFDMBasicRate;u8 byTopCCKBasicRate;
drivers/staging/vt6656/main_usb.c +1 -1
@@ -742,7 +742,7 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw,if (changed &BSS_CHANGED_BASIC_RATES ) { - priv->wBasicRate = conf->basic_rates; + priv->basic_rates = conf->basic_rates;vnt_update_top_rates (priv);
Signature · 1 line
2.0.1
PATCH 4/25 staging: vt6656: struct vnt_private replace byTopOFDMBasicRate with top_ofdm_basic_rate
In reply to Malcolm PriestleyRemoving type prefix and camel case.
--- drivers/staging/vt6656/card.c | 2 +- drivers/staging/vt6656/device.h | 2 +- drivers/staging/vt6656/main_usb.c | 2 +- drivers/staging/vt6656/rxtx.c | 22 +++++++++++----------- 4 files changed, 14 insertions(+), 14 deletions(-)
drivers/staging/vt6656/card.c +1 -1
@@ -460,7 +460,7 @@ void vnt_update_top_rates(struct vnt_private *priv) } } - priv->byTopOFDMBasicRate = top_ofdm; + priv->top_ofdm_basic_rate = top_ofdm;for (i =RATE_11M ;; i--) {if (priv->basic_rates & (u16)(1 << i)) {
drivers/staging/vt6656/device.h +1 -1
@@ -333,7 +333,7 @@ struct vnt_private {u8 bb_type;/* 0: 11A, 1:11B, 2:11G */ u8 packet_type;/* 0:11a 1:11b 2:11gb 3:11ga */ u32 basic_rates; -u8 byTopOFDMBasicRate; +u8 top_ofdm_basic_rate;u8 byTopCCKBasicRate;u8 abyEEPROM[EEP_MAX_CONTEXT_SIZE ];/*u32 alignment */
drivers/staging/vt6656/main_usb.c +1 -1
@@ -195,7 +195,7 @@ static int device_init_registers(struct vnt_private *priv)/* do MACbSoftwareReset in MACvInitialize */ - priv->byTopOFDMBasicRate =RATE_24M ; + priv->top_ofdm_basic_rate =RATE_24M ; priv->byTopCCKBasicRate =RATE_1M ;/* target to IF pin while programming to RF chip */
drivers/staging/vt6656/rxtx.c +11 -11
@@ -122,7 +122,7 @@ static u32 vnt_get_rsvtime(struct vnt_private *priv, u8 pkt_type, 14, (u16)priv->byTopCCKBasicRate); else ack_time =vnt_get_frame_time (priv->byPreambleType, pkt_type, -14 , (u16 )priv->byTopOFDMBasicRate); +14 , (u16 )priv->top_ofdm_basic_rate);if (need_ack)return data_time + priv->sifs + ack_time;
@@ -158,17 +158,17 @@ static __le16 vnt_get_rtscts_rsvtime_le(struct vnt_private *priv, cts_time =vnt_get_frame_time (priv->byPreambleType, pkt_type,14 , priv->byTopCCKBasicRate); ack_time =vnt_get_frame_time (priv->byPreambleType, pkt_type, -14 , priv->byTopOFDMBasicRate); +14 , priv->top_ofdm_basic_rate); }else if (rsv_type ==2 ) { rts_time =vnt_get_frame_time (priv->byPreambleType, pkt_type, -20 , priv->byTopOFDMBasicRate); +20 , priv->top_ofdm_basic_rate); cts_time = ack_time =vnt_get_frame_time (priv->byPreambleType, - pkt_type,14 , priv->byTopOFDMBasicRate); + pkt_type,14 , priv->top_ofdm_basic_rate); }else if (rsv_type ==3 ) { cts_time =vnt_get_frame_time (priv->byPreambleType, pkt_type,14 , priv->byTopCCKBasicRate); ack_time =vnt_get_frame_time (priv->byPreambleType, pkt_type, -14 , priv->byTopOFDMBasicRate); +14 , priv->top_ofdm_basic_rate); rrv_time = cts_time + ack_time + data_time +2 * priv->sifs;
@@ -191,7 +191,7 @@ static __le16 vnt_get_duration_le(struct vnt_private *piv, pkt_type, 14, piv->byTopCCKBasicRate); else ack_time =vnt_get_frame_time (piv->byPreambleType, - pkt_type,14 , piv->byTopOFDMBasicRate); + pkt_type,14 , piv->top_ofdm_basic_rate);return cpu_to_le16 ((u16)(piv->sifs + ack_time)); }
@@ -220,7 +220,7 @@ static __le16 vnt_get_rtscts_duration_le(struct vnt_private *priv, u8 dur_type,case RTSDUR_AA_F0 :case RTSDUR_AA_F1 : cts_time =vnt_get_frame_time (priv->byPreambleType, - pkt_type,14 , priv->byTopOFDMBasicRate); + pkt_type,14 , priv->top_ofdm_basic_rate); dur_time = cts_time +2 * priv->sifs +vnt_get_rsvtime (priv, pkt_type, frame_length, rate, need_ack);
@@ -390,7 +390,7 @@ static u16 vnt_rxtx_rts_g_head(struct vnt_usb_send_context *tx_context,vnt_get_phy_field (priv, rts_frame_len, priv->byTopCCKBasicRate,PK_TYPE_11B , &buf->b);vnt_get_phy_field (priv, rts_frame_len, - priv->byTopOFDMBasicRate, pkt_type, &buf->a); + priv->top_ofdm_basic_rate, pkt_type, &buf->a); buf->duration_bb =vnt_get_rtscts_duration_le (priv,RTSDUR_BB , frame_len,PK_TYPE_11B , priv->byTopCCKBasicRate, need_ack);
@@ -415,7 +415,7 @@ static u16 vnt_rxtx_rts_g_fb_head(struct vnt_usb_send_context *tx_context,vnt_get_phy_field (priv, rts_frame_len, priv->byTopCCKBasicRate,PK_TYPE_11B , &buf->b);vnt_get_phy_field (priv, rts_frame_len, - priv->byTopOFDMBasicRate, pkt_type, &buf->a); + priv->top_ofdm_basic_rate, pkt_type, &buf->a); buf->duration_bb = vnt_get_rtscts_duration_le(priv, RTSDUR_BB,
@@ -449,7 +449,7 @@ static u16 vnt_rxtx_rts_ab_head(struct vnt_usb_send_context *tx_context,u16 rts_frame_len =20 ;vnt_get_phy_field (priv, rts_frame_len, - priv->byTopOFDMBasicRate, pkt_type, &buf->ab); + priv->top_ofdm_basic_rate, pkt_type, &buf->ab); buf->duration =vnt_get_rtscts_duration_le (priv,RTSDUR_AA , frame_len, pkt_type, current_rate, need_ack);
@@ -468,7 +468,7 @@ static u16 vnt_rxtx_rts_a_fb_head(struct vnt_usb_send_context *tx_context,u16 rts_frame_len =20 ;vnt_get_phy_field (priv, rts_frame_len, - priv->byTopOFDMBasicRate, pkt_type, &buf->a); + priv->top_ofdm_basic_rate, pkt_type, &buf->a); buf->duration =vnt_get_rtscts_duration_le (priv,RTSDUR_AA , frame_len, pkt_type, current_rate, need_ack);
Signature · 1 line
2.0.1
PATCH 5/25 staging: vt6656: struct vnt_private replace byTopCCKBasicRate with top_cck_basic_rate
In reply to Malcolm PriestleyRemoving type prefix and camel case.
--- drivers/staging/vt6656/card.c | 2 +- drivers/staging/vt6656/device.h | 2 +- drivers/staging/vt6656/main_usb.c | 2 +- drivers/staging/vt6656/rxtx.c | 40 +++++++++++++++++++-------------------- 4 files changed, 23 insertions(+), 23 deletions(-)
drivers/staging/vt6656/card.c +1 -1
@@ -471,7 +471,7 @@ void vnt_update_top_rates(struct vnt_private *priv)break ; } - priv->byTopCCKBasicRate = top_cck; + priv->top_cck_basic_rate = top_cck; }int vnt_ofdm_min_rate (struct vnt_private *priv)
drivers/staging/vt6656/device.h +1 -1
@@ -334,7 +334,7 @@ struct vnt_private {u8 packet_type;/* 0:11a 1:11b 2:11gb 3:11ga */ u32 basic_rates;u8 top_ofdm_basic_rate; -u8 byTopCCKBasicRate; +u8 top_cck_basic_rate;u8 abyEEPROM[EEP_MAX_CONTEXT_SIZE ];/*u32 alignment */
drivers/staging/vt6656/main_usb.c +1 -1
@@ -196,7 +196,7 @@ static int device_init_registers(struct vnt_private *priv)/* do MACbSoftwareReset in MACvInitialize */ priv->top_ofdm_basic_rate =RATE_24M ; - priv->byTopCCKBasicRate =RATE_1M ; + priv->top_cck_basic_rate =RATE_1M ;/* target to IF pin while programming to RF chip */ priv->byCurPwr =0xFF ;
drivers/staging/vt6656/rxtx.c +20 -20
@@ -119,7 +119,7 @@ static u32 vnt_get_rsvtime(struct vnt_private *priv, u8 pkt_type,if (pkt_type ==PK_TYPE_11B ) ack_time =vnt_get_frame_time (priv->byPreambleType, pkt_type, -14 , (u16 )priv->byTopCCKBasicRate); +14 , (u16 )priv->top_cck_basic_rate);else ack_time =vnt_get_frame_time (priv->byPreambleType, pkt_type,14 , (u16 )priv->top_ofdm_basic_rate);
@@ -149,14 +149,14 @@ static __le16 vnt_get_rtscts_rsvtime_le(struct vnt_private *priv,if (rsv_type ==0 ) { rts_time =vnt_get_frame_time (priv->byPreambleType, - pkt_type,20 , priv->byTopCCKBasicRate); + pkt_type,20 , priv->top_cck_basic_rate); cts_time = ack_time =vnt_get_frame_time (priv->byPreambleType, - pkt_type,14 , priv->byTopCCKBasicRate); + pkt_type,14 , priv->top_cck_basic_rate); }else if (rsv_type ==1 ) { rts_time =vnt_get_frame_time (priv->byPreambleType, - pkt_type,20 , priv->byTopCCKBasicRate); + pkt_type,20 , priv->top_cck_basic_rate); cts_time =vnt_get_frame_time (priv->byPreambleType, pkt_type, -14 , priv->byTopCCKBasicRate); +14 , priv->top_cck_basic_rate); ack_time =vnt_get_frame_time (priv->byPreambleType, pkt_type,14 , priv->top_ofdm_basic_rate); }else if (rsv_type ==2 ) {
@@ -166,7 +166,7 @@ static __le16 vnt_get_rtscts_rsvtime_le(struct vnt_private *priv, pkt_type, 14, priv->top_ofdm_basic_rate); }else if (rsv_type ==3 ) { cts_time =vnt_get_frame_time (priv->byPreambleType, pkt_type, -14 , priv->byTopCCKBasicRate); +14 , priv->top_cck_basic_rate); ack_time =vnt_get_frame_time (priv->byPreambleType, pkt_type,14 , priv->top_ofdm_basic_rate);
@@ -188,7 +188,7 @@ static __le16 vnt_get_duration_le(struct vnt_private *piv,if (need_ack) {if (pkt_type ==PK_TYPE_11B ) ack_time =vnt_get_frame_time (piv->byPreambleType, - pkt_type,14 , piv->byTopCCKBasicRate); + pkt_type,14 , piv->top_cck_basic_rate);else ack_time =vnt_get_frame_time (piv->byPreambleType, pkt_type,14 , piv->top_ofdm_basic_rate);
@@ -210,7 +210,7 @@ static __le16 vnt_get_rtscts_duration_le(struct vnt_private *priv, u8 dur_type,case RTSDUR_BA_F0 :case RTSDUR_BA_F1 : cts_time =vnt_get_frame_time (priv->byPreambleType, - pkt_type,14 , priv->byTopCCKBasicRate); + pkt_type,14 , priv->top_cck_basic_rate); dur_time = cts_time +2 * priv->sifs +vnt_get_rsvtime (priv, pkt_type, frame_length, rate, need_ack);
@@ -264,7 +264,7 @@ static u16 vnt_rxtx_datahead_g(struct vnt_usb_send_context *tx_context,/* Get SignalField,ServiceField,Length */ vnt_get_phy_field (priv, frame_len, rate, pkt_type, &buf->a); -vnt_get_phy_field (priv, frame_len, priv->byTopCCKBasicRate, +vnt_get_phy_field (priv, frame_len, priv->top_cck_basic_rate,PK_TYPE_11B , &buf->b);/* Get Duration and TimeStamp */
@@ -281,7 +281,7 @@ static u16 vnt_rxtx_datahead_g(struct vnt_usb_send_context *tx_context, buf->time_stamp_off_a =vnt_time_stamp_off (priv, rate); buf->time_stamp_off_b =vnt_time_stamp_off (priv, - priv->byTopCCKBasicRate); + priv->top_cck_basic_rate); tx_context->tx_hdr_size =vnt_mac_hdr_pos (tx_context, &buf->hdr);
@@ -297,7 +297,7 @@ static u16 vnt_rxtx_datahead_g_fb(struct vnt_usb_send_context *tx_context,/* Get SignalField,ServiceField,Length */ vnt_get_phy_field (priv, frame_len, rate, pkt_type, &buf->a); -vnt_get_phy_field (priv, frame_len, priv->byTopCCKBasicRate, +vnt_get_phy_field (priv, frame_len, priv->top_cck_basic_rate,PK_TYPE_11B , &buf->b);/* Get Duration and TimeStamp */
@@ -309,7 +309,7 @@ static u16 vnt_rxtx_datahead_g_fb(struct vnt_usb_send_context *tx_context, buf->time_stamp_off_a =vnt_time_stamp_off (priv, rate); buf->time_stamp_off_b =vnt_time_stamp_off (priv, - priv->byTopCCKBasicRate); + priv->top_cck_basic_rate); tx_context->tx_hdr_size =vnt_mac_hdr_pos (tx_context, &buf->hdr);
@@ -387,13 +387,13 @@ static u16 vnt_rxtx_rts_g_head(struct vnt_usb_send_context *tx_context,struct vnt_private *priv = tx_context->priv;u16 rts_frame_len =20 ; -vnt_get_phy_field (priv, rts_frame_len, priv->byTopCCKBasicRate, +vnt_get_phy_field (priv, rts_frame_len, priv->top_cck_basic_rate,PK_TYPE_11B , &buf->b);vnt_get_phy_field (priv, rts_frame_len, priv->top_ofdm_basic_rate, pkt_type, &buf->a); buf->duration_bb =vnt_get_rtscts_duration_le (priv,RTSDUR_BB , - frame_len,PK_TYPE_11B , priv->byTopCCKBasicRate, need_ack); + frame_len,PK_TYPE_11B , priv->top_cck_basic_rate, need_ack); buf->duration_aa =vnt_get_rtscts_duration_le (priv,RTSDUR_AA , frame_len, pkt_type, current_rate, need_ack); buf->duration_ba = vnt_get_rtscts_duration_le(priv, RTSDUR_BA,
@@ -412,14 +412,14 @@ static u16 vnt_rxtx_rts_g_fb_head(struct vnt_usb_send_context *tx_context,struct vnt_private *priv = tx_context->priv;u16 rts_frame_len =20 ; -vnt_get_phy_field (priv, rts_frame_len, priv->byTopCCKBasicRate, +vnt_get_phy_field (priv, rts_frame_len, priv->top_cck_basic_rate,PK_TYPE_11B , &buf->b);vnt_get_phy_field (priv, rts_frame_len, priv->top_ofdm_basic_rate, pkt_type, &buf->a); buf->duration_bb =vnt_get_rtscts_duration_le (priv,RTSDUR_BB , - frame_len,PK_TYPE_11B , priv->byTopCCKBasicRate, need_ack); + frame_len,PK_TYPE_11B , priv->top_cck_basic_rate, need_ack); buf->duration_aa =vnt_get_rtscts_duration_le (priv,RTSDUR_AA , frame_len, pkt_type, current_rate, need_ack); buf->duration_ba = vnt_get_rtscts_duration_le(priv, RTSDUR_BA,
@@ -500,7 +500,7 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,struct vnt_cts_fb *buf = &head->cts_g_fb;/* Get SignalField,ServiceField,Length */ vnt_get_phy_field (priv, cts_frame_len, - priv->byTopCCKBasicRate,PK_TYPE_11B , &buf->b); + priv->top_cck_basic_rate,PK_TYPE_11B , &buf->b); buf->duration_ba =vnt_get_rtscts_duration_le (priv,CTSDUR_BA , frame_len, pkt_type, current_rate, need_ack);
@@ -526,7 +526,7 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,struct vnt_cts *buf = &head->cts_g;/* Get SignalField,ServiceField,Length */ vnt_get_phy_field (priv, cts_frame_len, - priv->byTopCCKBasicRate,PK_TYPE_11B , &buf->b); + priv->top_cck_basic_rate,PK_TYPE_11B , &buf->b);/* Get CTSDuration_ba */ buf->duration_ba = vnt_get_rtscts_duration_le(priv, CTSDUR_BA, frame_len, pkt_type,
@@ -563,7 +563,7 @@ static u16 vnt_rxtx_rts(struct vnt_usb_send_context *tx_context, buf->rrv_time_a =vnt_rxtx_rsvtime_le16 (priv, pkt_type, frame_size, current_rate, need_ack); buf->rrv_time_b =vnt_rxtx_rsvtime_le16 (priv,PK_TYPE_11B , frame_size, - priv->byTopCCKBasicRate, need_ack); + priv->top_cck_basic_rate, need_ack);if (need_mic) head = &tx_head->tx_rts.tx.mic.head;
@@ -588,7 +588,7 @@ static u16 vnt_rxtx_cts(struct vnt_usb_send_context *tx_context, buf->rrv_time_a =vnt_rxtx_rsvtime_le16 (priv, pkt_type, frame_size, current_rate, need_ack); buf->rrv_time_b =vnt_rxtx_rsvtime_le16 (priv,PK_TYPE_11B , - frame_size, priv->byTopCCKBasicRate, need_ack); + frame_size, priv->top_cck_basic_rate, need_ack); buf->cts_rrv_time_ba =vnt_get_rtscts_rsvtime_le (priv,3 , pkt_type, frame_size, current_rate);
Signature · 1 line
2.0.1
PATCH 6/25 staging: vt6656: struct vnt_private replace abyEEPROM with eeprom
In reply to Malcolm PriestleyRemoving type prefix and camel case.
--- drivers/staging/vt6656/baseband.c | 4 ++-- drivers/staging/vt6656/device.h | 2 +- drivers/staging/vt6656/main_usb.c | 24 ++++++++++++------------ 3 files changed, 15 insertions(+), 15 deletions(-)
drivers/staging/vt6656/baseband.c +2 -2
@@ -390,11 +390,11 @@ int vnt_vt3184_init(struct vnt_private *priv) status =vnt_control_in (priv,MESSAGE_TYPE_READ ,0 ,MESSAGE_REQUEST_EEPROM ,EEP_MAX_CONTEXT_SIZE , - priv->abyEEPROM); + priv->eeprom);if (status !=STATUS_SUCCESS )return false; - priv->rf_type = priv->abyEEPROM[EEP_OFS_RFTYPE ]; + priv->rf_type = priv->eeprom[EEP_OFS_RFTYPE ];dev_dbg (&priv->usb->dev,"RF Type %d\n" , priv->rf_type);
drivers/staging/vt6656/device.h +1 -1
@@ -336,7 +336,7 @@ struct vnt_private {u8 top_ofdm_basic_rate;u8 top_cck_basic_rate; -u8 abyEEPROM[EEP_MAX_CONTEXT_SIZE ];/*u32 alignment */ +u8 eeprom[EEP_MAX_CONTEXT_SIZE ];/*u32 alignment */ u8 byPreambleType;
drivers/staging/vt6656/main_usb.c +12 -12
@@ -201,17 +201,17 @@ static int device_init_registers(struct vnt_private *priv)/* target to IF pin while programming to RF chip */ priv->byCurPwr =0xFF ; - priv->byCCKPwr = priv->abyEEPROM[EEP_OFS_PWR_CCK ]; - priv->byOFDMPwrG = priv->abyEEPROM[EEP_OFS_PWR_OFDMG ]; + priv->byCCKPwr = priv->eeprom[EEP_OFS_PWR_CCK ]; + priv->byOFDMPwrG = priv->eeprom[EEP_OFS_PWR_OFDMG ];/* load power table */ for (ii =0 ; ii <14 ; ii++) { priv->abyCCKPwrTbl[ii] = - priv->abyEEPROM[ii +EEP_OFS_CCK_PWR_TBL ]; + priv->eeprom[ii +EEP_OFS_CCK_PWR_TBL ];if (priv->abyCCKPwrTbl[ii] ==0 ) priv->abyCCKPwrTbl[ii] = priv->byCCKPwr; priv->abyOFDMPwrTbl[ii] = - priv->abyEEPROM[ii +EEP_OFS_OFDM_PWR_TBL ]; + priv->eeprom[ii +EEP_OFS_OFDM_PWR_TBL ];if (priv->abyOFDMPwrTbl[ii] ==0 ) priv->abyOFDMPwrTbl[ii] = priv->byOFDMPwrG; }
@@ -230,13 +230,13 @@ static int device_init_registers(struct vnt_private *priv)/* load OFDM A power table */ for (ii =0 ; ii <CB_MAX_CHANNEL_5G ; ii++) { priv->abyOFDMAPwrTbl[ii] = - priv->abyEEPROM[ii +EEP_OFS_OFDMA_PWR_TBL ]; + priv->eeprom[ii +EEP_OFS_OFDMA_PWR_TBL ];if (priv->abyOFDMAPwrTbl[ii] ==0 ) priv->abyOFDMAPwrTbl[ii] = priv->byOFDMPwrA; } - antenna = priv->abyEEPROM[EEP_OFS_ANTENNA ]; + antenna = priv->eeprom[EEP_OFS_ANTENNA ];if (antenna &EEP_ANTINV ) priv->tx_rx_ant_inv = true;
@@ -290,12 +290,12 @@ static int device_init_registers(struct vnt_private *priv)/* load vt3266 calibration parameters in EEPROM */ if (priv->rf_type ==RF_VT3226D0 ) { -if ((priv->abyEEPROM[EEP_OFS_MAJOR_VER ] ==0x1 ) && - (priv->abyEEPROM[EEP_OFS_MINOR_VER ] >=0x4 )) { +if ((priv->eeprom[EEP_OFS_MAJOR_VER ] ==0x1 ) && + (priv->eeprom[EEP_OFS_MINOR_VER ] >=0x4 )) { - calib_tx_iq = priv->abyEEPROM[EEP_OFS_CALIB_TX_IQ ]; - calib_tx_dc = priv->abyEEPROM[EEP_OFS_CALIB_TX_DC ]; - calib_rx_iq = priv->abyEEPROM[EEP_OFS_CALIB_RX_IQ ]; + calib_tx_iq = priv->eeprom[EEP_OFS_CALIB_TX_IQ ]; + calib_tx_dc = priv->eeprom[EEP_OFS_CALIB_TX_DC ]; + calib_rx_iq = priv->eeprom[EEP_OFS_CALIB_RX_IQ ];if (calib_tx_iq || calib_tx_dc || calib_rx_iq) {/* CR255, enable TX/RX IQ and DC compensation mode */
@@ -348,7 +348,7 @@ static int device_init_registers(struct vnt_private *priv)vnt_set_short_slot_time (priv); - priv->radio_ctl = priv->abyEEPROM[EEP_OFS_RADIOCTL ]; + priv->radio_ctl = priv->eeprom[EEP_OFS_RADIOCTL ];if ((priv->radio_ctl &EEP_RADIOCTL_ENABLE ) !=0 ) { status = vnt_control_in(priv, MESSAGE_TYPE_READ,
Signature · 1 line
2.0.1
PATCH 7/25 staging: vt6656: struct vnt_private replace byPreambleType with preamble_type
In reply to Malcolm PriestleyRemoving type prefix and camel case.
--- drivers/staging/vt6656/baseband.c | 2 +- drivers/staging/vt6656/device.h | 2 +- drivers/staging/vt6656/main_usb.c | 6 +++--- drivers/staging/vt6656/rxtx.c | 40 +++++++++++++++++++-------------------- 4 files changed, 25 insertions(+), 25 deletions(-)
drivers/staging/vt6656/baseband.c +1 -1
@@ -207,7 +207,7 @@ void vnt_get_phy_field(struct vnt_private *priv, u32 frame_length,u32 count =0 ;u32 tmp;int ext_bit; -u8 preamble_type = priv->byPreambleType; +u8 preamble_type = priv->preamble_type; bit_count = frame_length *8 ; ext_bit = false;
drivers/staging/vt6656/device.h +1 -1
@@ -338,7 +338,7 @@ struct vnt_private {u8 eeprom[EEP_MAX_CONTEXT_SIZE ];/*u32 alignment */ -u8 byPreambleType; +u8 preamble_type;/* For RF Power table */ u8 byCCKPwr;
drivers/staging/vt6656/main_usb.c +3 -3
@@ -124,7 +124,7 @@ static void device_set_options(struct vnt_private *priv) priv->bb_type =BBP_TYPE_DEF ; priv->packet_type = priv->bb_type; priv->byAutoFBCtrl =AUTO_FB_0 ; - priv->byPreambleType =0 ; + priv->preamble_type =0 ; priv->exist_sw_net_addr = false; }
@@ -752,10 +752,10 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw,if (changed &BSS_CHANGED_ERP_PREAMBLE ) {if (conf->use_short_preamble) {vnt_mac_enable_barker_preamble_mode (priv); - priv->byPreambleType = true; + priv->preamble_type = true; }else {vnt_mac_disable_barker_preamble_mode (priv); - priv->byPreambleType = false; + priv->preamble_type = false; } }
drivers/staging/vt6656/rxtx.c +20 -20
@@ -105,7 +105,7 @@ static struct vnt_usb_send_contextstatic __le16 vnt_time_stamp_off (struct vnt_private *priv,u16 rate) { -return cpu_to_le16 (vnt_time_stampoff[priv->byPreambleType %2 ] +return cpu_to_le16 (vnt_time_stampoff[priv->preamble_type %2 ] [rate %MAX_RATE ]); }
@@ -114,14 +114,14 @@ static u32 vnt_get_rsvtime(struct vnt_private *priv, u8 pkt_type, {u32 data_time, ack_time; - data_time =vnt_get_frame_time (priv->byPreambleType, pkt_type, + data_time =vnt_get_frame_time (priv->preamble_type, pkt_type, frame_length, rate);if (pkt_type ==PK_TYPE_11B ) - ack_time =vnt_get_frame_time (priv->byPreambleType, pkt_type, + ack_time =vnt_get_frame_time (priv->preamble_type, pkt_type,14 , (u16 )priv->top_cck_basic_rate);else - ack_time =vnt_get_frame_time (priv->byPreambleType, pkt_type, + ack_time =vnt_get_frame_time (priv->preamble_type, pkt_type,14 , (u16 )priv->top_ofdm_basic_rate);if (need_ack)
@@ -144,30 +144,30 @@ static __le16 vnt_get_rtscts_rsvtime_le(struct vnt_private *priv, rrv_time = rts_time = cts_time = ack_time = data_time =0 ; - data_time =vnt_get_frame_time (priv->byPreambleType, pkt_type, + data_time =vnt_get_frame_time (priv->preamble_type, pkt_type, frame_length, current_rate);if (rsv_type ==0 ) { - rts_time =vnt_get_frame_time (priv->byPreambleType, + rts_time =vnt_get_frame_time (priv->preamble_type, pkt_type,20 , priv->top_cck_basic_rate); - cts_time = ack_time =vnt_get_frame_time (priv->byPreambleType, + cts_time = ack_time =vnt_get_frame_time (priv->preamble_type, pkt_type,14 , priv->top_cck_basic_rate); }else if (rsv_type ==1 ) { - rts_time =vnt_get_frame_time (priv->byPreambleType, + rts_time =vnt_get_frame_time (priv->preamble_type, pkt_type,20 , priv->top_cck_basic_rate); - cts_time =vnt_get_frame_time (priv->byPreambleType, pkt_type, + cts_time =vnt_get_frame_time (priv->preamble_type, pkt_type,14 , priv->top_cck_basic_rate); - ack_time =vnt_get_frame_time (priv->byPreambleType, pkt_type, + ack_time =vnt_get_frame_time (priv->preamble_type, pkt_type,14 , priv->top_ofdm_basic_rate); }else if (rsv_type ==2 ) { - rts_time =vnt_get_frame_time (priv->byPreambleType, pkt_type, + rts_time =vnt_get_frame_time (priv->preamble_type, pkt_type,20 , priv->top_ofdm_basic_rate); - cts_time = ack_time =vnt_get_frame_time (priv->byPreambleType, + cts_time = ack_time =vnt_get_frame_time (priv->preamble_type, pkt_type,14 , priv->top_ofdm_basic_rate); }else if (rsv_type ==3 ) { - cts_time =vnt_get_frame_time (priv->byPreambleType, pkt_type, + cts_time =vnt_get_frame_time (priv->preamble_type, pkt_type,14 , priv->top_cck_basic_rate); - ack_time =vnt_get_frame_time (priv->byPreambleType, pkt_type, + ack_time =vnt_get_frame_time (priv->preamble_type, pkt_type,14 , priv->top_ofdm_basic_rate); rrv_time = cts_time + ack_time + data_time +2 * priv->sifs;
@@ -187,10 +187,10 @@ static __le16 vnt_get_duration_le(struct vnt_private *piv,if (need_ack) {if (pkt_type ==PK_TYPE_11B ) - ack_time =vnt_get_frame_time (piv->byPreambleType, + ack_time =vnt_get_frame_time (piv->preamble_type, pkt_type,14 , piv->top_cck_basic_rate);else - ack_time =vnt_get_frame_time (piv->byPreambleType, + ack_time =vnt_get_frame_time (piv->preamble_type, pkt_type,14 , piv->top_ofdm_basic_rate);return cpu_to_le16 ((u16)(piv->sifs + ack_time));
@@ -209,7 +209,7 @@ static __le16 vnt_get_rtscts_duration_le(struct vnt_private *priv, u8 dur_type,case RTSDUR_BA :case RTSDUR_BA_F0 :case RTSDUR_BA_F1 : - cts_time =vnt_get_frame_time (priv->byPreambleType, + cts_time =vnt_get_frame_time (priv->preamble_type, pkt_type,14 , priv->top_cck_basic_rate); dur_time = cts_time +2 * priv->sifs + vnt_get_rsvtime(priv, pkt_type,
@@ -219,7 +219,7 @@ static __le16 vnt_get_rtscts_duration_le(struct vnt_private *priv, u8 dur_type,case RTSDUR_AA :case RTSDUR_AA_F0 :case RTSDUR_AA_F1 : - cts_time =vnt_get_frame_time (priv->byPreambleType, + cts_time =vnt_get_frame_time (priv->preamble_type, pkt_type,14 , priv->top_ofdm_basic_rate); dur_time = cts_time +2 * priv->sifs + vnt_get_rsvtime(priv, pkt_type,
@@ -825,9 +825,9 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb) tx_buffer_head->wFIFOCtl |=FIFOCTL_LRETRY ;if (tx_rate->flags &IEEE80211_TX_RC_USE_SHORT_PREAMBLE ) - priv->byPreambleType =PREAMBLE_SHORT ; + priv->preamble_type =PREAMBLE_SHORT ;else - priv->byPreambleType =PREAMBLE_LONG ; + priv->preamble_type =PREAMBLE_LONG ;if (tx_rate->flags &IEEE80211_TX_RC_USE_RTS_CTS ) { need_rts = true;
Signature · 1 line
2.0.1
PATCH 8/25 staging: vt6656: struct vnt_private rf power table remove camel case
In reply to Malcolm PriestleyCamel case changes
byCCKPwr -> cck_pwr
byOFDMPwrG -> ofdm_pwr_g
byOFDMPwrA -> ofdm_pwr_a
byCurPwr -> power
abyCCKPwrTbl -> cck_pwr_tbl
abyOFDMPwrTbl -> ofdm_pwr_tbl
abyOFDMAPwrTbl -> ofdm_a_pwr_tbl
--- drivers/staging/vt6656/device.h | 14 +++++++------- drivers/staging/vt6656/main_usb.c | 30 +++++++++++++++--------------- drivers/staging/vt6656/rf.c | 14 +++++++------- 3 files changed, 29 insertions(+), 29 deletions(-)
drivers/staging/vt6656/device.h +7 -7
@@ -341,13 +341,13 @@ struct vnt_private {u8 preamble_type;/* For RF Power table */ -u8 byCCKPwr; -u8 byOFDMPwrG; -u8 byOFDMPwrA; -u8 byCurPwr; -u8 abyCCKPwrTbl[14 ]; -u8 abyOFDMPwrTbl[14 ]; -u8 abyOFDMAPwrTbl[42 ]; +u8 cck_pwr; +u8 ofdm_pwr_g; +u8 ofdm_pwr_a; +u8 power; +u8 cck_pwr_tbl[14 ]; +u8 ofdm_pwr_tbl[14 ]; +u8 ofdm_a_pwr_tbl[42 ];u16 wCurrentRate;u16 tx_rate_fb0;
drivers/staging/vt6656/main_usb.c +15 -15
@@ -199,21 +199,21 @@ static int device_init_registers(struct vnt_private *priv) priv->top_cck_basic_rate =RATE_1M ;/* target to IF pin while programming to RF chip */ - priv->byCurPwr =0xFF ; + priv->power =0xFF ; - priv->byCCKPwr = priv->eeprom[EEP_OFS_PWR_CCK ]; - priv->byOFDMPwrG = priv->eeprom[EEP_OFS_PWR_OFDMG ]; + priv->cck_pwr = priv->eeprom[EEP_OFS_PWR_CCK ]; + priv->ofdm_pwr_g = priv->eeprom[EEP_OFS_PWR_OFDMG ];/* load power table */ for (ii =0 ; ii <14 ; ii++) { - priv->abyCCKPwrTbl[ii] = + priv->cck_pwr_tbl[ii] = priv->eeprom[ii +EEP_OFS_CCK_PWR_TBL ]; +if (priv->cck_pwr_tbl[ii] ==0 ) + priv->cck_pwr_tbl[ii] = priv->cck_pwr; -if (priv->abyCCKPwrTbl[ii] ==0 ) - priv->abyCCKPwrTbl[ii] = priv->byCCKPwr; - priv->abyOFDMPwrTbl[ii] = + priv->ofdm_pwr_tbl[ii] = priv->eeprom[ii +EEP_OFS_OFDM_PWR_TBL ]; -if (priv->abyOFDMPwrTbl[ii] ==0 ) - priv->abyOFDMPwrTbl[ii] = priv->byOFDMPwrG; +if (priv->ofdm_pwr_tbl[ii] ==0 ) + priv->ofdm_pwr_tbl[ii] = priv->ofdm_pwr_g; }/*
@@ -221,19 +221,19 @@ static int device_init_registers(struct vnt_private *priv)* then need to recover 12, 13, 14 channels with 11 channel */ for (ii =11 ; ii <14 ; ii++) { - priv->abyCCKPwrTbl[ii] = priv->abyCCKPwrTbl[10 ]; - priv->abyOFDMPwrTbl[ii] = priv->abyOFDMPwrTbl[10 ]; + priv->cck_pwr_tbl[ii] = priv->cck_pwr_tbl[10 ]; + priv->ofdm_pwr_tbl[ii] = priv->ofdm_pwr_tbl[10 ]; } - priv->byOFDMPwrA =0x34 ;/* same as RFbMA2829SelectChannel */ + priv->ofdm_pwr_a =0x34 ;/* same as RFbMA2829SelectChannel */ /* load OFDM A power table */ for (ii =0 ; ii <CB_MAX_CHANNEL_5G ; ii++) { - priv->abyOFDMAPwrTbl[ii] = + priv->ofdm_a_pwr_tbl[ii] = priv->eeprom[ii +EEP_OFS_OFDMA_PWR_TBL ]; -if (priv->abyOFDMAPwrTbl[ii] ==0 ) - priv->abyOFDMAPwrTbl[ii] = priv->byOFDMPwrA; +if (priv->ofdm_a_pwr_tbl[ii] ==0 ) + priv->ofdm_a_pwr_tbl[ii] = priv->ofdm_pwr_a; } antenna = priv->eeprom[EEP_OFS_ANTENNA ];
drivers/staging/vt6656/rf.c +7 -7
@@ -624,7 +624,7 @@ int vnt_rf_write_embedded(struct vnt_private *priv, u32 data)int vnt_rf_setpower (struct vnt_private *priv,u32 rate,u32 channel) {int ret = true; -u8 power = priv->byCCKPwr; +u8 power = priv->cck_pwr;if (channel ==0 )return -EINVAL ;
@@ -636,8 +636,8 @@ int vnt_rf_setpower(struct vnt_private *priv, u32 rate, u32 channel)case RATE_11M : channel--; -if (channel <sizeof (priv->abyCCKPwrTbl)) - power = priv->abyCCKPwrTbl[channel]; +if (channel <sizeof (priv->cck_pwr_tbl)) + power = priv->cck_pwr_tbl[channel];break ;case RATE_6M :case RATE_9M :
@@ -647,9 +647,9 @@ int vnt_rf_setpower(struct vnt_private *priv, u32 rate, u32 channel)case RATE_48M :case RATE_54M :if (channel >CB_MAX_CHANNEL_24G ) - power = priv->abyOFDMAPwrTbl[channel-15 ]; + power = priv->ofdm_a_pwr_tbl[channel-15 ];else - power = priv->abyOFDMPwrTbl[channel-1 ]; + power = priv->ofdm_pwr_tbl[channel-1 ];break ; }
@@ -694,10 +694,10 @@ int vnt_rf_set_txpower(struct vnt_private *priv, u8 power, u32 rate)if (power >VNT_RF_MAX_POWER ) power =VNT_RF_MAX_POWER ; -if (priv->byCurPwr == power) +if (priv->power == power)return true; - priv->byCurPwr = power; + priv->power = power;switch (priv->rf_type) {case RF_AL2230 :
Signature · 1 line
2.0.1
PATCH 9/25 staging: vt6656: struct vnt_private replace wCurrentRate with current_rate
In reply to Malcolm PriestleyRemoving type prefix and camel case.
--- drivers/staging/vt6656/device.h | 2 +- drivers/staging/vt6656/main_usb.c | 8 ++++---- drivers/staging/vt6656/rxtx.c | 4 ++-- drivers/staging/vt6656/wcmd.c | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-)
drivers/staging/vt6656/device.h +1 -1
@@ -349,7 +349,7 @@ struct vnt_private {u8 ofdm_pwr_tbl[14 ];u8 ofdm_a_pwr_tbl[42 ]; -u16 wCurrentRate; +u16 current_rate;u16 tx_rate_fb0;u16 tx_rate_fb1;
drivers/staging/vt6656/main_usb.c +4 -4
@@ -718,11 +718,11 @@ static int vnt_config(struct ieee80211_hw *hw, u32 changed)if (changed &IEEE80211_CONF_CHANGE_POWER ) {if (priv->bb_type ==BB_TYPE_11B ) - priv->wCurrentRate =RATE_1M ; + priv->current_rate =RATE_1M ;else - priv->wCurrentRate =RATE_54M ; + priv->current_rate =RATE_54M ; -vnt_rf_setpower (priv, priv->wCurrentRate, +vnt_rf_setpower (priv, priv->current_rate, conf->chandef.chan->hw_value); }
@@ -778,7 +778,7 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw, }if (changed &BSS_CHANGED_TXPOWER ) -vnt_rf_setpower (priv, priv->wCurrentRate, +vnt_rf_setpower (priv, priv->current_rate, conf->chandef.chan->hw_value);if (changed &BSS_CHANGED_BEACON_ENABLED ) {
drivers/staging/vt6656/rxtx.c +2 -2
@@ -764,9 +764,9 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb) rate =ieee80211_get_tx_rate (priv->hw, info); current_rate = rate->hw_value; -if (priv->wCurrentRate != current_rate && +if (priv->current_rate != current_rate && !(priv->hw->conf.flags &IEEE80211_CONF_OFFCHANNEL )) { - priv->wCurrentRate = current_rate; + priv->current_rate = current_rate;vnt_schedule_command (priv,WLAN_CMD_SETPOWER ); }
drivers/staging/vt6656/wcmd.c +1 -1
@@ -139,7 +139,7 @@ void vnt_run_command(struct work_struct *work)case WLAN_CMD_SETPOWER_START : -vnt_rf_setpower (priv, priv->wCurrentRate, +vnt_rf_setpower (priv, priv->current_rate, priv->hw->conf.chandef.chan->hw_value);break ;
Signature · 1 line
2.0.1
PATCH 10/25 staging: vt6656: struct vnt_private remove camel case retry limit
In reply to Malcolm Priestleycamel case changes
byShortRetryLimit -> short_retry_limit
byLongRetryLimit -> long_retry_limit
--- drivers/staging/vt6656/device.h | 4 ++-- drivers/staging/vt6656/main_usb.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/vt6656/device.h +2 -2
@@ -353,8 +353,8 @@ struct vnt_private {u16 tx_rate_fb0;u16 tx_rate_fb1; -u8 byShortRetryLimit; -u8 byLongRetryLimit; +u8 short_retry_limit; +u8 long_retry_limit;enum nl80211_iftype op_mode;
drivers/staging/vt6656/main_usb.c +4 -4
@@ -118,8 +118,8 @@ static void device_set_options(struct vnt_private *priv)else priv->num_rcb = vnt_rx_buffers; - priv->byShortRetryLimit =SHORT_RETRY_DEF ; - priv->byLongRetryLimit =LONG_RETRY_DEF ; + priv->short_retry_limit =SHORT_RETRY_DEF ; + priv->long_retry_limit =LONG_RETRY_DEF ; priv->op_mode =NL80211_IFTYPE_UNSPECIFIED ; priv->bb_type =BBP_TYPE_DEF ; priv->packet_type = priv->bb_type;
@@ -166,8 +166,8 @@ static int device_init_registers(struct vnt_private *priv) init_cmd->exist_sw_net_addr = priv->exist_sw_net_addr;for (ii =0 ; ii <6 ; ii++) init_cmd->sw_net_addr[ii] = priv->current_net_addr[ii]; - init_cmd->short_retry_limit = priv->byShortRetryLimit; - init_cmd->long_retry_limit = priv->byLongRetryLimit; + init_cmd->short_retry_limit = priv->short_retry_limit; + init_cmd->long_retry_limit = priv->long_retry_limit;/* issue card_init command to device */ status = vnt_control_out(priv,
Signature · 1 line
2.0.1
PATCH 11/25 staging: vt6656: struct vnt_private replace bShortSlotTime with short_slot_time
In reply to Malcolm PriestleyRemoving type prefix and camel case
--- drivers/staging/vt6656/baseband.c | 4 ++-- drivers/staging/vt6656/card.c | 2 +- drivers/staging/vt6656/device.h | 2 +- drivers/staging/vt6656/main_usb.c | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-)
drivers/staging/vt6656/baseband.c +2 -2
@@ -526,7 +526,7 @@ void vnt_set_short_slot_time(struct vnt_private *priv) {u8 bb_vga =0 ; -if (priv->bShortSlotTime) +if (priv->short_slot_time) priv->bb_rx_conf &=0xdf ;else priv->bb_rx_conf |=0x20 ;
@@ -545,7 +545,7 @@ void vnt_set_vga_gain_offset(struct vnt_private *priv, u8 data)vnt_control_out_u8 (priv,MESSAGE_REQUEST_BBREG ,0xE7 , data);/* patch for 3253B0 Baseband with Cardbus module */ -if (priv->bShortSlotTime) +if (priv->short_slot_time) priv->bb_rx_conf &=0xdf ;/* 1101 1111 */ else priv->bb_rx_conf |=0x20 ;/* 0010 0000 */
drivers/staging/vt6656/card.c +1 -1
@@ -381,7 +381,7 @@ void vnt_update_ifs(struct vnt_private *priv) priv->sifs =C_SIFS_BG ; -if (priv->bShortSlotTime) +if (priv->short_slot_time) priv->slot =C_SLOT_SHORT ;else priv->slot =C_SLOT_LONG ;
drivers/staging/vt6656/device.h +1 -1
@@ -358,7 +358,7 @@ struct vnt_private {enum nl80211_iftype op_mode; -int bShortSlotTime; +int short_slot_time;int bBarkerPreambleMd;/* Power save */
drivers/staging/vt6656/main_usb.c +4 -4
@@ -342,9 +342,9 @@ static int device_init_registers(struct vnt_private *priv)* set Short Slot Time, xIFS, and RSPINF */ if (priv->bb_type ==BB_TYPE_11A ) - priv->bShortSlotTime = true; + priv->short_slot_time = true;else - priv->bShortSlotTime = false; + priv->short_slot_time = false;vnt_set_short_slot_time (priv);
@@ -768,9 +768,9 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw,if (changed &BSS_CHANGED_ERP_SLOT ) {if (conf->use_short_slot) - priv->bShortSlotTime = true; + priv->short_slot_time = true;else - priv->bShortSlotTime = false; + priv->short_slot_time = false;vnt_set_short_slot_time (priv);vnt_set_vga_gain_offset (priv, priv->abyBBVGA[0 ]);
Signature · 1 line
2.0.1
PATCH 12/25 staging: vt6656: struct vnt_private remove dead variable bBarkerPreambleMd
In reply to Malcolm Priestley--- drivers/staging/vt6656/device.h | 1 - 1 file changed, 1 deletion(-)
drivers/staging/vt6656/device.h +0 -1
@@ -359,7 +359,6 @@ struct vnt_private {enum nl80211_iftype op_mode;int short_slot_time; -int bBarkerPreambleMd;/* Power save */ u16 current_aid;
Signature · 1 line
2.0.1
PATCH 13/25 staging: vt6656: struct vnt_private replace wSeqCounter with seq_counter
In reply to Malcolm PriestleyRemoving type prefix and camel case
--- drivers/staging/vt6656/device.h | 2 +- drivers/staging/vt6656/rxtx.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/vt6656/device.h +1 -1
@@ -364,7 +364,7 @@ struct vnt_private {u16 current_aid;/* Beacon releated */ -u16 wSeqCounter; +u16 seq_counter;enum vnt_cmd_state command_state;
drivers/staging/vt6656/rxtx.c +5 -5
@@ -914,7 +914,7 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb) tx_key, skb, tx_body_size, mic_hdr); } - priv->wSeqCounter = (le16_to_cpu (hdr->seq_ctrl) & + priv->seq_counter = (le16_to_cpu (hdr->seq_ctrl) &IEEE80211_SCTL_SEQ ) >>4 ; tx_buffer->tx_byte_count =cpu_to_le16 (tx_bytes);
@@ -1004,12 +1004,12 @@ static int vnt_beacon_xmit(struct vnt_private *priv,if (info->flags &IEEE80211_TX_CTL_ASSIGN_SEQ ) {struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)mgmt_hdr; hdr->duration_id =0 ; - hdr->seq_ctrl =cpu_to_le16 (priv->wSeqCounter <<4 ); + hdr->seq_ctrl =cpu_to_le16 (priv->seq_counter <<4 ); } - priv->wSeqCounter++; -if (priv->wSeqCounter >0x0fff ) - priv->wSeqCounter =0 ; + priv->seq_counter++; +if (priv->seq_counter >0x0fff ) + priv->seq_counter =0 ; count =sizeof (struct vnt_tx_short_buf_head ) + skb->len;
Signature · 1 line
2.0.1
PATCH 14/25 staging: vt6656: struct vnt_private replace byAutoFBCtrl with auto_fb_ctrl
In reply to Malcolm PriestleyRemoving type prefix and camel case.
--- drivers/staging/vt6656/device.h | 2 +- drivers/staging/vt6656/main_usb.c | 4 ++-- drivers/staging/vt6656/rxtx.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/vt6656/device.h +1 -1
@@ -380,7 +380,7 @@ struct vnt_private {unsigned long key_entry_inuse; -u8 byAutoFBCtrl; +u8 auto_fb_ctrl;/* For Update BaseBand VGA Gain Offset */ u8 abyBBVGA[BB_VGA_LEVEL ];
drivers/staging/vt6656/main_usb.c +2 -2
@@ -123,7 +123,7 @@ static void device_set_options(struct vnt_private *priv) priv->op_mode =NL80211_IFTYPE_UNSPECIFIED ; priv->bb_type =BBP_TYPE_DEF ; priv->packet_type = priv->bb_type; - priv->byAutoFBCtrl =AUTO_FB_0 ; + priv->auto_fb_ctrl =AUTO_FB_0 ; priv->preamble_type =0 ; priv->exist_sw_net_addr = false; }
@@ -280,7 +280,7 @@ static int device_init_registers(struct vnt_private *priv)vnt_set_antenna_mode (priv, priv->rx_antenna_mode);/* get Auto Fall Back type */ - priv->byAutoFBCtrl =AUTO_FB_0 ; + priv->auto_fb_ctrl =AUTO_FB_0 ;/* default Auto Mode */ priv->bb_type =BB_TYPE_11G ;
drivers/staging/vt6656/rxtx.c +2 -2
@@ -866,7 +866,7 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)/* legacy rates TODO use ieee80211_tx_rate */ if (current_rate >=RATE_18M &&ieee80211_is_data (hdr->frame_control)) { -if (priv->byAutoFBCtrl ==AUTO_FB_0 ) { +if (priv->auto_fb_ctrl ==AUTO_FB_0 ) { tx_buffer_head->wFIFOCtl |=FIFOCTL_AUTO_FB_0 ; priv->tx_rate_fb0 =
@@ -875,7 +875,7 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb) vnt_fb_opt0[FB_RATE1 ][current_rate -RATE_18M ]; fb_option =AUTO_FB_0 ; - }else if (priv->byAutoFBCtrl ==AUTO_FB_1 ) { + }else if (priv->auto_fb_ctrl ==AUTO_FB_1 ) { tx_buffer_head->wFIFOCtl |=FIFOCTL_AUTO_FB_1 ; priv->tx_rate_fb0 =
Signature · 1 line
2.0.1
PATCH 15/25 staging: vt6656: struct vnt_private replace abyBBVGA with bb_vga
In reply to Malcolm PriestleyRemoving type prefix and camel case.
--- drivers/staging/vt6656/baseband.c | 34 +++++++++++++++++----------------- drivers/staging/vt6656/card.c | 18 +++++++++--------- drivers/staging/vt6656/device.h | 2 +- drivers/staging/vt6656/main_usb.c | 2 +- 4 files changed, 28 insertions(+), 28 deletions(-)
drivers/staging/vt6656/baseband.c +17 -17
@@ -406,10 +406,10 @@ int vnt_vt3184_init(struct vnt_private *priv) agc = vnt_vt3184_agc; length_agc =sizeof (vnt_vt3184_agc); - priv->abyBBVGA[0 ] =0x1C ; - priv->abyBBVGA[1 ] =0x10 ; - priv->abyBBVGA[2 ] =0x0 ; - priv->abyBBVGA[3 ] =0x0 ; + priv->bb_vga[0 ] =0x1C ; + priv->bb_vga[1 ] =0x10 ; + priv->bb_vga[2 ] =0x0 ; + priv->bb_vga[3 ] =0x0 ; priv->ldBmThreshold[0 ] =-70 ; priv->ldBmThreshold[1 ] =-48 ; priv->ldBmThreshold[2 ] =0 ;
@@ -423,10 +423,10 @@ int vnt_vt3184_init(struct vnt_private *priv) addr[0xd7 ] =0x06 ; - priv->abyBBVGA[0 ] =0x1c ; - priv->abyBBVGA[1 ] =0x10 ; - priv->abyBBVGA[2 ] =0x0 ; - priv->abyBBVGA[3 ] =0x0 ; + priv->bb_vga[0 ] =0x1c ; + priv->bb_vga[1 ] =0x10 ; + priv->bb_vga[2 ] =0x0 ; + priv->bb_vga[3 ] =0x0 ; priv->ldBmThreshold[0 ] =-70 ; priv->ldBmThreshold[1 ] =-48 ; priv->ldBmThreshold[2 ] =0 ;
@@ -439,10 +439,10 @@ int vnt_vt3184_init(struct vnt_private *priv) agc = vnt_vt3184_agc; length_agc =sizeof (vnt_vt3184_agc); - priv->abyBBVGA[0 ] =0x20 ; - priv->abyBBVGA[1 ] =0x10 ; - priv->abyBBVGA[2 ] =0x0 ; - priv->abyBBVGA[3 ] =0x0 ; + priv->bb_vga[0 ] =0x20 ; + priv->bb_vga[1 ] =0x10 ; + priv->bb_vga[2 ] =0x0 ; + priv->bb_vga[3 ] =0x0 ; priv->ldBmThreshold[0 ] =-70 ; priv->ldBmThreshold[1 ] =-48 ; priv->ldBmThreshold[2 ] =0 ;
@@ -457,10 +457,10 @@ int vnt_vt3184_init(struct vnt_private *priv) agc = vnt_vt3184_agc; length_agc =sizeof (vnt_vt3184_agc); - priv->abyBBVGA[0 ] =0x20 ; - priv->abyBBVGA[1 ] =0x10 ; - priv->abyBBVGA[2 ] =0x0 ; - priv->abyBBVGA[3 ] =0x0 ; + priv->bb_vga[0 ] =0x20 ; + priv->bb_vga[1 ] =0x10 ; + priv->bb_vga[2 ] =0x0 ; + priv->bb_vga[3 ] =0x0 ; priv->ldBmThreshold[0 ] =-70 ; priv->ldBmThreshold[1 ] =-48 ; priv->ldBmThreshold[2 ] =0 ;
@@ -533,7 +533,7 @@ void vnt_set_short_slot_time(struct vnt_private *priv)vnt_control_in_u8 (priv,MESSAGE_REQUEST_BBREG ,0xe7 , &bb_vga); -if (bb_vga == priv->abyBBVGA[0 ]) +if (bb_vga == priv->bb_vga[0 ]) priv->bb_rx_conf |=0x20 ;vnt_control_out_u8 (priv,MESSAGE_REQUEST_BBREG ,0x0a , priv->bb_rx_conf);
drivers/staging/vt6656/card.c +9 -9
@@ -807,25 +807,25 @@ void vnt_set_bss_mode(struct vnt_private *priv)if (priv->bb_type ==BB_TYPE_11A ) {if (priv->rf_type ==RF_AIROHA7230 ) { - priv->abyBBVGA[0 ] =0x20 ; + priv->bb_vga[0 ] =0x20 ;vnt_control_out_u8 (priv,MESSAGE_REQUEST_BBREG , -0xe7 , priv->abyBBVGA[0 ]); +0xe7 , priv->bb_vga[0 ]); } - priv->abyBBVGA[2 ] =0x10 ; - priv->abyBBVGA[3 ] =0x10 ; + priv->bb_vga[2 ] =0x10 ; + priv->bb_vga[3 ] =0x10 ; }else {if (priv->rf_type ==RF_AIROHA7230 ) { - priv->abyBBVGA[0 ] =0x1c ; + priv->bb_vga[0 ] =0x1c ;vnt_control_out_u8 (priv,MESSAGE_REQUEST_BBREG , -0xe7 , priv->abyBBVGA[0 ]); +0xe7 , priv->bb_vga[0 ]); } - priv->abyBBVGA[2 ] =0x0 ; - priv->abyBBVGA[3 ] =0x0 ; + priv->bb_vga[2 ] =0x0 ; + priv->bb_vga[3 ] =0x0 ; } -vnt_set_vga_gain_offset (priv, priv->abyBBVGA[0 ]); +vnt_set_vga_gain_offset (priv, priv->bb_vga[0 ]); }
drivers/staging/vt6656/device.h +1 -1
@@ -383,7 +383,7 @@ struct vnt_private {u8 auto_fb_ctrl;/* For Update BaseBand VGA Gain Offset */ -u8 abyBBVGA[BB_VGA_LEVEL ]; +u8 bb_vga[BB_VGA_LEVEL ];signed long ldBmThreshold[BB_VGA_LEVEL ];u8 byBBPreEDRSSI;
drivers/staging/vt6656/main_usb.c +1 -1
@@ -773,7 +773,7 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw, priv->short_slot_time = false;vnt_set_short_slot_time (priv); -vnt_set_vga_gain_offset (priv, priv->abyBBVGA[0 ]); +vnt_set_vga_gain_offset (priv, priv->bb_vga[0 ]);vnt_update_pre_ed_threshold (priv, false); }
Signature · 1 line
2.0.1
PATCH 16/25 staging: vt6656: struct vnt_private remove dead code ldBmThreshold
In reply to Malcolm PriestleyldBmThreshold was used in old function s_vCheckSensitivity which had been disabled in orginal vendors code.
--- drivers/staging/vt6656/baseband.c | 20 ++++---------------- drivers/staging/vt6656/device.h | 1 - 2 files changed, 4 insertions(+), 17 deletions(-)
drivers/staging/vt6656/baseband.c +4 -16
@@ -410,10 +410,7 @@ int vnt_vt3184_init(struct vnt_private *priv) priv->bb_vga[1 ] =0x10 ; priv->bb_vga[2 ] =0x0 ; priv->bb_vga[3 ] =0x0 ; - priv->ldBmThreshold[0 ] =-70 ; - priv->ldBmThreshold[1 ] =-48 ; - priv->ldBmThreshold[2 ] =0 ; - priv->ldBmThreshold[3 ] =0 ; + }else if (priv->rf_type ==RF_AIROHA7230 ) { priv->bb_rx_conf = vnt_vt3184_al2230[10 ]; length =sizeof (vnt_vt3184_al2230);
@@ -427,10 +424,7 @@ int vnt_vt3184_init(struct vnt_private *priv) priv->bb_vga[1 ] =0x10 ; priv->bb_vga[2 ] =0x0 ; priv->bb_vga[3 ] =0x0 ; - priv->ldBmThreshold[0 ] =-70 ; - priv->ldBmThreshold[1 ] =-48 ; - priv->ldBmThreshold[2 ] =0 ; - priv->ldBmThreshold[3 ] =0 ; + }else if ((priv->rf_type ==RF_VT3226 ) || (priv->rf_type ==RF_VT3226D0 )) { priv->bb_rx_conf = vnt_vt3184_vt3226d0[10 ];
@@ -443,10 +437,7 @@ int vnt_vt3184_init(struct vnt_private *priv) priv->bb_vga[1 ] =0x10 ; priv->bb_vga[2 ] =0x0 ; priv->bb_vga[3 ] =0x0 ; - priv->ldBmThreshold[0 ] =-70 ; - priv->ldBmThreshold[1 ] =-48 ; - priv->ldBmThreshold[2 ] =0 ; - priv->ldBmThreshold[3 ] =0 ; +/* Fix VT3226 DFC system timing issue */ vnt_mac_reg_bits_on (priv,MAC_REG_SOFTPWRCTL2 ,SOFTPWRCTL_RFLEOPT );
@@ -461,10 +452,7 @@ int vnt_vt3184_init(struct vnt_private *priv) priv->bb_vga[1 ] =0x10 ; priv->bb_vga[2 ] =0x0 ; priv->bb_vga[3 ] =0x0 ; - priv->ldBmThreshold[0 ] =-70 ; - priv->ldBmThreshold[1 ] =-48 ; - priv->ldBmThreshold[2 ] =0 ; - priv->ldBmThreshold[3 ] =0 ; +/* Fix VT3226 DFC system timing issue */ vnt_mac_reg_bits_on (priv,MAC_REG_SOFTPWRCTL2 ,SOFTPWRCTL_RFLEOPT );
drivers/staging/vt6656/device.h +0 -1
@@ -384,7 +384,6 @@ struct vnt_private {/* For Update BaseBand VGA Gain Offset */ u8 bb_vga[BB_VGA_LEVEL ]; -signed long ldBmThreshold[BB_VGA_LEVEL ];u8 byBBPreEDRSSI;u8 byBBPreEDIndex;
Signature · 1 line
2.0.1
PATCH 17/25 staging: vt6656: struct vnt_private replace byBBPreEDRSSI with bb_pre_ed_rssi
In reply to Malcolm PriestleyRemove type prefix and camel case.
--- drivers/staging/vt6656/baseband.c | 128 +++++++++++++++++++------------------- drivers/staging/vt6656/device.h | 2 +- drivers/staging/vt6656/dpc.c | 4 +- 3 files changed, 67 insertions(+), 67 deletions(-)
drivers/staging/vt6656/baseband.c +64 -64
@@ -580,69 +580,69 @@ void vnt_update_pre_ed_threshold(struct vnt_private *priv, int scanning)break ; } -if (priv->byBBPreEDRSSI <=45 ) { +if (priv->bb_pre_ed_rssi <=45 ) { ed_inx =20 ; cr_201 =0xff ; - }else if (priv->byBBPreEDRSSI <=46 ) { + }else if (priv->bb_pre_ed_rssi <=46 ) { ed_inx =19 ; cr_201 =0x1a ; - }else if (priv->byBBPreEDRSSI <=47 ) { + }else if (priv->bb_pre_ed_rssi <=47 ) { ed_inx =18 ; cr_201 =0x15 ; - }else if (priv->byBBPreEDRSSI <=49 ) { + }else if (priv->bb_pre_ed_rssi <=49 ) { ed_inx =17 ; cr_201 =0xe ; - }else if (priv->byBBPreEDRSSI <=51 ) { + }else if (priv->bb_pre_ed_rssi <=51 ) { ed_inx =16 ; cr_201 =0x9 ; - }else if (priv->byBBPreEDRSSI <=53 ) { + }else if (priv->bb_pre_ed_rssi <=53 ) { ed_inx =15 ; cr_201 =0x6 ; - }else if (priv->byBBPreEDRSSI <=55 ) { + }else if (priv->bb_pre_ed_rssi <=55 ) { ed_inx =14 ; cr_201 =0x3 ; - }else if (priv->byBBPreEDRSSI <=56 ) { + }else if (priv->bb_pre_ed_rssi <=56 ) { ed_inx =13 ; cr_201 =0x2 ; cr_206 =0xa0 ; - }else if (priv->byBBPreEDRSSI <=57 ) { + }else if (priv->bb_pre_ed_rssi <=57 ) { ed_inx =12 ; cr_201 =0x2 ; cr_206 =0x20 ; - }else if (priv->byBBPreEDRSSI <=58 ) { + }else if (priv->bb_pre_ed_rssi <=58 ) { ed_inx =11 ; cr_201 =0x1 ; cr_206 =0xa0 ; - }else if (priv->byBBPreEDRSSI <=59 ) { + }else if (priv->bb_pre_ed_rssi <=59 ) { ed_inx =10 ; cr_201 =0x1 ; cr_206 =0x54 ; - }else if (priv->byBBPreEDRSSI <=60 ) { + }else if (priv->bb_pre_ed_rssi <=60 ) { ed_inx =9 ; cr_201 =0x1 ; cr_206 =0x18 ; - }else if (priv->byBBPreEDRSSI <=61 ) { + }else if (priv->bb_pre_ed_rssi <=61 ) { ed_inx =8 ; cr_206 =0xe3 ; - }else if (priv->byBBPreEDRSSI <=62 ) { + }else if (priv->bb_pre_ed_rssi <=62 ) { ed_inx =7 ; cr_206 =0xb9 ; - }else if (priv->byBBPreEDRSSI <=63 ) { + }else if (priv->bb_pre_ed_rssi <=63 ) { ed_inx =6 ; cr_206 =0x93 ; - }else if (priv->byBBPreEDRSSI <=64 ) { + }else if (priv->bb_pre_ed_rssi <=64 ) { ed_inx =5 ; cr_206 =0x79 ; - }else if (priv->byBBPreEDRSSI <=65 ) { + }else if (priv->bb_pre_ed_rssi <=65 ) { ed_inx =4 ; cr_206 =0x62 ; - }else if (priv->byBBPreEDRSSI <=66 ) { + }else if (priv->bb_pre_ed_rssi <=66 ) { ed_inx =3 ; cr_206 =0x51 ; - }else if (priv->byBBPreEDRSSI <=67 ) { + }else if (priv->bb_pre_ed_rssi <=67 ) { ed_inx =2 ; cr_206 =0x43 ; - }else if (priv->byBBPreEDRSSI <=68 ) { + }else if (priv->bb_pre_ed_rssi <=68 ) { ed_inx =1 ; cr_206 =0x36 ; }else {
@@ -659,75 +659,75 @@ void vnt_update_pre_ed_threshold(struct vnt_private *priv, int scanning)break ; } -if (priv->byBBPreEDRSSI <=41 ) { +if (priv->bb_pre_ed_rssi <=41 ) { ed_inx =22 ; cr_201 =0xff ; - }else if (priv->byBBPreEDRSSI <=42 ) { + }else if (priv->bb_pre_ed_rssi <=42 ) { ed_inx =21 ; cr_201 =0x36 ; - }else if (priv->byBBPreEDRSSI <=43 ) { + }else if (priv->bb_pre_ed_rssi <=43 ) { ed_inx =20 ; cr_201 =0x26 ; - }else if (priv->byBBPreEDRSSI <=45 ) { + }else if (priv->bb_pre_ed_rssi <=45 ) { ed_inx =19 ; cr_201 =0x18 ; - }else if (priv->byBBPreEDRSSI <=47 ) { + }else if (priv->bb_pre_ed_rssi <=47 ) { ed_inx =18 ; cr_201 =0x11 ; - }else if (priv->byBBPreEDRSSI <=49 ) { + }else if (priv->bb_pre_ed_rssi <=49 ) { ed_inx =17 ; cr_201 =0xa ; - }else if (priv->byBBPreEDRSSI <=51 ) { + }else if (priv->bb_pre_ed_rssi <=51 ) { ed_inx =16 ; cr_201 =0x7 ; - }else if (priv->byBBPreEDRSSI <=53 ) { + }else if (priv->bb_pre_ed_rssi <=53 ) { ed_inx =15 ; cr_201 =0x4 ; - }else if (priv->byBBPreEDRSSI <=55 ) { + }else if (priv->bb_pre_ed_rssi <=55 ) { ed_inx =14 ; cr_201 =0x2 ; cr_206 =0xc0 ; - }else if (priv->byBBPreEDRSSI <=56 ) { + }else if (priv->bb_pre_ed_rssi <=56 ) { ed_inx =13 ; cr_201 =0x2 ; cr_206 =0x30 ; - }else if (priv->byBBPreEDRSSI <=57 ) { + }else if (priv->bb_pre_ed_rssi <=57 ) { ed_inx =12 ; cr_201 =0x1 ; cr_206 =0xb0 ; - }else if (priv->byBBPreEDRSSI <=58 ) { + }else if (priv->bb_pre_ed_rssi <=58 ) { ed_inx =11 ; cr_201 =0x1 ; cr_206 =0x70 ; - }else if (priv->byBBPreEDRSSI <=59 ) { + }else if (priv->bb_pre_ed_rssi <=59 ) { ed_inx =10 ; cr_201 =0x1 ; cr_206 =0x30 ; - }else if (priv->byBBPreEDRSSI <=60 ) { + }else if (priv->bb_pre_ed_rssi <=60 ) { ed_inx =9 ; cr_206 =0xea ; - }else if (priv->byBBPreEDRSSI <=61 ) { + }else if (priv->bb_pre_ed_rssi <=61 ) { ed_inx =8 ; cr_206 =0xc0 ; - }else if (priv->byBBPreEDRSSI <=62 ) { + }else if (priv->bb_pre_ed_rssi <=62 ) { ed_inx =7 ; cr_206 =0x9c ; - }else if (priv->byBBPreEDRSSI <=63 ) { + }else if (priv->bb_pre_ed_rssi <=63 ) { ed_inx =6 ; cr_206 =0x80 ; - }else if (priv->byBBPreEDRSSI <=64 ) { + }else if (priv->bb_pre_ed_rssi <=64 ) { ed_inx =5 ; cr_206 =0x68 ; - }else if (priv->byBBPreEDRSSI <=65 ) { + }else if (priv->bb_pre_ed_rssi <=65 ) { ed_inx =4 ; cr_206 =0x52 ; - }else if (priv->byBBPreEDRSSI <=66 ) { + }else if (priv->bb_pre_ed_rssi <=66 ) { ed_inx =3 ; cr_206 =0x43 ; - }else if (priv->byBBPreEDRSSI <=67 ) { + }else if (priv->bb_pre_ed_rssi <=67 ) { ed_inx =2 ; cr_206 =0x36 ; - }else if (priv->byBBPreEDRSSI <=68 ) { + }else if (priv->bb_pre_ed_rssi <=68 ) { ed_inx =1 ; cr_206 =0x2d ; }else {
@@ -743,69 +743,69 @@ void vnt_update_pre_ed_threshold(struct vnt_private *priv, int scanning)break ; } -if (priv->byBBPreEDRSSI <=41 ) { +if (priv->bb_pre_ed_rssi <=41 ) { ed_inx =20 ; cr_201 =0xff ; - }else if (priv->byBBPreEDRSSI <=42 ) { + }else if (priv->bb_pre_ed_rssi <=42 ) { ed_inx =19 ; cr_201 =0x36 ; - }else if (priv->byBBPreEDRSSI <=43 ) { + }else if (priv->bb_pre_ed_rssi <=43 ) { ed_inx =18 ; cr_201 =0x26 ; - }else if (priv->byBBPreEDRSSI <=45 ) { + }else if (priv->bb_pre_ed_rssi <=45 ) { ed_inx =17 ; cr_201 =0x18 ; - }else if (priv->byBBPreEDRSSI <=47 ) { + }else if (priv->bb_pre_ed_rssi <=47 ) { ed_inx =16 ; cr_201 =0x11 ; - }else if (priv->byBBPreEDRSSI <=49 ) { + }else if (priv->bb_pre_ed_rssi <=49 ) { ed_inx =15 ; cr_201 =0xa ; - }else if (priv->byBBPreEDRSSI <=51 ) { + }else if (priv->bb_pre_ed_rssi <=51 ) { ed_inx =14 ; cr_201 =0x7 ; - }else if (priv->byBBPreEDRSSI <=53 ) { + }else if (priv->bb_pre_ed_rssi <=53 ) { ed_inx =13 ; cr_201 =0x4 ; - }else if (priv->byBBPreEDRSSI <=55 ) { + }else if (priv->bb_pre_ed_rssi <=55 ) { ed_inx =12 ; cr_201 =0x2 ; cr_206 =0xc0 ; - }else if (priv->byBBPreEDRSSI <=56 ) { + }else if (priv->bb_pre_ed_rssi <=56 ) { ed_inx =11 ; cr_201 =0x2 ; cr_206 =0x30 ; - }else if (priv->byBBPreEDRSSI <=57 ) { + }else if (priv->bb_pre_ed_rssi <=57 ) { ed_inx =10 ; cr_201 =0x1 ; cr_206 =0xb0 ; - }else if (priv->byBBPreEDRSSI <=58 ) { + }else if (priv->bb_pre_ed_rssi <=58 ) { ed_inx =9 ; cr_201 =0x1 ; cr_206 =0x70 ; - }else if (priv->byBBPreEDRSSI <=59 ) { + }else if (priv->bb_pre_ed_rssi <=59 ) { ed_inx =8 ; cr_201 =0x1 ; cr_206 =0x30 ; - }else if (priv->byBBPreEDRSSI <=60 ) { + }else if (priv->bb_pre_ed_rssi <=60 ) { ed_inx =7 ; cr_206 =0xea ; - }else if (priv->byBBPreEDRSSI <=61 ) { + }else if (priv->bb_pre_ed_rssi <=61 ) { ed_inx =6 ; cr_206 =0xc0 ; - }else if (priv->byBBPreEDRSSI <=62 ) { + }else if (priv->bb_pre_ed_rssi <=62 ) { ed_inx =5 ; cr_206 =0x9c ; - }else if (priv->byBBPreEDRSSI <=63 ) { + }else if (priv->bb_pre_ed_rssi <=63 ) { ed_inx =4 ; cr_206 =0x80 ; - }else if (priv->byBBPreEDRSSI <=64 ) { + }else if (priv->bb_pre_ed_rssi <=64 ) { ed_inx =3 ; cr_206 =0x68 ; - }else if (priv->byBBPreEDRSSI <=65 ) { + }else if (priv->bb_pre_ed_rssi <=65 ) { ed_inx =2 ; cr_206 =0x52 ; - }else if (priv->byBBPreEDRSSI <=66 ) { + }else if (priv->bb_pre_ed_rssi <=66 ) { ed_inx =1 ; cr_206 =0x43 ; }else {
@@ -821,8 +821,8 @@ void vnt_update_pre_ed_threshold(struct vnt_private *priv, int scanning) priv->byBBPreEDIndex = ed_inx; -dev_dbg (&priv->usb->dev,"%s byBBPreEDRSSI %d\n" , - __func__, priv->byBBPreEDRSSI); +dev_dbg (&priv->usb->dev,"%s bb_pre_ed_rssi %d\n" , + __func__, priv->bb_pre_ed_rssi);if (!cr_201 && !cr_206)return ;
drivers/staging/vt6656/device.h +1 -1
@@ -385,7 +385,7 @@ struct vnt_private {/* For Update BaseBand VGA Gain Offset */ u8 bb_vga[BB_VGA_LEVEL ]; -u8 byBBPreEDRSSI; +u8 bb_pre_ed_rssi;u8 byBBPreEDIndex;/* command timer */
drivers/staging/vt6656/dpc.c +2 -2
@@ -152,8 +152,8 @@ int vnt_rx_data(struct vnt_private *priv, struct vnt_rcb *ptr_rcb,vnt_rf_rssi_to_dbm (priv, *rssi, &rx_dbm); - priv->byBBPreEDRSSI = (u8 )rx_dbm +1 ; - priv->current_rssi = priv->byBBPreEDRSSI; + priv->bb_pre_ed_rssi = (u8 )rx_dbm +1 ; + priv->current_rssi = priv->bb_pre_ed_rssi; frame = skb_data +8 ;
Signature · 1 line
2.0.1
PATCH 18/25 staging: vt6656: struct vnt_private rename byBBPreEDIndex with bb_pre_ed_index
In reply to Malcolm PriestleyRemoving type prefix and camel case.
--- drivers/staging/vt6656/baseband.c | 6 +++--- drivers/staging/vt6656/device.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/vt6656/baseband.c +3 -3
@@ -568,7 +568,7 @@ void vnt_exit_deep_sleep(struct vnt_private *priv)void vnt_update_pre_ed_threshold (struct vnt_private *priv,int scanning) {u8 cr_201 =0x0 , cr_206 =0x0 ; -u8 ed_inx = priv->byBBPreEDIndex; +u8 ed_inx = priv->bb_pre_ed_index;switch (priv->rf_type) {case RF_AL2230 :
@@ -816,10 +816,10 @@ void vnt_update_pre_ed_threshold(struct vnt_private *priv, int scanning) } -if (ed_inx == priv->byBBPreEDIndex && !scanning) +if (ed_inx == priv->bb_pre_ed_index && !scanning)return ; - priv->byBBPreEDIndex = ed_inx; + priv->bb_pre_ed_index = ed_inx;dev_dbg (&priv->usb->dev,"%s bb_pre_ed_rssi %d\n" , __func__, priv->bb_pre_ed_rssi);
drivers/staging/vt6656/device.h +1 -1
@@ -386,7 +386,7 @@ struct vnt_private {u8 bb_vga[BB_VGA_LEVEL ];u8 bb_pre_ed_rssi; -u8 byBBPreEDIndex; +u8 bb_pre_ed_index;/* command timer */ struct delayed_work run_command_work;
Signature · 1 line
2.0.1
PATCH 19/25 staging: vt6656: dead code remove channel switch.
In reply to Malcolm PriestleyThe driver needs to do anything special for channel switch.
--- drivers/staging/vt6656/device.h | 4 ---- drivers/staging/vt6656/int.c | 8 -------- drivers/staging/vt6656/wcmd.c | 8 -------- drivers/staging/vt6656/wcmd.h | 4 +--- 4 files changed, 1 insertion(+), 23 deletions(-)
drivers/staging/vt6656/device.h +0 -4
@@ -391,10 +391,6 @@ struct vnt_private {/* command timer */ struct delayed_work run_command_work; -int bChannelSwitch; -u8 byNewChannel; -u8 byChannelSwitchCount; -struct ieee80211_low_level_stats low_stats; };
drivers/staging/vt6656/int.c +0 -8
@@ -153,14 +153,6 @@ void vnt_int_process_data(struct vnt_private *priv)if (priv->hw->conf.flags &IEEE80211_CONF_PS )vnt_schedule_command (priv,WLAN_CMD_TBTT_WAKEUP ); -#if 0 /* TODO channel switch */ -if (priv->bChannelSwitch) { - priv->byChannelSwitchCount--; -if (priv->byChannelSwitchCount ==0 ) -vnt_schedule_command (priv, -WLAN_CMD_11H_CHSW ); - } -#endif } priv->current_tsf =le64_to_cpu (int_data->tsf);
drivers/staging/vt6656/wcmd.c +0 -8
@@ -83,10 +83,6 @@ static int vnt_cmd_complete(struct vnt_private *priv) priv->command_state =WLAN_CMD_CHANGE_ANTENNA_START ;break ; -case WLAN_CMD_11H_CHSW : - priv->command_state =WLAN_CMD_11H_CHSW_START ; -break ; -default :break ; }
@@ -163,10 +159,6 @@ void vnt_run_command(struct work_struct *work) }break ; -case WLAN_CMD_11H_CHSW_START : -vnt_set_channel (priv, priv->hw->conf.chandef.chan->hw_value); -break ; -default :break ; }
drivers/staging/vt6656/wcmd.h +1 -3
@@ -40,8 +40,7 @@ enum vnt_cmd {WLAN_CMD_SETPOWER ,WLAN_CMD_TBTT_WAKEUP ,WLAN_CMD_BECON_SEND , -WLAN_CMD_CHANGE_ANTENNA , - WLAN_CMD_11H_CHSW, + WLAN_CMD_CHANGE_ANTENNA };#define CMD_Q_SIZE 32
@@ -53,7 +52,6 @@ enum vnt_cmd_state {WLAN_CMD_TBTT_WAKEUP_START ,WLAN_CMD_BECON_SEND_START ,WLAN_CMD_CHANGE_ANTENNA_START , -WLAN_CMD_11H_CHSW_START , WLAN_CMD_IDLE };
Signature · 1 line
2.0.1
PATCH 20/25 staging: vt6656: vnt_get_duration_le fix typo piv to priv
In reply to Malcolm Priestley--- drivers/staging/vt6656/rxtx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/vt6656/rxtx.c +6 -6
@@ -180,20 +180,20 @@ static __le16 vnt_get_rtscts_rsvtime_le(struct vnt_private *priv,return cpu_to_le16 ((u16 )rrv_time); } -static __le16 vnt_get_duration_le (struct vnt_private *piv, +static __le16 vnt_get_duration_le (struct vnt_private *priv,u8 pkt_type,int need_ack) {u32 ack_time =0 ;if (need_ack) {if (pkt_type ==PK_TYPE_11B ) - ack_time =vnt_get_frame_time (piv->preamble_type, - pkt_type,14 , piv->top_cck_basic_rate); + ack_time =vnt_get_frame_time (priv->preamble_type, + pkt_type,14 , priv->top_cck_basic_rate);else - ack_time =vnt_get_frame_time (piv->preamble_type, - pkt_type,14 , piv->top_ofdm_basic_rate); + ack_time =vnt_get_frame_time (priv->preamble_type, + pkt_type,14 , priv->top_ofdm_basic_rate); -return cpu_to_le16 ((u16)(piv->sifs + ack_time)); +return cpu_to_le16 ((u16)(priv->sifs + ack_time)); }return 0 ;
Signature · 1 line
2.0.1
PATCH 21/25 staging: vt6656: rxtx move pkt_type into vnt_usb_send_context
In reply to Malcolm PriestleyRemoving pkt_type from functions
--- drivers/staging/vt6656/device.h | 1 + drivers/staging/vt6656/rxtx.c | 208 +++++++++++++++++++++------------------- 2 files changed, 109 insertions(+), 100 deletions(-)
drivers/staging/vt6656/device.h +1 -0
@@ -235,6 +235,7 @@ struct vnt_usb_send_context {u16 tx_hdr_size;u8 type;u8 pkt_no; +u8 pkt_type;u8 fb_option;bool in_use;unsigned char data[MAX_TOTAL_SIZE_WITH_ALL_HEADERS ];
drivers/staging/vt6656/rxtx.c +108 -100
476 lines not on this page · raw message
Signature · 1 line
2.0.1
PATCH 22/25 staging: vt6656: move need_ack into into vnt_usb_send_context
In reply to Malcolm PriestleyFixing need_ack to u8 and removing from function declarations.
--- drivers/staging/vt6656/device.h | 1 + drivers/staging/vt6656/rxtx.c | 89 +++++++++++++++++++++++------------------ 2 files changed, 52 insertions(+), 38 deletions(-)
drivers/staging/vt6656/device.h +1 -0
@@ -236,6 +236,7 @@ struct vnt_usb_send_context {u8 type;u8 pkt_no;u8 pkt_type; +u8 need_ack;u8 fb_option;bool in_use;unsigned char data[MAX_TOTAL_SIZE_WITH_ALL_HEADERS ];
drivers/staging/vt6656/rxtx.c +51 -38
299 lines not on this page · raw message
Signature · 1 line
2.0.1
PATCH 23/25 staging: vt6656: rxtx move frame_len/size into vnt_usb_send_context as frame_len
In reply to Malcolm PriestleyRemoving frame_len and frame_size from function declarations
--- drivers/staging/vt6656/device.h | 1 + drivers/staging/vt6656/rxtx.c | 115 ++++++++++++++++++++-------------------- 2 files changed, 58 insertions(+), 58 deletions(-)
drivers/staging/vt6656/device.h +1 -0
@@ -232,6 +232,7 @@ struct vnt_usb_send_context {struct urb *urb;struct ieee80211_hdr *hdr;unsigned int buf_len; +u32 frame_len;u16 tx_hdr_size;u8 type;u8 pkt_no;
drivers/staging/vt6656/rxtx.c +57 -58
351 lines not on this page · raw message
Signature · 1 line
2.0.1
PATCH 24/25 staging; vt6656: rxtx add current_rate into vnt_usb_send_context as tx_rate
In reply to Malcolm PriestleyCreate u8 tx_rate and remove current_rate from function declarations
--- drivers/staging/vt6656/device.h | 1 + drivers/staging/vt6656/rxtx.c | 91 ++++++++++++++++++++--------------------- 2 files changed, 45 insertions(+), 47 deletions(-)
drivers/staging/vt6656/device.h +1 -0
@@ -234,6 +234,7 @@ struct vnt_usb_send_context {unsigned int buf_len;u32 frame_len;u16 tx_hdr_size; +u16 tx_rate;u8 type;u8 pkt_no;u8 pkt_type;
drivers/staging/vt6656/rxtx.c +44 -47
291 lines not on this page · raw message
Signature · 1 line
2.0.1
PATCH 25/25 staging: vt6656: struct vnt_usb_send_context context into vnt_get_duration_le
In reply to Malcolm PriestleyRemoving priv, frame_length and need_ack
--- drivers/staging/vt6656/rxtx.c | 122 +++++++++++++++++++++++------------------- 1 file changed, 68 insertions(+), 54 deletions(-)
drivers/staging/vt6656/rxtx.c +68 -54
@@ -199,10 +199,13 @@ static __le16 vnt_get_duration_le(struct vnt_private *priv,return 0 ; } -static __le16 vnt_get_rtscts_duration_le (struct vnt_private *priv,u8 dur_type, -u32 frame_length,u8 pkt_type,u16 rate,int need_ack) +static __le16 vnt_get_rtscts_duration_le (struct vnt_usb_send_context *context, +u8 dur_type,u8 pkt_type,u16 rate) { +struct vnt_private *priv = context->priv;u32 cts_time =0 , dur_time =0 ; +u32 frame_length = context->frame_len; +u8 need_ack = context->need_ack;switch (dur_type) {case RTSDUR_BB :
@@ -399,22 +402,23 @@ static u16 vnt_rxtx_rts_g_head(struct vnt_usb_send_context *tx_context, struct vnt_rts_g *buf) {struct vnt_private *priv = tx_context->priv; -u32 frame_len = tx_context->frame_len;u16 rts_frame_len =20 ;u16 current_rate = tx_context->tx_rate; -u8 need_ack = tx_context->need_ack;vnt_get_phy_field (priv, rts_frame_len, priv->top_cck_basic_rate,PK_TYPE_11B , &buf->b);vnt_get_phy_field (priv, rts_frame_len, priv->top_ofdm_basic_rate, tx_context->pkt_type, &buf->a); - buf->duration_bb =vnt_get_rtscts_duration_le (priv,RTSDUR_BB , - frame_len,PK_TYPE_11B , priv->top_cck_basic_rate, need_ack); - buf->duration_aa =vnt_get_rtscts_duration_le (priv,RTSDUR_AA , - frame_len, tx_context->pkt_type, current_rate, need_ack); - buf->duration_ba =vnt_get_rtscts_duration_le (priv,RTSDUR_BA , - frame_len, tx_context->pkt_type, current_rate, need_ack); + buf->duration_bb =vnt_get_rtscts_duration_le (tx_context,RTSDUR_BB , +PK_TYPE_11B , + priv->top_cck_basic_rate); + buf->duration_aa =vnt_get_rtscts_duration_le (tx_context,RTSDUR_AA , + tx_context->pkt_type, + current_rate); + buf->duration_ba =vnt_get_rtscts_duration_le (tx_context,RTSDUR_BA , + tx_context->pkt_type, + current_rate);vnt_fill_ieee80211_rts (tx_context, &buf->data, buf->duration_aa);
@@ -425,31 +429,40 @@ static u16 vnt_rxtx_rts_g_fb_head(struct vnt_usb_send_context *tx_context, struct vnt_rts_g_fb *buf) {struct vnt_private *priv = tx_context->priv; -u32 frame_len = tx_context->frame_len;u16 current_rate = tx_context->tx_rate;u16 rts_frame_len =20 ; -u8 need_ack = tx_context->need_ack;vnt_get_phy_field (priv, rts_frame_len, priv->top_cck_basic_rate,PK_TYPE_11B , &buf->b);vnt_get_phy_field (priv, rts_frame_len, priv->top_ofdm_basic_rate, tx_context->pkt_type, &buf->a); - buf->duration_bb =vnt_get_rtscts_duration_le (priv,RTSDUR_BB , - frame_len,PK_TYPE_11B , priv->top_cck_basic_rate, need_ack); - buf->duration_aa =vnt_get_rtscts_duration_le (priv,RTSDUR_AA , - frame_len, tx_context->pkt_type, current_rate, need_ack); - buf->duration_ba =vnt_get_rtscts_duration_le (priv,RTSDUR_BA , - frame_len, tx_context->pkt_type, current_rate, need_ack); - - buf->rts_duration_ba_f0 =vnt_get_rtscts_duration_le (priv,RTSDUR_BA_F0 , - frame_len, tx_context->pkt_type, priv->tx_rate_fb0, need_ack); - buf->rts_duration_aa_f0 =vnt_get_rtscts_duration_le (priv,RTSDUR_AA_F0 , - frame_len, tx_context->pkt_type, priv->tx_rate_fb0, need_ack); - buf->rts_duration_ba_f1 =vnt_get_rtscts_duration_le (priv,RTSDUR_BA_F1 , - frame_len, tx_context->pkt_type, priv->tx_rate_fb1, need_ack); - buf->rts_duration_aa_f1 =vnt_get_rtscts_duration_le (priv,RTSDUR_AA_F1 , - frame_len, tx_context->pkt_type, priv->tx_rate_fb1, need_ack); + buf->duration_bb =vnt_get_rtscts_duration_le (tx_context,RTSDUR_BB , +PK_TYPE_11B , + priv->top_cck_basic_rate); + buf->duration_aa =vnt_get_rtscts_duration_le (tx_context,RTSDUR_AA , + tx_context->pkt_type, + current_rate); + buf->duration_ba =vnt_get_rtscts_duration_le (tx_context,RTSDUR_BA , + tx_context->pkt_type, + current_rate); + + buf->rts_duration_ba_f0 = +vnt_get_rtscts_duration_le (tx_context,RTSDUR_BA_F0 , + tx_context->pkt_type, + priv->tx_rate_fb0); + buf->rts_duration_aa_f0 = +vnt_get_rtscts_duration_le (tx_context,RTSDUR_AA_F0 , + tx_context->pkt_type, + priv->tx_rate_fb0); + buf->rts_duration_ba_f1 = +vnt_get_rtscts_duration_le (tx_context,RTSDUR_BA_F1 , + tx_context->pkt_type, + priv->tx_rate_fb1); + buf->rts_duration_aa_f1 = +vnt_get_rtscts_duration_le (tx_context,RTSDUR_AA_F1 , + tx_context->pkt_type, + priv->tx_rate_fb1);vnt_fill_ieee80211_rts (tx_context, &buf->data, buf->duration_aa);
@@ -460,18 +473,15 @@ static u16 vnt_rxtx_rts_ab_head(struct vnt_usb_send_context *tx_context, struct vnt_rts_ab *buf) {struct vnt_private *priv = tx_context->priv; -u32 frame_len = tx_context->frame_len;u16 current_rate = tx_context->tx_rate;u16 rts_frame_len =20 ; -u8 need_ack = tx_context->need_ack; -vnt_get_phy_field (priv, rts_frame_len, priv->top_ofdm_basic_rate, tx_context->pkt_type, &buf->ab); - buf->duration =vnt_get_rtscts_duration_le (priv,RTSDUR_AA , frame_len, + buf->duration =vnt_get_rtscts_duration_le (tx_context,RTSDUR_AA , tx_context->pkt_type, - current_rate, need_ack); + current_rate);vnt_fill_ieee80211_rts (tx_context, &buf->data, buf->duration);
@@ -482,23 +492,25 @@ static u16 vnt_rxtx_rts_a_fb_head(struct vnt_usb_send_context *tx_context, struct vnt_rts_a_fb *buf) {struct vnt_private *priv = tx_context->priv; -u32 frame_len = tx_context->frame_len;u16 current_rate = tx_context->tx_rate;u16 rts_frame_len =20 ; -u8 need_ack = tx_context->need_ack;vnt_get_phy_field (priv, rts_frame_len, priv->top_ofdm_basic_rate, tx_context->pkt_type, &buf->a); - buf->duration =vnt_get_rtscts_duration_le (priv,RTSDUR_AA , frame_len, + buf->duration =vnt_get_rtscts_duration_le (tx_context,RTSDUR_AA , tx_context->pkt_type, - current_rate, need_ack); + current_rate); - buf->rts_duration_f0 =vnt_get_rtscts_duration_le (priv,RTSDUR_AA_F0 , - frame_len, tx_context->pkt_type, priv->tx_rate_fb0, need_ack); + buf->rts_duration_f0 = +vnt_get_rtscts_duration_le (tx_context,RTSDUR_AA_F0 , + tx_context->pkt_type, + priv->tx_rate_fb0); - buf->rts_duration_f1 =vnt_get_rtscts_duration_le (priv,RTSDUR_AA_F1 , - frame_len, tx_context->pkt_type, priv->tx_rate_fb1, need_ack); + buf->rts_duration_f1 = +vnt_get_rtscts_duration_le (tx_context,RTSDUR_AA_F1 , + tx_context->pkt_type, + priv->tx_rate_fb1);vnt_fill_ieee80211_rts (tx_context, &buf->data, buf->duration);
@@ -509,10 +521,8 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context, union vnt_tx_data_head *head) {struct vnt_private *priv = tx_context->priv; -u32 frame_len = tx_context->frame_len;u32 cts_frame_len =14 ;u16 current_rate = tx_context->tx_rate; -u8 need_ack = tx_context->need_ack;if (!head)return 0 ;
@@ -523,17 +533,20 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,/* Get SignalField,ServiceField,Length */ vnt_get_phy_field (priv, cts_frame_len, priv->top_cck_basic_rate,PK_TYPE_11B , &buf->b); - buf->duration_ba =vnt_get_rtscts_duration_le (priv,CTSDUR_BA , - frame_len, tx_context->pkt_type, - current_rate, need_ack); + buf->duration_ba = +vnt_get_rtscts_duration_le (tx_context,CTSDUR_BA , + tx_context->pkt_type, + current_rate);/* Get CTSDuration_ba_f0 */ - buf->cts_duration_ba_f0 =vnt_get_rtscts_duration_le (priv, -CTSDUR_BA_F0 , frame_len, tx_context->pkt_type, - priv->tx_rate_fb0, need_ack); + buf->cts_duration_ba_f0 = +vnt_get_rtscts_duration_le (tx_context,CTSDUR_BA_F0 , + tx_context->pkt_type, + priv->tx_rate_fb0);/* Get CTSDuration_ba_f1 */ - buf->cts_duration_ba_f1 =vnt_get_rtscts_duration_le (priv, -CTSDUR_BA_F1 , frame_len, tx_context->pkt_type, - priv->tx_rate_fb1, need_ack); + buf->cts_duration_ba_f1 = +vnt_get_rtscts_duration_le (tx_context,CTSDUR_BA_F1 , + tx_context->pkt_type, + priv->tx_rate_fb1);/* Get CTS Frame body */ buf->data.duration = buf->duration_ba; buf->data.frame_control =
@@ -548,9 +561,10 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,vnt_get_phy_field (priv, cts_frame_len, priv->top_cck_basic_rate,PK_TYPE_11B , &buf->b);/* Get CTSDuration_ba */ - buf->duration_ba =vnt_get_rtscts_duration_le (priv, -CTSDUR_BA , frame_len, tx_context->pkt_type, - current_rate, need_ack); + buf->duration_ba = +vnt_get_rtscts_duration_le (tx_context,CTSDUR_BA , + tx_context->pkt_type, + current_rate);/*Get CTS Frame body*/ buf->data.duration = buf->duration_ba; buf->data.frame_control =
Signature · 1 line
2.0.1