From 69e98df78271a71b688706dccf2ad4544d63a274 Mon Sep 17 00:00:00 2001 From: "Carlos E. Garcia" Date: Fri, 24 Apr 2015 09:40:42 -0400 Subject: Staging: fixed multiple spelling errors. Fixed multiple spelling errors. Signed-off-by: Carlos E. Garcia Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/hal/HalPwrSeqCmd.c | 2 +- drivers/staging/rtl8723au/hal/odm.c | 2 +- drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 2 +- drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c | 2 +- drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c | 4 ++-- drivers/staging/rtl8723au/hal/rtl8723au_xmit.c | 2 +- drivers/staging/rtl8723au/hal/usb_halinit.c | 2 +- drivers/staging/rtl8723au/include/odm_debug.h | 2 +- drivers/staging/rtl8723au/include/rtl8723a_hal.h | 2 +- drivers/staging/rtl8723au/include/rtw_cmd.h | 2 +- drivers/staging/rtl8723au/include/rtw_mlme.h | 10 +++++----- drivers/staging/rtl8723au/include/rtw_mlme_ext.h | 2 +- drivers/staging/rtl8723au/include/sta_info.h | 2 +- 13 files changed, 18 insertions(+), 18 deletions(-) (limited to 'drivers/staging/rtl8723au') diff --git a/drivers/staging/rtl8723au/hal/HalPwrSeqCmd.c b/drivers/staging/rtl8723au/hal/HalPwrSeqCmd.c index ae090ab11585..0a3d96e840cc 100644 --- a/drivers/staging/rtl8723au/hal/HalPwrSeqCmd.c +++ b/drivers/staging/rtl8723au/hal/HalPwrSeqCmd.c @@ -92,7 +92,7 @@ u8 HalPwrSeqCmdParsing23a(struct rtw_adapter *padapter, u8 CutVersion, value |= (GET_PWR_CFG_VALUE(PwrCfgCmd) & GET_PWR_CFG_MASK(PwrCfgCmd)); - /* Write the value back to sytem register */ + /* Write the value back to system register */ rtl8723au_write8(padapter, offset, value); break; diff --git a/drivers/staging/rtl8723au/hal/odm.c b/drivers/staging/rtl8723au/hal/odm.c index ec543cfe1b45..eb598cf8d229 100644 --- a/drivers/staging/rtl8723au/hal/odm.c +++ b/drivers/staging/rtl8723au/hal/odm.c @@ -40,7 +40,7 @@ static u32 EDCAParam[HT_IOT_PEER_MAX][3] = { /* UL DL */ {0x5ea42b, 0xa630, 0x5e431c}, /* 11:airgocap AP */ }; -/* EDCA Paramter for AP/ADSL by Mingzhi 2011-11-22 */ +/* EDCA Parameter for AP/ADSL by Mingzhi 2011-11-22 */ /* Global var */ u32 OFDMSwingTable23A[OFDM_TABLE_SIZE_92D] = { diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c index 04d01833dc30..efe173072ad5 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c @@ -1396,7 +1396,7 @@ static void _DisableAnalog(struct rtw_adapter *padapter, bool bWithoutHWSM) /* value16 |= (APDM_HOST | FSM_HSUS |/PFM_ALDN); */ /* 2010/08/31 According to Filen description, we need to use HW to shut down 8051 automatically. */ - /* Becasue suspend operatione need the asistance of 8051 + /* Because suspend operation need the asistance of 8051 to wait for 3ms. */ value16 = APDM_HOST | AFSM_HSUS | PFM_ALDN; } else { diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c b/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c index 46a30659c96f..7fa97808b951 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_phycfg.c @@ -660,7 +660,7 @@ phy_BB8723a_Config_ParaFile(struct rtw_adapter *Adapter) /* */ /* 1. Read PHY_REG.TXT BB INIT!! */ - /* We will seperate as 88C / 92C according to chip version */ + /* We will separate as 88C / 92C according to chip version */ /* */ ODM_ReadAndConfig_PHY_REG_1T_8723A(&pHalData->odmpriv); diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c b/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c index 3e3f18634ffe..4909835cc540 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c @@ -138,7 +138,7 @@ void rtl823a_phy_rf6052setccktxpower(struct rtw_adapter *Adapter, /* Currently, we cannot fully disable driver dynamic tx power * mechanism because it is referenced by BT coexist mechanism. */ /* In the future, two mechanism shall be separated from each other - * and maintained independantly. Thanks for Lanhsin's reminder. */ + * and maintained independently. Thanks for Lanhsin's reminder. */ if (pdmpriv->DynamicTxHighPowerLvl == TxHighPwrLevel_Level1) { TxAGC[RF_PATH_A] = 0x10101010; TxAGC[RF_PATH_B] = 0x10101010; @@ -300,7 +300,7 @@ getTxPowerWriteValByRegulatory(struct rtw_adapter *Adapter, u8 Channel, /* Currently, we cannot fully disable driver dynamic tx power mechanism because it is referenced by BT coexist mechanism. */ /* In the future, two mechanism shall be separated from each other and - maintained independantly. Thanks for Lanhsin's reminder. */ + maintained independently. Thanks for Lanhsin's reminder. */ if (pdmpriv->DynamicTxHighPowerLvl == TxHighPwrLevel_Level1) writeVal = 0x14141414; diff --git a/drivers/staging/rtl8723au/hal/rtl8723au_xmit.c b/drivers/staging/rtl8723au/hal/rtl8723au_xmit.c index 6bf87fe86644..14746dd8db78 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723au_xmit.c +++ b/drivers/staging/rtl8723au/hal/rtl8723au_xmit.c @@ -252,7 +252,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz) } /* (1) The sequence number of each non-Qos frame / broadcast / multicast / */ - /* mgnt frame should be controled by Hw because Fw will also send null data */ + /* mgnt frame should be controlled by Hw because Fw will also send null data */ /* which we cannot control when Fw LPS enable. */ /* --> default enable non-Qos data sequense number. 2010.06.23. by tynli. */ /* (2) Enable HW SEQ control for beacon packet, because we use Hw beacon. */ diff --git a/drivers/staging/rtl8723au/hal/usb_halinit.c b/drivers/staging/rtl8723au/hal/usb_halinit.c index 42ae29d26302..68156a13d00f 100644 --- a/drivers/staging/rtl8723au/hal/usb_halinit.c +++ b/drivers/staging/rtl8723au/hal/usb_halinit.c @@ -360,7 +360,7 @@ static void _InitWMACSetting(struct rtw_adapter *Adapter) /* 2010.09.08 hpfan */ /* Since ADF is removed from RCR, ps-poll will not be indicate to driver, */ - /* RxFilterMap should mask ps-poll to gurantee AP mode can + /* RxFilterMap should mask ps-poll to guarantee AP mode can rx ps-poll. */ /* value16 = 0x400; */ /* rtl8723au_write16(Adapter, REG_RXFLTMAP1, value16); */ diff --git a/drivers/staging/rtl8723au/include/odm_debug.h b/drivers/staging/rtl8723au/include/odm_debug.h index 83be5bab9e09..c4b375a6f409 100644 --- a/drivers/staging/rtl8723au/include/odm_debug.h +++ b/drivers/staging/rtl8723au/include/odm_debug.h @@ -22,7 +22,7 @@ /* Define the debug levels */ /* */ /* 1. DBG_TRACE and DBG_LOUD are used for normal cases. */ -/* So that, they can help SW engineer to develope or trace states changed */ +/* So that, they can help SW engineer to develop or trace states changed */ /* and also help HW enginner to trace every operation to and from HW, */ /* e.g IO, Tx, Rx. */ /* */ diff --git a/drivers/staging/rtl8723au/include/rtl8723a_hal.h b/drivers/staging/rtl8723au/include/rtl8723a_hal.h index ad3a442bc000..8ee301b44f0f 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_hal.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_hal.h @@ -193,7 +193,7 @@ enum ChannelPlan /* | | Reserved(14bytes) | */ /* */ -/* PG data exclude header, dummy 6 bytes frome CP test and reserved 1byte. */ +/* PG data exclude header, dummy 6 bytes from CP test and reserved 1byte. */ #define EFUSE_OOB_PROTECT_BYTES 15 #define EFUSE_REAL_CONTENT_LEN_8723A 512 diff --git a/drivers/staging/rtl8723au/include/rtw_cmd.h b/drivers/staging/rtl8723au/include/rtw_cmd.h index 775dcdc1e7b9..4dcc9253be51 100644 --- a/drivers/staging/rtl8723au/include/rtw_cmd.h +++ b/drivers/staging/rtl8723au/include/rtw_cmd.h @@ -657,7 +657,7 @@ struct TDLSoption_param { Result: 0x00: success -0x01: sucess, and check Response. +0x01: success, and check Response. 0x02: cmd ignored due to duplicated sequcne number 0x03: cmd dropped due to invalid cmd code 0x04: reserved. diff --git a/drivers/staging/rtl8723au/include/rtw_mlme.h b/drivers/staging/rtl8723au/include/rtw_mlme.h index a6751f138336..dbd3a5f5c523 100644 --- a/drivers/staging/rtl8723au/include/rtw_mlme.h +++ b/drivers/staging/rtl8723au/include/rtw_mlme.h @@ -50,11 +50,11 @@ #define WIFI_SITE_MONITOR 0x00000800 #define WIFI_MP_STATE 0x00010000 -#define WIFI_MP_CTX_BACKGROUND 0x00020000 /* in continous tx background */ -#define WIFI_MP_CTX_ST 0x00040000 /* in continous tx with single-tone */ -#define WIFI_MP_CTX_BACKGROUND_PENDING 0x00080000 /* pending in continous tx background due to out of skb */ -#define WIFI_MP_CTX_CCK_HW 0x00100000 /* in continous tx */ -#define WIFI_MP_CTX_CCK_CS 0x00200000 /* in continous tx with carrier suppression */ +#define WIFI_MP_CTX_BACKGROUND 0x00020000 /* in continuous tx background */ +#define WIFI_MP_CTX_ST 0x00040000 /* in continuous tx with single-tone */ +#define WIFI_MP_CTX_BACKGROUND_PENDING 0x00080000 /* pending in continuous tx background due to out of skb */ +#define WIFI_MP_CTX_CCK_HW 0x00100000 /* in continuous tx */ +#define WIFI_MP_CTX_CCK_CS 0x00200000 /* in continuous tx with carrier suppression */ #define WIFI_MP_LPBK_STATE 0x00400000 #define _FW_UNDER_LINKING WIFI_UNDER_LINKING diff --git a/drivers/staging/rtl8723au/include/rtw_mlme_ext.h b/drivers/staging/rtl8723au/include/rtw_mlme_ext.h index ffb37b252fc1..ea2a6c914d38 100644 --- a/drivers/staging/rtl8723au/include/rtw_mlme_ext.h +++ b/drivers/staging/rtl8723au/include/rtw_mlme_ext.h @@ -103,7 +103,7 @@ extern unsigned char WMM_PARA_OUI23A[]; /* Note: */ /* We just add new channel plan when the new channel plan is different from any of the following */ /* channel plan. */ -/* If you just wnat to customize the acitions(scan period or join actions) about one of the channel plan, */ +/* If you just want to customize the actions(scan period or join actions) about one of the channel plan, */ /* customize them in struct rt_channel_info in the RT_CHANNEL_LIST. */ /* */ enum { /* _RT_CHANNEL_DOMAIN */ diff --git a/drivers/staging/rtl8723au/include/sta_info.h b/drivers/staging/rtl8723au/include/sta_info.h index c756b4f7f5d5..e7260050e533 100644 --- a/drivers/staging/rtl8723au/include/sta_info.h +++ b/drivers/staging/rtl8723au/include/sta_info.h @@ -332,7 +332,7 @@ struct sta_priv { */ struct sta_info *sta_aid[NUM_STA]; - u16 sta_dz_bitmap;/* only support 15 stations, staion aid bitmap + u16 sta_dz_bitmap;/* only support 15 stations, station aid bitmap * for sleeping sta. */ u16 tim_bitmap;/* only support 15 stations, * aid=0~15 mapping bit0~bit15 */ -- cgit v1.2.3 From 95829dcbeeba19146f7321658d311146399bef5d Mon Sep 17 00:00:00 2001 From: Edward Lipinsky Date: Sat, 18 Apr 2015 09:35:19 -0700 Subject: Staging: rtl8723au: hal: Remove trailing whitespace in odm.c This patch fixes the checkpatch.pl error: ERROR: trailing whitespace Signed-off-by: Edward Lipinsky Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/hal/odm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/staging/rtl8723au') diff --git a/drivers/staging/rtl8723au/hal/odm.c b/drivers/staging/rtl8723au/hal/odm.c index eb598cf8d229..f354f5e11a30 100644 --- a/drivers/staging/rtl8723au/hal/odm.c +++ b/drivers/staging/rtl8723au/hal/odm.c @@ -388,7 +388,7 @@ void odm_CommonInfoSelfInit23a(struct dm_odm_t *pDM_Odm) pDM_Odm->bCckHighPower = true; else pDM_Odm->bCckHighPower = false; - + pDM_Odm->RFPathRxEnable = rtl8723au_read32(pDM_Odm->Adapter, rOFDM0_TRxPathEnable) & 0x0F; -- cgit v1.2.3 From 77198552a481192fe9c7ce6cfd8a54231598a71a Mon Sep 17 00:00:00 2001 From: "Gujulan Elango, Hari Prasath (H.)" Date: Tue, 12 May 2015 10:01:18 +0000 Subject: staging: rtl8723au: remove redundant initialization The variable pHalData is initialized twice in this same function with same value.So removing one of them. Signed-off-by: Hari Prasath Gujulan Elango Acked-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/hal/rtl8723a_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/staging/rtl8723au') diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c b/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c index 11e1108d0c56..9733aa6ef908 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c @@ -55,7 +55,7 @@ int FillH2CCmd(struct rtw_adapter *padapter, u8 ElementID, u32 CmdLen, u8 h2c_box_num; u32 msgbox_addr; u32 msgbox_ex_addr; - struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter); + struct hal_data_8723a *pHalData; u32 h2c_cmd = 0; u16 h2c_cmd_ex = 0; int ret = _FAIL; -- cgit v1.2.3 From 711c9b3ce441fc0e373ab0f7487dd6ce01117d61 Mon Sep 17 00:00:00 2001 From: Juston Li Date: Fri, 22 May 2015 22:03:04 -0700 Subject: staging: rtl8723au: fix sparse warning change cast to __le16 to fix the following warning: drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:1488:20: warning: cast to restricted __le16 Signed-off-by: Juston Li Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/staging/rtl8723au') diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c index efe173072ad5..cb5076abda8b 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c @@ -1485,7 +1485,7 @@ void Hal_EfuseParseIDCode(struct rtw_adapter *padapter, u8 *hwinfo) u16 EEPROMId; /* Checl 0x8129 again for making sure autoload status!! */ - EEPROMId = le16_to_cpu(*((u16 *) hwinfo)); + EEPROMId = le16_to_cpu(*((__le16 *) hwinfo)); if (EEPROMId != RTL_EEPROM_ID) { DBG_8723A("EEPROM ID(%#x) is invalid!!\n", EEPROMId); pEEPROM->bautoload_fail_flag = true; -- cgit v1.2.3 From b2f23a2d71dd5ed3a0eed70e37db32b99d774c69 Mon Sep 17 00:00:00 2001 From: Luca Ceresoli Date: Tue, 19 May 2015 11:35:20 +0200 Subject: staging: rtl8723au: remove useless return value The loadparam() function cannot fail, it's called only once and its return value is ignored there. Signed-off-by: Luca Ceresoli Cc: Greg Kroah-Hartman Cc: Larry Finger Cc: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/os_dep/os_intfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/staging/rtl8723au') diff --git a/drivers/staging/rtl8723au/os_dep/os_intfs.c b/drivers/staging/rtl8723au/os_dep/os_intfs.c index 83696360c293..fab1e608fdc6 100644 --- a/drivers/staging/rtl8723au/os_dep/os_intfs.c +++ b/drivers/staging/rtl8723au/os_dep/os_intfs.c @@ -172,7 +172,7 @@ MODULE_PARM_DESC(debug, "Set debug level (1-9) (default 1)"); static int netdev_close(struct net_device *pnetdev); -static int loadparam(struct rtw_adapter *padapter, struct net_device *pnetdev) +static void loadparam(struct rtw_adapter *padapter, struct net_device *pnetdev) { struct registry_priv *registry_par = &padapter->registrypriv; @@ -233,7 +233,6 @@ static int loadparam(struct rtw_adapter *padapter, struct net_device *pnetdev) snprintf(registry_par->if2name, 16, "%s", if2name); registry_par->notch_filter = (u8)rtw_notch_filter; registry_par->regulatory_tid = (u8)rtw_regulatory_id; - return _SUCCESS; } static int rtw_net_set_mac_address(struct net_device *pnetdev, void *p) -- cgit v1.2.3 From e630eb48ff320b52ea1a1237e8ed0d23e4e9e900 Mon Sep 17 00:00:00 2001 From: Luca Ceresoli Date: Tue, 19 May 2015 11:35:21 +0200 Subject: staging: rtl8723au: remove useless comment "step 2" does mean much as there is no "step 1" stated anywhere... Signed-off-by: Luca Ceresoli Cc: Greg Kroah-Hartman Cc: Larry Finger Cc: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/os_dep/os_intfs.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/staging/rtl8723au') diff --git a/drivers/staging/rtl8723au/os_dep/os_intfs.c b/drivers/staging/rtl8723au/os_dep/os_intfs.c index fab1e608fdc6..b8848c25beb4 100644 --- a/drivers/staging/rtl8723au/os_dep/os_intfs.c +++ b/drivers/staging/rtl8723au/os_dep/os_intfs.c @@ -371,7 +371,6 @@ struct net_device *rtw_init_netdev23a(struct rtw_adapter *old_padapter) pnetdev->watchdog_timeo = HZ*3; /* 3 second timeout */ - /* step 2. */ loadparam(padapter, pnetdev); return pnetdev; } -- cgit v1.2.3 From af17b56d1f42bd761709ec68a00ce4f1a089e597 Mon Sep 17 00:00:00 2001 From: David Decotigny Date: Sun, 7 Jun 2015 17:43:01 -0700 Subject: staging: rtl8723au: core: avoid bitwise arithmetic with forced endianness This fixes bitwise arithmetic performed on the host on a variable previously converted to little-endian, and subsequently converted again to little-endian: - issue_action_BA23a() called with "status" crafted in host byte order - "status" converted to LE - bitwise arithmetic on the (LE) "status", performed with masks and shifts in host byte order - result converted to LE (again) and stored in device structure Sparse warning addressed by this patch: drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3806:16: warning: incorrect type in assignment (different base types) drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3806:16: expected unsigned short [unsigned] status drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3806:16: got restricted __le16 [usertype] Additional notes: initial cpu_to_le16 was introduced by kernel bulk commit 5e93f3520 "staging: r8723au: Add source files for new driver - part 1", initially from github according to commit description. On github, this traces back to another bulk commit: 2896bda04353 "Add new files in core directory", which is the 1st version of the driver. Signed-off-by: David Decotigny Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/core/rtw_mlme_ext.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/staging/rtl8723au') diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index 196beafde6f0..7c3b5dd177d2 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -3803,8 +3803,6 @@ void issue_action_BA23a(struct rtw_adapter *padapter, pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr) + 1; - status = cpu_to_le16(status); - switch (action) { case WLAN_ACTION_ADDBA_REQ: pattrib->pktlen += sizeof(mgmt->u.action.u.addba_req); -- cgit v1.2.3 From 02632342d4831dc3d197a45f83de291e2d3980cc Mon Sep 17 00:00:00 2001 From: David Decotigny Date: Sun, 7 Jun 2015 17:43:02 -0700 Subject: staging: rtl8723au: core: remove redundant endianness conversion Source and destination have the same little-endian annotation: this patch removes incorrect byte-swap on non-LE cpus. This addresses the following sparse warning: drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3911:56: warning: incorrect type in argument 1 (different base types) drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3911:56: expected unsigned short [unsigned] [usertype] val drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3911:56: got restricted __le16 [usertype] BA_timeout_value Signed-off-by: David Decotigny Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/core/rtw_mlme_ext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/staging/rtl8723au') diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index 7c3b5dd177d2..142f214108c6 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -3906,8 +3906,8 @@ void issue_action_BA23a(struct rtw_adapter *padapter, put_unaligned_le16(BA_para_set, &mgmt->u.action.u.addba_resp.capab); - put_unaligned_le16(pmlmeinfo->ADDBA_req.BA_timeout_value, - &mgmt->u.action.u.addba_resp.timeout); + mgmt->u.action.u.addba_resp.timeout + = pmlmeinfo->ADDBA_req.BA_timeout_value; pattrib->pktlen += 8; break; -- cgit v1.2.3 From 2ccd94e412be244d46fdf3261763d921d4918761 Mon Sep 17 00:00:00 2001 From: Fabian Frederick Date: Wed, 10 Jun 2015 18:32:17 +0200 Subject: staging: rtl8723au: use swap() in WMMOnAssocRsp23a() Use kernel.h macro definition. Thanks to Julia Lawall for Coccinelle scripting support. Signed-off-by: Fabian Frederick Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/core/rtw_wlan_util.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'drivers/staging/rtl8723au') diff --git a/drivers/staging/rtl8723au/core/rtw_wlan_util.c b/drivers/staging/rtl8723au/core/rtw_wlan_util.c index 5280338aa387..3c1315fc02e5 100644 --- a/drivers/staging/rtl8723au/core/rtw_wlan_util.c +++ b/drivers/staging/rtl8723au/core/rtw_wlan_util.c @@ -573,7 +573,7 @@ void WMMOnAssocRsp23a(struct rtw_adapter *padapter) inx[0] = 0; inx[1] = 1; inx[2] = 2; inx[3] = 3; if (pregpriv->wifi_spec == 1) { - u32 j, tmp, change_inx = false; + u32 j, change_inx = false; /* entry indx: 0->vo, 1->vi, 2->be, 3->bk. */ for (i = 0; i < 4; i++) { @@ -589,14 +589,8 @@ void WMMOnAssocRsp23a(struct rtw_adapter *padapter) } if (change_inx) { - tmp = edca[i]; - edca[i] = edca[j]; - edca[j] = tmp; - - tmp = inx[i]; - inx[i] = inx[j]; - inx[j] = tmp; - + swap(edca[i], edca[j]); + swap(inx[i], inx[j]); change_inx = false; } } -- cgit v1.2.3 From 863eaa79bac1c0d6df7404e87432d823193e2555 Mon Sep 17 00:00:00 2001 From: Luca Ceresoli Date: Fri, 12 Jun 2015 00:20:47 +0200 Subject: staging: rtl8723au: issue_probersp(): remove unused parameter The is_valid_p2p_probereq is never referenced in the function body. Signed-off-by: Luca Ceresoli Cc: Larry Finger Acked-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/core/rtw_mlme_ext.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'drivers/staging/rtl8723au') diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index 142f214108c6..0d7e9215cf3e 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -51,8 +51,7 @@ static void issue_probereq(struct rtw_adapter *padapter, static int issue_probereq_ex(struct rtw_adapter *padapter, struct cfg80211_ssid *pssid, u8 *da, int try_cnt, int wait_ms); -static void issue_probersp(struct rtw_adapter *padapter, unsigned char *da, - u8 is_valid_p2p_probereq); +static void issue_probersp(struct rtw_adapter *padapter, unsigned char *da); static void issue_auth(struct rtw_adapter *padapter, struct sta_info *psta, unsigned short status); static int issue_deauth_ex(struct rtw_adapter *padapter, u8 *da, @@ -760,7 +759,7 @@ OnProbeReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame) if (check_fwstate(pmlmepriv, _FW_LINKED) && pmlmepriv->cur_network.join_res) - issue_probersp(padapter, mgmt->sa, false); + issue_probersp(padapter, mgmt->sa); out: return _SUCCESS; @@ -2503,8 +2502,7 @@ _issue_bcn: dump_mgntframe23a(padapter, pmgntframe); } -static void issue_probersp(struct rtw_adapter *padapter, unsigned char *da, - u8 is_valid_p2p_probereq) +static void issue_probersp(struct rtw_adapter *padapter, unsigned char *da) { struct xmit_frame *pmgntframe; struct pkt_attrib *pattrib; -- cgit v1.2.3 From 73250a7311204bcc7c1803c6b96021f8b04f9903 Mon Sep 17 00:00:00 2001 From: Joglekar Tejas Date: Sun, 14 Jun 2015 03:01:06 +0000 Subject: staging:rtl8723au:ioctl_cfg80211:spaces required around '>' This patch removes the error given by checkpatch.pl " spaces required around that '>' " Signed-off-by: Joglekar Tejas Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/staging/rtl8723au') diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c index bc95ce89af06..feb596123cc3 100644 --- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c @@ -1041,7 +1041,7 @@ static u16 rtw_get_cur_max_rate(struct rtw_adapter *adapter) while (pcur_bss->SupportedRates[i] != 0 && pcur_bss->SupportedRates[i] != 0xFF) { rate = pcur_bss->SupportedRates[i] & 0x7F; - if (rate>max_rate) + if (rate > max_rate) max_rate = rate; i++; } -- cgit v1.2.3 From 2a049f7e64bd622f09ddf970e63782f63aeecfa9 Mon Sep 17 00:00:00 2001 From: Joglekar Tejas Date: Sun, 14 Jun 2015 04:25:28 +0000 Subject: staging:rtl8723au:rtw_ap:space prohibited between function name & '(' This patch removes the warning "space prohibited between function name and open parenthesis"given by checkpatch.pl Signed-off-by: Joglekar Tejas Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/core/rtw_ap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/staging/rtl8723au') diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c b/drivers/staging/rtl8723au/core/rtw_ap.c index 645668950e9c..65b209a20c29 100644 --- a/drivers/staging/rtl8723au/core/rtw_ap.c +++ b/drivers/staging/rtl8723au/core/rtw_ap.c @@ -1642,7 +1642,7 @@ u8 ap_free_sta23a(struct rtw_adapter *padapter, struct sta_info *psta, bool acti return beacon_updated; } -int rtw_ap_inform_ch_switch23a (struct rtw_adapter *padapter, u8 new_ch, u8 ch_offset) +int rtw_ap_inform_ch_switch23a(struct rtw_adapter *padapter, u8 new_ch, u8 ch_offset) { struct list_head *phead, *plist; struct sta_info *psta = NULL; @@ -1663,12 +1663,12 @@ int rtw_ap_inform_ch_switch23a (struct rtw_adapter *padapter, u8 new_ch, u8 ch_o list_for_each(plist, phead) { psta = container_of(plist, struct sta_info, asoc_list); - issue_action_spct_ch_switch23a (padapter, psta->hwaddr, new_ch, ch_offset); + issue_action_spct_ch_switch23a(padapter, psta->hwaddr, new_ch, ch_offset); psta->expire_to = ((pstapriv->expire_to * 2) > 5) ? 5 : (pstapriv->expire_to * 2); } spin_unlock_bh(&pstapriv->asoc_list_lock); - issue_action_spct_ch_switch23a (padapter, bc_addr, new_ch, ch_offset); + issue_action_spct_ch_switch23a(padapter, bc_addr, new_ch, ch_offset); return 0; } @@ -1871,7 +1871,7 @@ void stop_ap_mode23a(struct rtw_adapter *padapter) pmlmeext->bstart_bss = false; /* reset and init security priv , this can refine with rtw_reset_securitypriv23a */ - memset((unsigned char *)&padapter->securitypriv, 0, sizeof (struct security_priv)); + memset((unsigned char *)&padapter->securitypriv, 0, sizeof(struct security_priv)); padapter->securitypriv.ndisauthtype = Ndis802_11AuthModeOpen; padapter->securitypriv.ndisencryptstatus = Ndis802_11WEPDisabled; -- cgit v1.2.3 From 07a55cd9b27a3a3f349617bd5037426ff2995f1c Mon Sep 17 00:00:00 2001 From: Andreas Ruprecht Date: Mon, 15 Jun 2015 15:03:00 +0200 Subject: staging: rtl8723au: core: Remove unneeded #ifdefs In rtw_mlme_ext.c, nested #ifdef blocks form the following structure inside the file: #ifdef CONFIG_8723AU_AP_MODE (line 1323) [...] #ifdef CONFIG_8723AU_AP_MODE (line 1720) [...] #endif (2 more ifdef blocks with CONFIG_8723AU_AP_MODE follow) [...] #endif /* CONFIG_8723AU_AP_MODE */ (line 1763) The inner #ifdefs are unnecessary as they depend on the same condition as the outer #ifdef and can thus be removed. Signed-off-by: Andreas Ruprecht Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/core/rtw_mlme_ext.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'drivers/staging/rtl8723au') diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index 0d7e9215cf3e..be9a3d560a43 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c @@ -1717,7 +1717,6 @@ OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame) /* now the station is qualified to join our BSS... */ if (pstat && pstat->state & WIFI_FW_ASSOC_SUCCESS && status == WLAN_STATUS_SUCCESS) { -#ifdef CONFIG_8723AU_AP_MODE /* 1 bss_cap_update & sta_info_update23a */ bss_cap_update_on_sta_join23a(padapter, pstat); sta_info_update23a(padapter, pstat); @@ -1736,21 +1735,17 @@ OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame) /* 3-(1) report sta add event */ report_add_sta_event23a(padapter, pstat->hwaddr, pstat->aid); -#endif } return _SUCCESS; asoc_class2_error: -#ifdef CONFIG_8723AU_AP_MODE issue_deauth23a(padapter, mgmt->sa, status); -#endif return _FAIL; OnAssocReq23aFail: -#ifdef CONFIG_8723AU_AP_MODE pstat->aid = 0; if (ieee80211_is_assoc_req(mgmt->frame_control)) issue_assocrsp(padapter, status, pstat, @@ -1758,7 +1753,6 @@ OnAssocReq23aFail: else issue_assocrsp(padapter, status, pstat, IEEE80211_STYPE_REASSOC_RESP); -#endif #endif /* CONFIG_8723AU_AP_MODE */ -- cgit v1.2.3 From ff8453b3138aa5da64f70edbfb0912c536ce4510 Mon Sep 17 00:00:00 2001 From: Daniele Alessandrelli Date: Mon, 15 Jun 2015 20:44:20 +0200 Subject: staging: rtl8723au: include/rtl8723a_hal.h: fix Rsvd1 size in fw header struct The size of field Rsvd1 in struct rt_8723a_firmware_hdr should be u8 otherwise we exceeds the boundaries of "LONG WORD 0". This patch fixes the issue. Signed-off-by: Daniele Alessandrelli Acked-by: Jes Sorensen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/include/rtl8723a_hal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/staging/rtl8723au') diff --git a/drivers/staging/rtl8723au/include/rtl8723a_hal.h b/drivers/staging/rtl8723au/include/rtl8723a_hal.h index 8ee301b44f0f..d40e420dd050 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_hal.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_hal.h @@ -85,7 +85,7 @@ struct rt_8723a_firmware_hdr { u8 Function; /* Reserved for different FW function indcation, for further use when driver needs to download different FW in different conditions */ u16 Version; /* FW Version */ u8 Subversion; /* FW Subversion, default 0x00 */ - u16 Rsvd1; + u8 Rsvd1; /* LONG WORD 1 ---- */ -- cgit v1.2.3 From 5534b8a1902f1b1710b1c714f6efc9adfdc86f93 Mon Sep 17 00:00:00 2001 From: Daniele Alessandrelli Date: Mon, 15 Jun 2015 20:44:21 +0200 Subject: staging: rtl8723au: include/rtl8723a_hal.h: use __leXX types in fw header struct This patch makes fields in struct rt_8723a_firmware_hdr use endianness-aware types (__leXX), thus fixing the following sparse warnings: CHECK drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:263:37: warning: cast to restricted __le16 drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:265:39: warning: cast to restricted __le16 drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:277:13: warning: cast to restricted __le16 drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:277:13: warning: cast to restricted __le16 drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:277:13: warning: cast to restricted __le16 Signed-off-by: Daniele Alessandrelli Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/include/rtl8723a_hal.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'drivers/staging/rtl8723au') diff --git a/drivers/staging/rtl8723au/include/rtl8723a_hal.h b/drivers/staging/rtl8723au/include/rtl8723a_hal.h index d40e420dd050..77a0fd485b51 100644 --- a/drivers/staging/rtl8723au/include/rtl8723a_hal.h +++ b/drivers/staging/rtl8723au/include/rtl8723a_hal.h @@ -80,10 +80,13 @@ struct rt_8723a_firmware_hdr { /* 8-byte alinment required */ /* LONG WORD 0 ---- */ - u16 Signature; /* 92C0: test chip; 92C, 88C0: test chip; 88C1: MP A-cut; 92C1: MP A-cut */ + __le16 Signature; /* + * 92C0: test chip; 92C, 88C0: test chip; + * 88C1: MP A-cut; 92C1: MP A-cut + */ u8 Category; /* AP/NIC and USB/PCI */ u8 Function; /* Reserved for different FW function indcation, for further use when driver needs to download different FW in different conditions */ - u16 Version; /* FW Version */ + __le16 Version; /* FW Version */ u8 Subversion; /* FW Subversion, default 0x00 */ u8 Rsvd1; @@ -93,16 +96,16 @@ struct rt_8723a_firmware_hdr { u8 Date; /* Release time Date field */ u8 Hour; /* Release time Hour field */ u8 Minute; /* Release time Minute field */ - u16 RamCodeSize; /* The size of RAM code */ - u16 Rsvd2; + __le16 RamCodeSize; /* The size of RAM code */ + __le16 Rsvd2; /* LONG WORD 2 ---- */ - u32 SvnIdx; /* The SVN entry index */ - u32 Rsvd3; + __le32 SvnIdx; /* The SVN entry index */ + __le32 Rsvd3; /* LONG WORD 3 ---- */ - u32 Rsvd4; - u32 Rsvd5; + __le32 Rsvd4; + __le32 Rsvd5; }; #define DRIVER_EARLY_INT_TIME 0x05 -- cgit v1.2.3 From 3bfef6500818677abdbf5c0d8c3bce0caae539a3 Mon Sep 17 00:00:00 2001 From: Prasanna Karthik Date: Wed, 17 Jun 2015 12:50:14 +0000 Subject: staging:rtl8723au: Fix return statement reported by coccinelle Modified return statement and removed local declaration no longer needed. No Compiler warnings. Signed-off-by: Prasanna Karthik Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/staging/rtl8723au') diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c b/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c index 4909835cc540..11d635d2eac8 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c @@ -500,7 +500,6 @@ phy_RF6052_Config_ParaFile_Fail: int PHY_RF6052_Config8723A(struct rtw_adapter *Adapter) { struct hal_data_8723a *pHalData = GET_HAL_DATA(Adapter); - int rtStatus = _SUCCESS; /* Initialize general global value */ /* TODO: Extend RF_PATH_C and RF_PATH_D in the future */ @@ -510,8 +509,7 @@ int PHY_RF6052_Config8723A(struct rtw_adapter *Adapter) pHalData->NumTotalRFPath = 2; /* Config BB and RF */ - rtStatus = phy_RF6052_Config_ParaFile(Adapter); - return rtStatus; + return phy_RF6052_Config_ParaFile(Adapter); } /* End of HalRf6052.c */ -- cgit v1.2.3