2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-22 04:24:02 +08:00

staging: rtl8723bs: Rework 'struct _ODM_Per_Pkt_Info_' coding style.

Change the typedef'd 'struct _ODM_Per_Pkt_Info_' into
'struct odm_packet_info' and change the members to snake case in
order to meet the coding style guidelines.
Members:
* u8 DataRate            -> data_rate
* u8 StationID           -> station_id
* bool bPacketMatchBSSID -> bssid_match
* bool bPacketToSelf     -> to_self
* bool bPacketBeacon     -> is_beacon
* bool bToSelf           -> (removed because it isn't used)

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Quytelda Kahja 2018-03-27 01:41:13 -07:00 committed by Greg Kroah-Hartman
parent 9f534f7ee8
commit 3df3602ac7
5 changed files with 43 additions and 42 deletions

View File

@ -262,15 +262,13 @@ typedef struct _ODM_Phy_Status_Info_ {
} ODM_PHY_INFO_T, *PODM_PHY_INFO_T;
typedef struct _ODM_Per_Pkt_Info_ {
/* u8 Rate; */
u8 DataRate;
u8 StationID;
bool bPacketMatchBSSID;
bool bPacketToSelf;
bool bPacketBeacon;
bool bToSelf;
} ODM_PACKET_INFO_T, *PODM_PACKET_INFO_T;
struct odm_packet_info {
u8 data_rate;
u8 station_id;
bool bssid_match;
bool to_self;
bool is_beacon;
};
typedef struct _ODM_Phy_Dbg_Info_ {

View File

@ -316,14 +316,14 @@ void ODM_CfoTracking(void *pDM_VOID)
void ODM_ParsingCFO(void *pDM_VOID, void *pPktinfo_VOID, s8 *pcfotail)
{
PDM_ODM_T pDM_Odm = (PDM_ODM_T)pDM_VOID;
PODM_PACKET_INFO_T pPktinfo = (PODM_PACKET_INFO_T)pPktinfo_VOID;
struct odm_packet_info *pPktinfo = (struct odm_packet_info *)pPktinfo_VOID;
PCFO_TRACKING pCfoTrack = &pDM_Odm->DM_CfoTrack;
u8 i;
if (!(pDM_Odm->SupportAbility & ODM_BB_CFO_TRACKING))
return;
if (pPktinfo->StationID != 0) {
if (pPktinfo->station_id != 0) {
/* 3 Update CFO report for path-A & path-B */
/* Only paht-A and path-B have CFO tail and short CFO */
for (i = ODM_RF_PATH_A; i <= ODM_RF_PATH_B; i++)

View File

@ -93,7 +93,7 @@ static void odm_RxPhyStatus92CSeries_Parsing(
PDM_ODM_T pDM_Odm,
PODM_PHY_INFO_T pPhyInfo,
u8 *pPhyStatus,
PODM_PACKET_INFO_T pPktinfo
struct odm_packet_info *pPktinfo
)
{
u8 i, Max_spatial_stream;
@ -106,7 +106,7 @@ static void odm_RxPhyStatus92CSeries_Parsing(
u8 LNA_idx, VGA_idx;
PPHY_STATUS_RPT_8192CD_T pPhyStaRpt = (PPHY_STATUS_RPT_8192CD_T)pPhyStatus;
isCCKrate = pPktinfo->DataRate <= DESC_RATE11M;
isCCKrate = pPktinfo->data_rate <= DESC_RATE11M;
pPhyInfo->RxMIMOSignalQuality[ODM_RF_PATH_A] = -1;
pPhyInfo->RxMIMOSignalQuality[ODM_RF_PATH_B] = -1;
@ -215,7 +215,7 @@ static void odm_RxPhyStatus92CSeries_Parsing(
/* */
/* (3)EVM of HT rate */
/* */
if (pPktinfo->DataRate >= DESC_RATEMCS8 && pPktinfo->DataRate <= DESC_RATEMCS15)
if (pPktinfo->data_rate >= DESC_RATEMCS8 && pPktinfo->data_rate <= DESC_RATEMCS15)
Max_spatial_stream = 2; /* both spatial stream make sense */
else
Max_spatial_stream = 1; /* only spatial stream 1 makes sense */
@ -267,7 +267,7 @@ static void odm_RxPhyStatus92CSeries_Parsing(
}
static void odm_Process_RSSIForDM(
PDM_ODM_T pDM_Odm, PODM_PHY_INFO_T pPhyInfo, PODM_PACKET_INFO_T pPktinfo
PDM_ODM_T pDM_Odm, PODM_PHY_INFO_T pPhyInfo, struct odm_packet_info *pPktinfo
)
{
@ -279,22 +279,22 @@ static void odm_Process_RSSIForDM(
PSTA_INFO_T pEntry;
if (pPktinfo->StationID == 0xFF)
if (pPktinfo->station_id == 0xFF)
return;
pEntry = pDM_Odm->pODM_StaInfo[pPktinfo->StationID];
pEntry = pDM_Odm->pODM_StaInfo[pPktinfo->station_id];
if (!IS_STA_VALID(pEntry))
return;
if ((!pPktinfo->bPacketMatchBSSID))
if ((!pPktinfo->bssid_match))
return;
if (pPktinfo->bPacketBeacon)
if (pPktinfo->is_beacon)
pDM_Odm->PhyDbgInfo.NumQryBeaconPkt++;
isCCKrate = ((pPktinfo->DataRate <= DESC_RATE11M)) ? true : false;
pDM_Odm->RxRate = pPktinfo->DataRate;
isCCKrate = ((pPktinfo->data_rate <= DESC_RATE11M)) ? true : false;
pDM_Odm->RxRate = pPktinfo->data_rate;
/* Statistic for antenna/path diversity------------------ */
if (pDM_Odm->SupportAbility & ODM_BB_ANT_DIV) {
@ -307,7 +307,7 @@ static void odm_Process_RSSIForDM(
UndecoratedSmoothedOFDM = pEntry->rssi_stat.UndecoratedSmoothedOFDM;
UndecoratedSmoothedPWDB = pEntry->rssi_stat.UndecoratedSmoothedPWDB;
if (pPktinfo->bPacketToSelf || pPktinfo->bPacketBeacon) {
if (pPktinfo->to_self || pPktinfo->is_beacon) {
if (!isCCKrate) { /* ofdm rate */
if (pPhyInfo->RxMIMOSignalStrength[ODM_RF_PATH_B] == 0) {
@ -424,7 +424,7 @@ static void ODM_PhyStatusQuery_92CSeries(
PDM_ODM_T pDM_Odm,
PODM_PHY_INFO_T pPhyInfo,
u8 *pPhyStatus,
PODM_PACKET_INFO_T pPktinfo
struct odm_packet_info *pPktinfo
)
{
@ -438,7 +438,7 @@ void ODM_PhyStatusQuery(
PDM_ODM_T pDM_Odm,
PODM_PHY_INFO_T pPhyInfo,
u8 *pPhyStatus,
PODM_PACKET_INFO_T pPktinfo
struct odm_packet_info *pPktinfo
)
{

View File

@ -133,7 +133,7 @@ void ODM_PhyStatusQuery(
PDM_ODM_T pDM_Odm,
PODM_PHY_INFO_T pPhyInfo,
u8 *pPhyStatus,
PODM_PACKET_INFO_T pPktinfo
struct odm_packet_info *pPktinfo
);
HAL_STATUS ODM_ConfigRFWithTxPwrTrackHeaderFile(PDM_ODM_T pDM_Odm);

View File

@ -97,45 +97,48 @@ static void update_recvframe_phyinfo(union recv_frame *precvframe,
u8 *rx_bssid;
u8 *rx_ra;
u8 *my_hwaddr;
ODM_PACKET_INFO_T pkt_info;
u8 *sa = NULL;
struct odm_packet_info pkt_info = {
.data_rate = 0x00,
.station_id = 0x00,
.bssid_match = false,
.to_self = false,
.is_beacon = false,
};
/* _irqL irqL; */
struct sta_priv *pstapriv;
struct sta_info *psta;
pkt_info.bPacketMatchBSSID = false;
pkt_info.bPacketToSelf = false;
pkt_info.bPacketBeacon = false;
wlanhdr = get_recvframe_data(precvframe);
my_bssid = get_bssid(&padapter->mlmepriv);
rx_bssid = get_hdr_bssid(wlanhdr);
pkt_info.bPacketMatchBSSID = ((!IsFrameTypeCtrl(wlanhdr)) &&
!pattrib->icv_err && !pattrib->crc_err &&
!ether_addr_equal(rx_bssid, my_bssid));
pkt_info.bssid_match = ((!IsFrameTypeCtrl(wlanhdr)) &&
!pattrib->icv_err && !pattrib->crc_err &&
!ether_addr_equal(rx_bssid, my_bssid));
rx_ra = get_ra(wlanhdr);
my_hwaddr = myid(&padapter->eeprompriv);
pkt_info.bPacketToSelf = pkt_info.bPacketMatchBSSID &&
pkt_info.to_self = pkt_info.bssid_match &&
!ether_addr_equal(rx_ra, my_hwaddr);
pkt_info.bPacketBeacon = pkt_info.bPacketMatchBSSID &&
pkt_info.is_beacon = pkt_info.bssid_match &&
(GetFrameSubType(wlanhdr) == WIFI_BEACON);
sa = get_ta(wlanhdr);
pkt_info.StationID = 0xFF;
pkt_info.station_id = 0xFF;
pstapriv = &padapter->stapriv;
psta = rtw_get_stainfo(pstapriv, sa);
if (psta) {
pkt_info.StationID = psta->mac_id;
pkt_info.station_id = psta->mac_id;
/* DBG_8192C("%s ==> StationID(%d)\n",
* __func__, pkt_info.StationID); */
* __func__, pkt_info.station_id); */
}
pkt_info.DataRate = pattrib->data_rate;
pkt_info.data_rate = pattrib->data_rate;
/* rtl8723b_query_rx_phy_status(precvframe, pphy_status); */
/* spin_lock_bh(&p_hal_data->odm_stainfo_lock); */
@ -146,14 +149,14 @@ static void update_recvframe_phyinfo(union recv_frame *precvframe,
/* spin_unlock_bh(&p_hal_data->odm_stainfo_lock); */
precvframe->u.hdr.psta = NULL;
if (
pkt_info.bPacketMatchBSSID &&
pkt_info.bssid_match &&
(check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true)
) {
if (psta) {
precvframe->u.hdr.psta = psta;
rtl8723b_process_phy_info(padapter, precvframe);
}
} else if (pkt_info.bPacketToSelf || pkt_info.bPacketBeacon) {
} else if (pkt_info.to_self || pkt_info.is_beacon) {
u32 adhoc_state = WIFI_ADHOC_STATE | WIFI_ADHOC_MASTER_STATE;
if (check_fwstate(&padapter->mlmepriv, adhoc_state))
if (psta)