2013-05-08 21:45:39 +00:00
|
|
|
/******************************************************************************
|
|
|
|
*
|
|
|
|
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
2013-05-19 04:28:07 +00:00
|
|
|
*
|
2013-05-08 21:45:39 +00:00
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of version 2 of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
* more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with
|
|
|
|
* this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
|
|
|
*
|
|
|
|
*
|
|
|
|
******************************************************************************/
|
|
|
|
#include <osdep_service.h>
|
|
|
|
#include <drv_types.h>
|
|
|
|
|
|
|
|
#include <hal_intf.h>
|
|
|
|
#include <hal_com.h>
|
|
|
|
#include <rtl8188e_hal.h>
|
|
|
|
|
|
|
|
#define _HAL_INIT_C_
|
|
|
|
|
2013-08-04 20:12:30 +00:00
|
|
|
void dump_chip_info(struct HAL_VERSION chip_vers)
|
2013-05-08 21:45:39 +00:00
|
|
|
{
|
2013-05-27 22:32:24 +00:00
|
|
|
uint cnt = 0;
|
|
|
|
char buf[128];
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2013-08-04 20:12:30 +00:00
|
|
|
if (IS_81XXC(chip_vers)) {
|
|
|
|
cnt += sprintf((buf+cnt), "Chip Version Info: %s_",
|
|
|
|
IS_92C_SERIAL(chip_vers) ?
|
|
|
|
"CHIP_8192C" : "CHIP_8188C");
|
|
|
|
} else if (IS_92D(chip_vers)) {
|
2013-05-08 21:45:39 +00:00
|
|
|
cnt += sprintf((buf+cnt), "Chip Version Info: CHIP_8192D_");
|
2013-08-04 20:12:30 +00:00
|
|
|
} else if (IS_8723_SERIES(chip_vers)) {
|
2013-05-08 21:45:39 +00:00
|
|
|
cnt += sprintf((buf+cnt), "Chip Version Info: CHIP_8723A_");
|
2013-08-04 20:12:30 +00:00
|
|
|
} else if (IS_8188E(chip_vers)) {
|
2013-05-08 21:45:39 +00:00
|
|
|
cnt += sprintf((buf+cnt), "Chip Version Info: CHIP_8188E_");
|
|
|
|
}
|
|
|
|
|
2013-08-04 20:12:30 +00:00
|
|
|
cnt += sprintf((buf+cnt), "%s_", IS_NORMAL_CHIP(chip_vers) ?
|
|
|
|
"Normal_Chip" : "Test_Chip");
|
|
|
|
cnt += sprintf((buf+cnt), "%s_", IS_CHIP_VENDOR_TSMC(chip_vers) ?
|
|
|
|
"TSMC" : "UMC");
|
|
|
|
if (IS_A_CUT(chip_vers))
|
2013-05-26 17:17:22 +00:00
|
|
|
cnt += sprintf((buf+cnt), "A_CUT_");
|
2013-08-04 20:12:30 +00:00
|
|
|
else if (IS_B_CUT(chip_vers))
|
2013-05-26 17:17:22 +00:00
|
|
|
cnt += sprintf((buf+cnt), "B_CUT_");
|
2013-08-04 20:12:30 +00:00
|
|
|
else if (IS_C_CUT(chip_vers))
|
2013-05-26 17:17:22 +00:00
|
|
|
cnt += sprintf((buf+cnt), "C_CUT_");
|
2013-08-04 20:12:30 +00:00
|
|
|
else if (IS_D_CUT(chip_vers))
|
2013-05-26 17:17:22 +00:00
|
|
|
cnt += sprintf((buf+cnt), "D_CUT_");
|
2013-08-04 20:12:30 +00:00
|
|
|
else if (IS_E_CUT(chip_vers))
|
2013-05-26 17:17:22 +00:00
|
|
|
cnt += sprintf((buf+cnt), "E_CUT_");
|
|
|
|
else
|
2013-08-04 20:12:30 +00:00
|
|
|
cnt += sprintf((buf+cnt), "UNKNOWN_CUT(%d)_",
|
|
|
|
chip_vers.CUTVersion);
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2013-08-04 20:12:30 +00:00
|
|
|
if (IS_1T1R(chip_vers))
|
2013-05-26 17:17:22 +00:00
|
|
|
cnt += sprintf((buf+cnt), "1T1R_");
|
2013-08-04 20:12:30 +00:00
|
|
|
else if (IS_1T2R(chip_vers))
|
2013-05-26 17:17:22 +00:00
|
|
|
cnt += sprintf((buf+cnt), "1T2R_");
|
2013-08-04 20:12:30 +00:00
|
|
|
else if (IS_2T2R(chip_vers))
|
2013-05-26 17:17:22 +00:00
|
|
|
cnt += sprintf((buf+cnt), "2T2R_");
|
|
|
|
else
|
2013-08-04 20:12:30 +00:00
|
|
|
cnt += sprintf((buf+cnt), "UNKNOWN_RFTYPE(%d)_",
|
|
|
|
chip_vers.RFType);
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2013-08-04 20:12:30 +00:00
|
|
|
cnt += sprintf((buf+cnt), "RomVer(%d)\n", chip_vers.ROMVer);
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2013-05-26 17:17:22 +00:00
|
|
|
pr_info("%s", buf);
|
2013-05-08 21:45:39 +00:00
|
|
|
}
|
|
|
|
|
2013-08-04 20:12:30 +00:00
|
|
|
#define CHAN_PLAN_HW 0x80
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2013-08-04 20:12:30 +00:00
|
|
|
u8 /* return the final channel plan decision */
|
|
|
|
hal_com_get_channel_plan(struct adapter *padapter, u8 hw_channel_plan,
|
|
|
|
u8 sw_channel_plan, u8 def_channel_plan,
|
|
|
|
bool load_fail)
|
2013-05-08 21:45:39 +00:00
|
|
|
{
|
2013-08-04 20:12:30 +00:00
|
|
|
u8 sw_cfg;
|
|
|
|
u8 chnlplan;
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2013-08-04 20:12:30 +00:00
|
|
|
sw_cfg = true;
|
|
|
|
if (!load_fail) {
|
2013-05-08 21:45:39 +00:00
|
|
|
if (!rtw_is_channel_plan_valid(sw_channel_plan))
|
2013-08-04 20:12:30 +00:00
|
|
|
sw_cfg = false;
|
|
|
|
if (hw_channel_plan & CHAN_PLAN_HW)
|
|
|
|
sw_cfg = false;
|
2013-05-08 21:45:39 +00:00
|
|
|
}
|
|
|
|
|
2013-08-04 20:12:30 +00:00
|
|
|
if (sw_cfg)
|
|
|
|
chnlplan = sw_channel_plan;
|
2013-05-08 21:45:39 +00:00
|
|
|
else
|
2013-08-04 20:12:30 +00:00
|
|
|
chnlplan = hw_channel_plan & (~CHAN_PLAN_HW);
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2013-08-04 20:12:30 +00:00
|
|
|
if (!rtw_is_channel_plan_valid(chnlplan))
|
|
|
|
chnlplan = def_channel_plan;
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2013-08-04 20:12:30 +00:00
|
|
|
return chnlplan;
|
2013-05-08 21:45:39 +00:00
|
|
|
}
|
|
|
|
|
2013-08-04 20:12:30 +00:00
|
|
|
u8 MRateToHwRate(u8 rate)
|
2013-05-08 21:45:39 +00:00
|
|
|
{
|
2013-08-04 20:12:30 +00:00
|
|
|
u8 ret = DESC_RATE1M;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
2013-07-10 18:25:07 +00:00
|
|
|
switch (rate) {
|
|
|
|
/* CCK and OFDM non-HT rates */
|
|
|
|
case IEEE80211_CCK_RATE_1MB:
|
|
|
|
ret = DESC_RATE1M;
|
|
|
|
break;
|
|
|
|
case IEEE80211_CCK_RATE_2MB:
|
|
|
|
ret = DESC_RATE2M;
|
|
|
|
break;
|
|
|
|
case IEEE80211_CCK_RATE_5MB:
|
|
|
|
ret = DESC_RATE5_5M;
|
|
|
|
break;
|
|
|
|
case IEEE80211_CCK_RATE_11MB:
|
|
|
|
ret = DESC_RATE11M;
|
|
|
|
break;
|
|
|
|
case IEEE80211_OFDM_RATE_6MB:
|
|
|
|
ret = DESC_RATE6M;
|
|
|
|
break;
|
|
|
|
case IEEE80211_OFDM_RATE_9MB:
|
|
|
|
ret = DESC_RATE9M;
|
|
|
|
break;
|
|
|
|
case IEEE80211_OFDM_RATE_12MB:
|
|
|
|
ret = DESC_RATE12M;
|
|
|
|
break;
|
|
|
|
case IEEE80211_OFDM_RATE_18MB:
|
|
|
|
ret = DESC_RATE18M;
|
|
|
|
break;
|
|
|
|
case IEEE80211_OFDM_RATE_24MB:
|
|
|
|
ret = DESC_RATE24M;
|
|
|
|
break;
|
|
|
|
case IEEE80211_OFDM_RATE_36MB:
|
|
|
|
ret = DESC_RATE36M;
|
|
|
|
break;
|
|
|
|
case IEEE80211_OFDM_RATE_48MB:
|
|
|
|
ret = DESC_RATE48M;
|
|
|
|
break;
|
|
|
|
case IEEE80211_OFDM_RATE_54MB:
|
|
|
|
ret = DESC_RATE54M;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
2013-05-08 21:45:39 +00:00
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2013-08-04 20:12:30 +00:00
|
|
|
void HalSetBrateCfg(struct adapter *adapt, u8 *brates, u16 *rate_cfg)
|
2013-05-08 21:45:39 +00:00
|
|
|
{
|
2013-08-04 20:12:30 +00:00
|
|
|
u8 i, is_brate, brate;
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2013-08-04 20:12:30 +00:00
|
|
|
for (i = 0; i < NDIS_802_11_LENGTH_RATES_EX; i++) {
|
|
|
|
is_brate = brates[i] & IEEE80211_BASIC_RATE_MASK;
|
|
|
|
brate = brates[i] & 0x7f;
|
2013-05-19 04:28:07 +00:00
|
|
|
|
2013-08-04 20:12:30 +00:00
|
|
|
if (is_brate) {
|
2013-05-27 03:51:56 +00:00
|
|
|
switch (brate) {
|
|
|
|
case IEEE80211_CCK_RATE_1MB:
|
2013-08-04 20:12:30 +00:00
|
|
|
*rate_cfg |= RATE_1M;
|
2013-05-27 03:51:56 +00:00
|
|
|
break;
|
|
|
|
case IEEE80211_CCK_RATE_2MB:
|
2013-08-04 20:12:30 +00:00
|
|
|
*rate_cfg |= RATE_2M;
|
2013-05-27 03:51:56 +00:00
|
|
|
break;
|
|
|
|
case IEEE80211_CCK_RATE_5MB:
|
2013-08-04 20:12:30 +00:00
|
|
|
*rate_cfg |= RATE_5_5M;
|
2013-05-27 03:51:56 +00:00
|
|
|
break;
|
|
|
|
case IEEE80211_CCK_RATE_11MB:
|
2013-08-04 20:12:30 +00:00
|
|
|
*rate_cfg |= RATE_11M;
|
2013-05-27 03:51:56 +00:00
|
|
|
break;
|
|
|
|
case IEEE80211_OFDM_RATE_6MB:
|
2013-08-04 20:12:30 +00:00
|
|
|
*rate_cfg |= RATE_6M;
|
2013-05-27 03:51:56 +00:00
|
|
|
break;
|
|
|
|
case IEEE80211_OFDM_RATE_9MB:
|
2013-08-04 20:12:30 +00:00
|
|
|
*rate_cfg |= RATE_9M;
|
2013-05-27 03:51:56 +00:00
|
|
|
break;
|
|
|
|
case IEEE80211_OFDM_RATE_12MB:
|
2013-08-04 20:12:30 +00:00
|
|
|
*rate_cfg |= RATE_12M;
|
2013-05-27 03:51:56 +00:00
|
|
|
break;
|
|
|
|
case IEEE80211_OFDM_RATE_18MB:
|
2013-08-04 20:12:30 +00:00
|
|
|
*rate_cfg |= RATE_18M;
|
2013-05-27 03:51:56 +00:00
|
|
|
break;
|
|
|
|
case IEEE80211_OFDM_RATE_24MB:
|
2013-08-04 20:12:30 +00:00
|
|
|
*rate_cfg |= RATE_24M;
|
2013-05-27 03:51:56 +00:00
|
|
|
break;
|
|
|
|
case IEEE80211_OFDM_RATE_36MB:
|
2013-08-04 20:12:30 +00:00
|
|
|
*rate_cfg |= RATE_36M;
|
2013-05-27 03:51:56 +00:00
|
|
|
break;
|
|
|
|
case IEEE80211_OFDM_RATE_48MB:
|
2013-08-04 20:12:30 +00:00
|
|
|
*rate_cfg |= RATE_48M;
|
2013-05-27 03:51:56 +00:00
|
|
|
break;
|
|
|
|
case IEEE80211_OFDM_RATE_54MB:
|
2013-08-04 20:12:30 +00:00
|
|
|
*rate_cfg |= RATE_54M;
|
2013-05-27 03:51:56 +00:00
|
|
|
break;
|
2013-05-08 21:45:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-08-04 20:12:30 +00:00
|
|
|
static void one_out_pipe(struct adapter *adapter)
|
2013-05-08 21:45:39 +00:00
|
|
|
{
|
2013-08-04 20:12:30 +00:00
|
|
|
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(adapter);
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2013-07-10 18:25:07 +00:00
|
|
|
pdvobjpriv->Queue2Pipe[0] = pdvobjpriv->RtOutPipe[0];/* VO */
|
|
|
|
pdvobjpriv->Queue2Pipe[1] = pdvobjpriv->RtOutPipe[0];/* VI */
|
|
|
|
pdvobjpriv->Queue2Pipe[2] = pdvobjpriv->RtOutPipe[0];/* BE */
|
|
|
|
pdvobjpriv->Queue2Pipe[3] = pdvobjpriv->RtOutPipe[0];/* BK */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
2013-07-10 18:25:07 +00:00
|
|
|
pdvobjpriv->Queue2Pipe[4] = pdvobjpriv->RtOutPipe[0];/* BCN */
|
|
|
|
pdvobjpriv->Queue2Pipe[5] = pdvobjpriv->RtOutPipe[0];/* MGT */
|
|
|
|
pdvobjpriv->Queue2Pipe[6] = pdvobjpriv->RtOutPipe[0];/* HIGH */
|
|
|
|
pdvobjpriv->Queue2Pipe[7] = pdvobjpriv->RtOutPipe[0];/* TXCMD */
|
2013-05-08 21:45:39 +00:00
|
|
|
}
|
|
|
|
|
2013-08-04 20:12:30 +00:00
|
|
|
static void two_out_pipe(struct adapter *adapter, bool wifi_cfg)
|
2013-05-08 21:45:39 +00:00
|
|
|
{
|
2013-08-04 20:12:30 +00:00
|
|
|
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(adapter);
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2013-08-04 20:12:30 +00:00
|
|
|
if (wifi_cfg) { /* WMM */
|
|
|
|
/* BK, BE, VI, VO, BCN, CMD, MGT, HIGH, HCCA */
|
|
|
|
/* 0, 1, 0, 1, 0, 0, 0, 0, 0}; */
|
2013-07-10 18:25:07 +00:00
|
|
|
/* 0:H, 1:L */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
2013-07-10 18:25:07 +00:00
|
|
|
pdvobjpriv->Queue2Pipe[0] = pdvobjpriv->RtOutPipe[1];/* VO */
|
|
|
|
pdvobjpriv->Queue2Pipe[1] = pdvobjpriv->RtOutPipe[0];/* VI */
|
|
|
|
pdvobjpriv->Queue2Pipe[2] = pdvobjpriv->RtOutPipe[1];/* BE */
|
|
|
|
pdvobjpriv->Queue2Pipe[3] = pdvobjpriv->RtOutPipe[0];/* BK */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
2013-07-10 18:25:07 +00:00
|
|
|
pdvobjpriv->Queue2Pipe[4] = pdvobjpriv->RtOutPipe[0];/* BCN */
|
|
|
|
pdvobjpriv->Queue2Pipe[5] = pdvobjpriv->RtOutPipe[0];/* MGT */
|
|
|
|
pdvobjpriv->Queue2Pipe[6] = pdvobjpriv->RtOutPipe[0];/* HIGH */
|
|
|
|
pdvobjpriv->Queue2Pipe[7] = pdvobjpriv->RtOutPipe[0];/* TXCMD */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
2013-08-04 20:12:30 +00:00
|
|
|
} else {/* typical setting */
|
|
|
|
/* BK, BE, VI, VO, BCN, CMD, MGT, HIGH, HCCA */
|
|
|
|
/* 1, 1, 0, 0, 0, 0, 0, 0, 0}; */
|
2013-07-10 18:25:07 +00:00
|
|
|
/* 0:H, 1:L */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
2013-07-10 18:25:07 +00:00
|
|
|
pdvobjpriv->Queue2Pipe[0] = pdvobjpriv->RtOutPipe[0];/* VO */
|
|
|
|
pdvobjpriv->Queue2Pipe[1] = pdvobjpriv->RtOutPipe[0];/* VI */
|
|
|
|
pdvobjpriv->Queue2Pipe[2] = pdvobjpriv->RtOutPipe[1];/* BE */
|
|
|
|
pdvobjpriv->Queue2Pipe[3] = pdvobjpriv->RtOutPipe[1];/* BK */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
2013-07-10 18:25:07 +00:00
|
|
|
pdvobjpriv->Queue2Pipe[4] = pdvobjpriv->RtOutPipe[0];/* BCN */
|
|
|
|
pdvobjpriv->Queue2Pipe[5] = pdvobjpriv->RtOutPipe[0];/* MGT */
|
|
|
|
pdvobjpriv->Queue2Pipe[6] = pdvobjpriv->RtOutPipe[0];/* HIGH */
|
|
|
|
pdvobjpriv->Queue2Pipe[7] = pdvobjpriv->RtOutPipe[0];/* TXCMD */
|
2013-05-08 21:45:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-08-04 20:12:30 +00:00
|
|
|
static void three_out_pipe(struct adapter *adapter, bool wifi_cfg)
|
2013-05-08 21:45:39 +00:00
|
|
|
{
|
2013-08-04 20:12:30 +00:00
|
|
|
struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(adapter);
|
2013-05-19 04:28:07 +00:00
|
|
|
|
2013-08-04 20:12:30 +00:00
|
|
|
if (wifi_cfg) {/* for WMM */
|
|
|
|
/* BK, BE, VI, VO, BCN, CMD, MGT, HIGH, HCCA */
|
|
|
|
/* 1, 2, 1, 0, 0, 0, 0, 0, 0}; */
|
2013-07-10 18:25:07 +00:00
|
|
|
/* 0:H, 1:N, 2:L */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
2013-07-10 18:25:07 +00:00
|
|
|
pdvobjpriv->Queue2Pipe[0] = pdvobjpriv->RtOutPipe[0];/* VO */
|
|
|
|
pdvobjpriv->Queue2Pipe[1] = pdvobjpriv->RtOutPipe[1];/* VI */
|
|
|
|
pdvobjpriv->Queue2Pipe[2] = pdvobjpriv->RtOutPipe[2];/* BE */
|
|
|
|
pdvobjpriv->Queue2Pipe[3] = pdvobjpriv->RtOutPipe[1];/* BK */
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2013-07-10 18:25:07 +00:00
|
|
|
pdvobjpriv->Queue2Pipe[4] = pdvobjpriv->RtOutPipe[0];/* BCN */
|
|
|
|
pdvobjpriv->Queue2Pipe[5] = pdvobjpriv->RtOutPipe[0];/* MGT */
|
|
|
|
pdvobjpriv->Queue2Pipe[6] = pdvobjpriv->RtOutPipe[0];/* HIGH */
|
|
|
|
pdvobjpriv->Queue2Pipe[7] = pdvobjpriv->RtOutPipe[0];/* TXCMD */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
2013-07-10 18:25:07 +00:00
|
|
|
} else {/* typical setting */
|
2013-08-04 20:12:30 +00:00
|
|
|
/* BK, BE, VI, VO, BCN, CMD, MGT, HIGH, HCCA */
|
|
|
|
/* 2, 2, 1, 0, 0, 0, 0, 0, 0}; */
|
2013-07-10 18:25:07 +00:00
|
|
|
/* 0:H, 1:N, 2:L */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
2013-07-10 18:25:07 +00:00
|
|
|
pdvobjpriv->Queue2Pipe[0] = pdvobjpriv->RtOutPipe[0];/* VO */
|
|
|
|
pdvobjpriv->Queue2Pipe[1] = pdvobjpriv->RtOutPipe[1];/* VI */
|
|
|
|
pdvobjpriv->Queue2Pipe[2] = pdvobjpriv->RtOutPipe[2];/* BE */
|
|
|
|
pdvobjpriv->Queue2Pipe[3] = pdvobjpriv->RtOutPipe[2];/* BK */
|
2013-05-19 04:28:07 +00:00
|
|
|
|
2013-07-10 18:25:07 +00:00
|
|
|
pdvobjpriv->Queue2Pipe[4] = pdvobjpriv->RtOutPipe[0];/* BCN */
|
|
|
|
pdvobjpriv->Queue2Pipe[5] = pdvobjpriv->RtOutPipe[0];/* MGT */
|
|
|
|
pdvobjpriv->Queue2Pipe[6] = pdvobjpriv->RtOutPipe[0];/* HIGH */
|
|
|
|
pdvobjpriv->Queue2Pipe[7] = pdvobjpriv->RtOutPipe[0];/* TXCMD */
|
2013-05-08 21:45:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-08-04 20:12:30 +00:00
|
|
|
bool Hal_MappingOutPipe(struct adapter *adapter, u8 numoutpipe)
|
2013-05-08 21:45:39 +00:00
|
|
|
{
|
2013-08-04 20:12:30 +00:00
|
|
|
struct registry_priv *pregistrypriv = &adapter->registrypriv;
|
|
|
|
bool wifi_cfg = (pregistrypriv->wifi_spec) ? true : false;
|
2013-05-26 03:02:10 +00:00
|
|
|
bool result = true;
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2013-08-04 20:12:30 +00:00
|
|
|
switch (numoutpipe) {
|
|
|
|
case 2:
|
|
|
|
two_out_pipe(adapter, wifi_cfg);
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
three_out_pipe(adapter, wifi_cfg);
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
one_out_pipe(adapter);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
result = false;
|
|
|
|
break;
|
2013-05-08 21:45:39 +00:00
|
|
|
}
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
2013-07-27 01:08:39 +00:00
|
|
|
void hal_init_macaddr(struct adapter *adapter)
|
2013-05-08 21:45:39 +00:00
|
|
|
{
|
2013-08-04 20:12:30 +00:00
|
|
|
rtw_hal_set_hwreg(adapter, HW_VAR_MAC_ADDR,
|
|
|
|
adapter->eeprompriv.mac_addr);
|
2013-05-08 21:45:39 +00:00
|
|
|
}
|