diff options
Diffstat (limited to 'drivers/staging/rtl8192e/rtllib_tx.c')
-rw-r--r-- | drivers/staging/rtl8192e/rtllib_tx.c | 66 |
1 files changed, 22 insertions, 44 deletions
diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c index 9bf679438ad1..f7098a2ba8b0 100644 --- a/drivers/staging/rtl8192e/rtllib_tx.c +++ b/drivers/staging/rtl8192e/rtllib_tx.c @@ -267,7 +267,7 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee, struct cb_desc *tcb_desc) { struct rt_hi_throughput *ht_info = ieee->ht_info; - struct tx_ts_record *pTxTs = NULL; + struct tx_ts_record *ts = NULL; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; if (rtllib_act_scanning(ieee, false)) @@ -288,52 +288,35 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee, if (!ieee->GetNmodeSupportBySecCfg(ieee->dev)) return; - if (ht_info->bCurrentAMPDUEnable) { - if (!rtllib_get_ts(ieee, (struct ts_common_info **)(&pTxTs), hdr->addr1, + if (ht_info->current_ampdu_enable) { + if (!rtllib_get_ts(ieee, (struct ts_common_info **)(&ts), hdr->addr1, skb->priority, TX_DIR, true)) { netdev_info(ieee->dev, "%s: can't get TS\n", __func__); return; } - if (!pTxTs->TxAdmittedBARecord.b_valid) { + if (!ts->tx_admitted_ba_record.b_valid) { if (ieee->wpa_ie_len && (ieee->pairwise_key_type == KEY_TYPE_NA)) { ; } else if (tcb_desc->bdhcp == 1) { ; - } else if (!pTxTs->bDisable_AddBa) { - TsStartAddBaProcess(ieee, pTxTs); + } else if (!ts->disable_add_ba) { + TsStartAddBaProcess(ieee, ts); } - goto FORCED_AGG_SETTING; - } else if (!pTxTs->bUsingBa) { - if (SN_LESS(pTxTs->TxAdmittedBARecord.ba_start_seq_ctrl.field.seq_num, - (pTxTs->TxCurSeq + 1) % 4096)) - pTxTs->bUsingBa = true; + return; + } else if (!ts->using_ba) { + if (SN_LESS(ts->tx_admitted_ba_record.ba_start_seq_ctrl.field.seq_num, + (ts->tx_cur_seq + 1) % 4096)) + ts->using_ba = true; else - goto FORCED_AGG_SETTING; + return; } if (ieee->iw_mode == IW_MODE_INFRA) { - tcb_desc->bAMPDUEnable = true; + tcb_desc->ampdu_enable = true; tcb_desc->ampdu_factor = ht_info->CurrentAMPDUFactor; tcb_desc->ampdu_density = ht_info->current_mpdu_density; } } -FORCED_AGG_SETTING: - switch (ht_info->ForcedAMPDUMode) { - case HT_AGG_AUTO: - break; - - case HT_AGG_FORCE_ENABLE: - tcb_desc->bAMPDUEnable = true; - tcb_desc->ampdu_density = ht_info->forced_mpdu_density; - tcb_desc->ampdu_factor = ht_info->forced_ampdu_factor; - break; - - case HT_AGG_FORCE_DISABLE: - tcb_desc->bAMPDUEnable = false; - tcb_desc->ampdu_density = 0; - tcb_desc->ampdu_factor = 0; - break; - } } static void rtllib_query_ShortPreambleMode(struct rtllib_device *ieee, @@ -357,14 +340,9 @@ static void rtllib_query_HTCapShortGI(struct rtllib_device *ieee, if (!ht_info->current_ht_support || !ht_info->enable_ht) return; - if (ht_info->forced_short_gi) { - tcb_desc->bUseShortGI = true; - return; - } - - if (ht_info->bCurBW40MHz && ht_info->bCurShortGI40MHz) + if (ht_info->cur_bw_40mhz && ht_info->cur_short_gi_40mhz) tcb_desc->bUseShortGI = true; - else if (!ht_info->bCurBW40MHz && ht_info->bCurShortGI20MHz) + else if (!ht_info->cur_bw_40mhz && ht_info->cur_short_gi_20mhz) tcb_desc->bUseShortGI = true; } @@ -383,7 +361,7 @@ static void rtllib_query_BandwidthMode(struct rtllib_device *ieee, if ((tcb_desc->data_rate & 0x80) == 0) return; - if (ht_info->bCurBW40MHz && ht_info->cur_tx_bw40mhz && + if (ht_info->cur_bw_40mhz && ht_info->cur_tx_bw40mhz && !ieee->bandwidth_auto_switch.bforced_tx20Mhz) tcb_desc->bPacketBW = true; } @@ -441,9 +419,9 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee, if (ht_info->current_ht_support && ht_info->enable_ht) { u8 HTOpMode = ht_info->current_op_mode; - if ((ht_info->bCurBW40MHz && (HTOpMode == 2 || + if ((ht_info->cur_bw_40mhz && (HTOpMode == 2 || HTOpMode == 3)) || - (!ht_info->bCurBW40MHz && HTOpMode == 3)) { + (!ht_info->cur_bw_40mhz && HTOpMode == 3)) { tcb_desc->rts_rate = MGN_24M; tcb_desc->bRTSEnable = true; break; @@ -454,7 +432,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee, tcb_desc->bRTSEnable = true; break; } - if (tcb_desc->bAMPDUEnable) { + if (tcb_desc->ampdu_enable) { tcb_desc->rts_rate = MGN_24M; tcb_desc->bRTSEnable = false; break; @@ -500,8 +478,8 @@ static u16 rtllib_query_seqnum(struct rtllib_device *ieee, struct sk_buff *skb, if (!rtllib_get_ts(ieee, (struct ts_common_info **)(&ts), dst, skb->priority, TX_DIR, true)) return 0; - seqnum = ts->TxCurSeq; - ts->TxCurSeq = (ts->TxCurSeq + 1) % 4096; + seqnum = ts->tx_cur_seq; + ts->tx_cur_seq = (ts->tx_cur_seq + 1) % 4096; return seqnum; } return 0; @@ -847,7 +825,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) if (txb) { tcb_desc = (struct cb_desc *) (txb->fragments[0]->cb + MAX_DEV_ADDR_SIZE); - tcb_desc->bTxEnableFwCalcDur = 1; + tcb_desc->tx_enable_fw_calc_dur = 1; tcb_desc->priority = skb->priority; if (ether_type == ETH_P_PAE) { |