* Return Value: None.
*
*/
-void CARDvSetRSPINF(struct vnt_private *pDevice, u8 byBBType)
+
+void CARDvSetRSPINF(struct vnt_private *priv, u8 bb_type)
{
struct vnt_phy_field phy[4];
- u8 abyTxRate[9] = {0, 0, 0, 0, 0, 0, 0, 0, 0}; /* For OFDM */
- u8 abyRsvTime[9] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
- u8 abyData[34];
+ u8 tx_rate[9] = {0, 0, 0, 0, 0, 0, 0, 0, 0}; /* For OFDM */
+ u8 rsv_time[9] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
+ u8 data[34];
int i;
- //RSPINF_b_1
- BBvCalculateParameter(pDevice, 14,
- swGetCCKControlRate(pDevice, RATE_1M), PK_TYPE_11B, &phy[0]);
-
- ///RSPINF_b_2
- BBvCalculateParameter(pDevice, 14,
- swGetCCKControlRate(pDevice, RATE_2M), PK_TYPE_11B, &phy[1]);
-
- //RSPINF_b_5
- BBvCalculateParameter(pDevice, 14,
- swGetCCKControlRate(pDevice, RATE_5M), PK_TYPE_11B, &phy[2]);
-
- //RSPINF_b_11
- BBvCalculateParameter(pDevice, 14,
- swGetCCKControlRate(pDevice, RATE_11M), PK_TYPE_11B, &phy[3]);
-
- //RSPINF_a_6
- CARDvCalculateOFDMRParameter (RATE_6M,
- byBBType,
- &abyTxRate[0],
- &abyRsvTime[0]);
-
- //RSPINF_a_9
- CARDvCalculateOFDMRParameter (RATE_9M,
- byBBType,
- &abyTxRate[1],
- &abyRsvTime[1]);
-
- //RSPINF_a_12
- CARDvCalculateOFDMRParameter (RATE_12M,
- byBBType,
- &abyTxRate[2],
- &abyRsvTime[2]);
-
- //RSPINF_a_18
- CARDvCalculateOFDMRParameter (RATE_18M,
- byBBType,
- &abyTxRate[3],
- &abyRsvTime[3]);
-
- //RSPINF_a_24
- CARDvCalculateOFDMRParameter (RATE_24M,
- byBBType,
- &abyTxRate[4],
- &abyRsvTime[4]);
-
- //RSPINF_a_36
- CARDvCalculateOFDMRParameter (swGetOFDMControlRate(pDevice, RATE_36M),
- byBBType,
- &abyTxRate[5],
- &abyRsvTime[5]);
-
- //RSPINF_a_48
- CARDvCalculateOFDMRParameter (swGetOFDMControlRate(pDevice, RATE_48M),
- byBBType,
- &abyTxRate[6],
- &abyRsvTime[6]);
-
- //RSPINF_a_54
- CARDvCalculateOFDMRParameter (swGetOFDMControlRate(pDevice, RATE_54M),
- byBBType,
- &abyTxRate[7],
- &abyRsvTime[7]);
-
- //RSPINF_a_72
- CARDvCalculateOFDMRParameter (swGetOFDMControlRate(pDevice, RATE_54M),
- byBBType,
- &abyTxRate[8],
- &abyRsvTime[8]);
-
- put_unaligned(phy[0].len, (u16 *)&abyData[0]);
- abyData[2] = phy[0].signal;
- abyData[3] = phy[0].service;
-
- put_unaligned(phy[1].len, (u16 *)&abyData[4]);
- abyData[6] = phy[1].signal;
- abyData[7] = phy[1].service;
-
- put_unaligned(phy[2].len, (u16 *)&abyData[8]);
- abyData[10] = phy[2].signal;
- abyData[11] = phy[2].service;
-
- put_unaligned(phy[3].len, (u16 *)&abyData[12]);
- abyData[14] = phy[3].signal;
- abyData[15] = phy[3].service;
-
- for (i = 0; i < 9; i++) {
- abyData[16+i*2] = abyTxRate[i];
- abyData[16+i*2+1] = abyRsvTime[i];
- }
+ /*RSPINF_b_1*/
+ BBvCalculateParameter(priv, 14,
+ swGetCCKControlRate(priv, RATE_1M), PK_TYPE_11B, &phy[0]);
- CONTROLnsRequestOut(pDevice,
- MESSAGE_TYPE_WRITE,
- MAC_REG_RSPINF_B_1,
- MESSAGE_REQUEST_MACREG,
- 34,
- &abyData[0]);
+ /*RSPINF_b_2*/
+ BBvCalculateParameter(priv, 14,
+ swGetCCKControlRate(priv, RATE_2M), PK_TYPE_11B, &phy[1]);
+
+ /*RSPINF_b_5*/
+ BBvCalculateParameter(priv, 14,
+ swGetCCKControlRate(priv, RATE_5M), PK_TYPE_11B, &phy[2]);
+
+ /*RSPINF_b_11*/
+ BBvCalculateParameter(priv, 14,
+ swGetCCKControlRate(priv, RATE_11M), PK_TYPE_11B, &phy[3]);
+
+
+ /*RSPINF_a_6*/
+ CARDvCalculateOFDMRParameter(RATE_6M, bb_type,
+ &tx_rate[0], &rsv_time[0]);
+
+ /*RSPINF_a_9*/
+ CARDvCalculateOFDMRParameter(RATE_9M, bb_type,
+ &tx_rate[1], &rsv_time[1]);
+
+ /*RSPINF_a_12*/
+ CARDvCalculateOFDMRParameter(RATE_12M, bb_type,
+ &tx_rate[2], &rsv_time[2]);
+
+ /*RSPINF_a_18*/
+ CARDvCalculateOFDMRParameter(RATE_18M, bb_type,
+ &tx_rate[3], &rsv_time[3]);
+
+ /*RSPINF_a_24*/
+ CARDvCalculateOFDMRParameter(RATE_24M, bb_type,
+ &tx_rate[4], &rsv_time[4]);
+
+ /*RSPINF_a_36*/
+ CARDvCalculateOFDMRParameter(swGetOFDMControlRate(priv, RATE_36M),
+ bb_type, &tx_rate[5], &rsv_time[5]);
+
+ /*RSPINF_a_48*/
+ CARDvCalculateOFDMRParameter(swGetOFDMControlRate(priv, RATE_48M),
+ bb_type, &tx_rate[6], &rsv_time[6]);
+
+ /*RSPINF_a_54*/
+ CARDvCalculateOFDMRParameter(swGetOFDMControlRate(priv, RATE_54M),
+ bb_type, &tx_rate[7], &rsv_time[7]);
+
+ /*RSPINF_a_72*/
+ CARDvCalculateOFDMRParameter(swGetOFDMControlRate(priv, RATE_54M),
+ bb_type, &tx_rate[8], &rsv_time[8]);
+
+ put_unaligned(phy[0].len, (u16 *)&data[0]);
+ data[2] = phy[0].signal;
+ data[3] = phy[0].service;
+
+ put_unaligned(phy[1].len, (u16 *)&data[4]);
+ data[6] = phy[1].signal;
+ data[7] = phy[1].service;
+
+ put_unaligned(phy[2].len, (u16 *)&data[8]);
+ data[10] = phy[2].signal;
+ data[11] = phy[2].service;
+
+ put_unaligned(phy[3].len, (u16 *)&data[12]);
+ data[14] = phy[3].signal;
+ data[15] = phy[3].service;
+
+ for (i = 0; i < 9; i++) {
+ data[16 + i * 2] = tx_rate[i];
+ data[16 + i * 2 + 1] = rsv_time[i];
+ }
+ CONTROLnsRequestOut(priv, MESSAGE_TYPE_WRITE,
+ MAC_REG_RSPINF_B_1, MESSAGE_REQUEST_MACREG, 34, &data[0]);
}
/*