remove pointers from struct hal_ops
cover remove pointers from struct hal_ops
This series removes some more pointers from struct hal_ops and removes the function rtl8188e_set_hal_ops() that is empty after the removals.
Michael Straube (7):
staging: r8188eu: remove mgnt_xmit from struct hal_ops
staging: r8188eu: remove hal_xmit from struct hal_ops
staging: r8188eu: remove read_bbreg from struct hal_ops
staging: r8188eu: remove write_bbreg from struct hal_ops
staging: r8188eu: remove read_rfreg from struct hal_ops
staging: r8188eu: remove write_rfreg from struct hal_ops
staging: r8188eu: remove rtl8188e_set_hal_ops()
drivers/staging/r8188eu/core/rtw_debug.c | 8 +-- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 8 +-- drivers/staging/r8188eu/core/rtw_mp.c | 10 ++-- drivers/staging/r8188eu/core/rtw_xmit.c | 9 ++-- drivers/staging/r8188eu/hal/hal_intf.c | 51 ------------------- drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 2 +- .../staging/r8188eu/hal/rtl8188e_hal_init.c | 7 --- drivers/staging/r8188eu/hal/usb_halinit.c | 5 -- drivers/staging/r8188eu/include/hal_intf.h | 29 ----------- .../staging/r8188eu/include/rtl8188e_hal.h | 2 - drivers/staging/r8188eu/os_dep/ioctl_linux.c | 24 ++++----- 11 files changed, 31 insertions(+), 124 deletions(-)
Signature · 1 line
2.33.0
PATCH 1/7 staging: r8188eu: remove mgnt_xmit from struct hal_ops
Remove mgnt_xmit from struct hal_ops and its wrapper rtw_hal_mgnt_xmit(). Call rtl8188eu_mgnt_xmit() directly instead.
--- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 6 +++--- drivers/staging/r8188eu/core/rtw_mp.c | 2 +- drivers/staging/r8188eu/hal/hal_intf.c | 8 -------- drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 2 +- drivers/staging/r8188eu/hal/usb_halinit.c | 1 - drivers/staging/r8188eu/include/hal_intf.h | 4 ---- 6 files changed, 5 insertions(+), 18 deletions(-)
drivers/staging/r8188eu/core/rtw_mlme_ext.c +3 -3
@@ -4258,7 +4258,7 @@ void dump_mgntframe(struct adapter *padapter, struct xmit_frame *pmgntframe)if (padapter->bSurpriseRemoved || padapter->bDriverStopped)return ; -rtw_hal_mgnt_xmit (padapter, pmgntframe); +rtl8188eu_mgnt_xmit (padapter, pmgntframe); }s32 dump_mgntframe_and_wait (struct adapter *padapter,struct xmit_frame *pmgntframe,int timeout_ms)
@@ -4273,7 +4273,7 @@ s32 dump_mgntframe_and_wait(struct adapter *padapter, struct xmit_frame *pmgntfrrtw_sctx_init (&sctx, timeout_ms); pxmitbuf->sctx = &sctx; - ret =rtw_hal_mgnt_xmit (padapter, pmgntframe); + ret =rtl8188eu_mgnt_xmit (padapter, pmgntframe);if (ret == _SUCCESS) ret =rtw_sctx_wait (&sctx);
@@ -4294,7 +4294,7 @@ s32 dump_mgntframe_and_wait_ack(struct adapter *padapter, struct xmit_frame *pmg pxmitpriv->ack_tx = true; pmgntframe->ack_report =1 ; -if (rtw_hal_mgnt_xmit (padapter, pmgntframe) == _SUCCESS) { +if (rtl8188eu_mgnt_xmit (padapter, pmgntframe) == _SUCCESS) { ret =rtw_ack_tx_wait (pxmitpriv, timeout_ms); }
drivers/staging/r8188eu/core/rtw_mp.c +1 -1
@@ -498,7 +498,7 @@ void PhySetTxPowerLevel(struct adapter *pAdapter)/* */ static void dump_mpframe (struct adapter *padapter,struct xmit_frame *pmpframe) { -rtw_hal_mgnt_xmit (padapter, pmpframe); +rtl8188eu_mgnt_xmit (padapter, pmpframe); }static struct xmit_frame *alloc_mp_xmitframe (struct xmit_priv *pxmitpriv)
drivers/staging/r8188eu/hal/hal_intf.c +0 -8
@@ -96,14 +96,6 @@ s32 rtw_hal_xmit(struct adapter *adapt, struct xmit_frame *pxmitframe)return false; } -s32 rtw_hal_mgnt_xmit (struct adapter *adapt,struct xmit_frame *pmgntframe) -{ -s32 ret = _FAIL; -if (adapt->HalFunc.mgnt_xmit) - ret = adapt->HalFunc.mgnt_xmit (adapt, pmgntframe); -return ret; -} -s32 rtw_hal_init_xmit_priv (struct adapter *adapt) {if (adapt->HalFunc.init_xmit_priv)
drivers/staging/r8188eu/hal/rtl8188e_cmd.c +1 -1
@@ -561,7 +561,7 @@ static void SetFwRsvdPagePkt(struct adapter *adapt, bool bDLFinished) pattrib->pktlen = pattrib->last_txcmdsz;memcpy (pmgntframe->buf_addr, ReservedPagePacket, TotalPacketLen); -rtw_hal_mgnt_xmit (adapt, pmgntframe); +rtl8188eu_mgnt_xmit (adapt, pmgntframe);DBG_88E ("%s: Set RSVD page location to Fw\n" , __func__);FillH2CCmd_88E (adapt,H2C_COM_RSVD_PAGE ,sizeof (RsvdPageLoc), (u8 *)&RsvdPageLoc);
drivers/staging/r8188eu/hal/usb_halinit.c +0 -1
@@ -2229,7 +2229,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt) halfunc->SetHalDefVarHandler = &SetHalDefVar8188EUsb; halfunc->hal_xmit = &rtl8188eu_hal_xmit; - halfunc->mgnt_xmit = &rtl8188eu_mgnt_xmit;rtl8188e_set_hal_ops (halfunc); }
drivers/staging/r8188eu/include/hal_intf.h +0 -4
@@ -149,8 +149,6 @@ struct hal_ops {s32 (*hal_xmit)(struct adapter *padapter,struct xmit_frame *pxmitframe); -s32 (*mgnt_xmit)(struct adapter *padapter, -struct xmit_frame *pmgntframe);u32 (*read_bbreg)(struct adapter *padapter,u32 RegAddr,u32 BitMask);
@@ -218,8 +216,6 @@ u32 rtw_hal_inirp_init(struct adapter *padapter);u32 rtw_hal_inirp_deinit (struct adapter *padapter);s32 rtw_hal_xmit (struct adapter *padapter,struct xmit_frame *pxmitframe); -s32 rtw_hal_mgnt_xmit (struct adapter *padapter, -struct xmit_frame *pmgntframe);s32 rtw_hal_init_xmit_priv (struct adapter *padapter);
Signature · 1 line
2.33.0
PATCH 2/7 staging: r8188eu: remove hal_xmit from struct hal_ops
In reply to Michael StraubeRemove hal_xmit from struct hal_ops and its wrapper rtw_hal_xmit(). Call rtl8188eu_hal_xmit() directly instead.
--- drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +- drivers/staging/r8188eu/core/rtw_xmit.c | 9 +++++---- drivers/staging/r8188eu/hal/hal_intf.c | 8 -------- drivers/staging/r8188eu/hal/usb_halinit.c | 2 -- drivers/staging/r8188eu/include/hal_intf.h | 5 ----- 5 files changed, 6 insertions(+), 20 deletions(-)
drivers/staging/r8188eu/core/rtw_mlme_ext.c +1 -1
@@ -8100,7 +8100,7 @@ u8 tx_beacon_hdl(struct adapter *padapter, unsigned char *pbuf) pxmitframe->attrib.qsel =0x11 ;/* HIQ */ spin_unlock_bh (&psta_bmc->sleep_q.lock); -if (rtw_hal_xmit (padapter, pxmitframe)) +if (rtl8188eu_hal_xmit (padapter, pxmitframe))rtw_os_xmit_complete (padapter, pxmitframe);spin_lock_bh (&psta_bmc->sleep_q.lock); }
drivers/staging/r8188eu/core/rtw_xmit.c +5 -4
@@ -9,6 +9,7 @@#include "../include/osdep_intf.h" #include "../include/usb_ops.h" #include "../include/usb_osintf.h" +#include "../include/rtl8188e_xmit.h" static u8 P802_1H_OUI [P80211_OUI_LEN ] = {0x00 ,0x00 ,0xf8 };static u8 RFC1042_OUI [P80211_OUI_LEN ] = {0x00 ,0x00 ,0x00 };
@@ -1780,7 +1781,7 @@ s32 rtw_xmit(struct adapter *padapter, struct sk_buff **ppkt) }spin_unlock_bh (&pxmitpriv->lock); -if (!rtw_hal_xmit (padapter, pxmitframe)) +if (!rtl8188eu_hal_xmit (padapter, pxmitframe))return 1 ;return 0 ;
@@ -2014,7 +2015,7 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta) pxmitframe->attrib.triggered =1 ;spin_unlock_bh (&psta->sleep_q.lock); -if (rtw_hal_xmit (padapter, pxmitframe)) +if (rtl8188eu_hal_xmit (padapter, pxmitframe))rtw_os_xmit_complete (padapter, pxmitframe);spin_lock_bh (&psta->sleep_q.lock); }
@@ -2064,7 +2065,7 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta) pxmitframe->attrib.triggered =1 ;spin_unlock_bh (&psta_bmc->sleep_q.lock); -if (rtw_hal_xmit (padapter, pxmitframe)) +if (rtl8188eu_hal_xmit (padapter, pxmitframe))rtw_os_xmit_complete (padapter, pxmitframe);spin_lock_bh (&psta_bmc->sleep_q.lock); }
@@ -2138,7 +2139,7 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst pxmitframe->attrib.triggered =1 ; -if (rtw_hal_xmit (padapter, pxmitframe)) +if (rtl8188eu_hal_xmit (padapter, pxmitframe))rtw_os_xmit_complete (padapter, pxmitframe);if ((psta->sleepq_ac_len ==0 ) && (!psta->has_legacy_ac) && (wmmps_ac)) {
drivers/staging/r8188eu/hal/hal_intf.c +0 -8
@@ -88,14 +88,6 @@ u32 rtw_hal_inirp_deinit(struct adapter *adapt)return _FAIL; } -s32 rtw_hal_xmit (struct adapter *adapt,struct xmit_frame *pxmitframe) -{ -if (adapt->HalFunc.hal_xmit) -return adapt->HalFunc.hal_xmit (adapt, pxmitframe); - -return false; -} -s32 rtw_hal_init_xmit_priv (struct adapter *adapt) {if (adapt->HalFunc.init_xmit_priv)
drivers/staging/r8188eu/hal/usb_halinit.c +0 -2
@@ -2228,7 +2228,5 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt) halfunc->GetHalDefVarHandler = &GetHalDefVar8188EUsb; halfunc->SetHalDefVarHandler = &SetHalDefVar8188EUsb; - halfunc->hal_xmit = &rtl8188eu_hal_xmit; -rtl8188e_set_hal_ops (halfunc); }
drivers/staging/r8188eu/include/hal_intf.h +0 -5
@@ -147,9 +147,6 @@ struct hal_ops {enum hal_def_variable eVariable, void *pValue); -s32 (*hal_xmit)(struct adapter *padapter, -struct xmit_frame *pxmitframe); -u32 (*read_bbreg)(struct adapter *padapter,u32 RegAddr,u32 BitMask); void (*write_bbreg)(struct adapter *padapter, u32 RegAddr,
@@ -215,8 +212,6 @@ u8 rtw_hal_get_def_var(struct adapter *padapter,u32 rtw_hal_inirp_init (struct adapter *padapter);u32 rtw_hal_inirp_deinit (struct adapter *padapter); -s32 rtw_hal_xmit (struct adapter *padapter,struct xmit_frame *pxmitframe); -s32 rtw_hal_init_xmit_priv (struct adapter *padapter);s32 rtw_hal_init_recv_priv (struct adapter *padapter);
Signature · 1 line
2.33.0
PATCH 3/7 staging: r8188eu: remove read_bbreg from struct hal_ops
In reply to Michael StraubeRemove read_bbreg from struct hal_ops and its wrapper rtw_hal_read_bbreg(). Call rtl8188e_PHY_QueryBBReg() directly instead.
--- drivers/staging/r8188eu/core/rtw_mp.c | 2 +- drivers/staging/r8188eu/hal/hal_intf.c | 9 --------- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 1 - drivers/staging/r8188eu/include/hal_intf.h | 3 --- drivers/staging/r8188eu/os_dep/ioctl_linux.c | 4 ++-- 5 files changed, 3 insertions(+), 16 deletions(-)
drivers/staging/r8188eu/core/rtw_mp.c +1 -1
@@ -9,7 +9,7 @@u32 read_bbreg (struct adapter *padapter,u32 addr,u32 bitmask) { -return rtw_hal_read_bbreg (padapter, addr, bitmask); +return rtl8188e_PHY_QueryBBReg (padapter, addr, bitmask); }void write_bbreg (struct adapter *padapter,u32 addr,u32 bitmask,u32 val)
drivers/staging/r8188eu/hal/hal_intf.c +0 -9
@@ -125,15 +125,6 @@ void rtw_hal_update_ra_mask(struct adapter *adapt, u32 mac_id, u8 rssi_level) } } -u32 rtw_hal_read_bbreg (struct adapter *adapt,u32 regaddr,u32 bitmask) -{ -u32 data =0 ; - -if (adapt->HalFunc.read_bbreg) - data = adapt->HalFunc.read_bbreg (adapt, regaddr, bitmask); -return data; -} -void rtw_hal_write_bbreg (struct adapter *adapt,u32 regaddr,u32 bitmask,u32 data) {
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +0 -1
@@ -1750,7 +1750,6 @@ void hal_notch_filter_8188e(struct adapter *adapter, bool enable) }void rtl8188e_set_hal_ops (struct hal_ops *pHalFunc) { - pHalFunc->read_bbreg = &rtl8188e_PHY_QueryBBReg; pHalFunc->write_bbreg = &rtl8188e_PHY_SetBBReg; pHalFunc->read_rfreg = &rtl8188e_PHY_QueryRFReg; pHalFunc->write_rfreg = &rtl8188e_PHY_SetRFReg;
drivers/staging/r8188eu/include/hal_intf.h +0 -3
@@ -147,8 +147,6 @@ struct hal_ops {enum hal_def_variable eVariable, void *pValue); -u32 (*read_bbreg)(struct adapter *padapter,u32 RegAddr, -u32 BitMask);void (*write_bbreg)(struct adapter *padapter,u32 RegAddr,u32 BitMask,u32 Data); u32 (*read_rfreg)(struct adapter *padapter,
@@ -221,7 +219,6 @@ void rtw_hal_update_ra_mask(struct adapter *padapter, u32 mac_id, u8 level);void rtw_hal_clone_data (struct adapter *dst_adapt,struct adapter *src_adapt); -u32 rtw_hal_read_bbreg (struct adapter *padapter,u32 RegAddr,u32 BitMask);void rtw_hal_write_bbreg (struct adapter *padapter,u32 RegAddr,u32 BitMask,u32 Data); u32 rtw_hal_read_rfreg(struct adapter *padapter, enum rf_radio_path eRFPath,
drivers/staging/r8188eu/os_dep/ioctl_linux.c +2 -2
@@ -3958,11 +3958,11 @@ static int rtw_dbg_port(struct net_device *dev, }break ;case 0x72 :/* read_bb */ -DBG_88E ("read_bbreg(0x%x) = 0x%x\n" , arg,rtw_hal_read_bbreg (padapter, arg,0xffffffff )); +DBG_88E ("read_bbreg(0x%x) = 0x%x\n" , arg,rtl8188e_PHY_QueryBBReg (padapter, arg,0xffffffff ));break ;case 0x73 :/* write_bb */ rtw_hal_write_bbreg (padapter, arg,0xffffffff , extra_arg); -DBG_88E ("write_bbreg(0x%x) = 0x%x\n" , arg,rtw_hal_read_bbreg (padapter, arg,0xffffffff )); +DBG_88E ("write_bbreg(0x%x) = 0x%x\n" , arg,rtl8188e_PHY_QueryBBReg (padapter, arg,0xffffffff ));break ;case 0x74 :/* read_rf */ DBG_88E ("read RF_reg path(0x%02x), offset(0x%x), value(0x%08x)\n" , minor_cmd, arg,rtw_hal_read_rfreg (padapter, minor_cmd, arg,0xffffffff ));
Signature · 1 line
2.33.0
PATCH 4/7 staging: r8188eu: remove write_bbreg from struct hal_ops
In reply to Michael StraubeRemove write_bbreg from struct hal_ops and its wrapper rtw_hal_write_bbreg(). Call rtl8188e_PHY_SetBBReg() directly instead.
--- drivers/staging/r8188eu/core/rtw_mp.c | 2 +- drivers/staging/r8188eu/hal/hal_intf.c | 7 ------- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 1 - drivers/staging/r8188eu/include/hal_intf.h | 4 ---- drivers/staging/r8188eu/os_dep/ioctl_linux.c | 2 +- 5 files changed, 2 insertions(+), 14 deletions(-)
drivers/staging/r8188eu/core/rtw_mp.c +1 -1
@@ -14,7 +14,7 @@ u32 read_bbreg(struct adapter *padapter, u32 addr, u32 bitmask)void write_bbreg (struct adapter *padapter,u32 addr,u32 bitmask,u32 val) { -rtw_hal_write_bbreg (padapter, addr, bitmask, val); +rtl8188e_PHY_SetBBReg (padapter, addr, bitmask, val); }u32 _read_rfreg (struct adapter *padapter,u8 rfpath,u32 addr,u32 bitmask)
drivers/staging/r8188eu/hal/hal_intf.c +0 -7
@@ -125,13 +125,6 @@ void rtw_hal_update_ra_mask(struct adapter *adapt, u32 mac_id, u8 rssi_level) } } -void rtw_hal_write_bbreg (struct adapter *adapt,u32 regaddr,u32 bitmask, -u32 data) -{ -if (adapt->HalFunc.write_bbreg) - adapt->HalFunc.write_bbreg (adapt, regaddr, bitmask, data); -} -u32 rtw_hal_read_rfreg (struct adapter *adapt,enum rf_radio_path rfpath,u32 regaddr,u32 bitmask) {
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +0 -1
@@ -1750,7 +1750,6 @@ void hal_notch_filter_8188e(struct adapter *adapter, bool enable) }void rtl8188e_set_hal_ops (struct hal_ops *pHalFunc) { - pHalFunc->write_bbreg = &rtl8188e_PHY_SetBBReg; pHalFunc->read_rfreg = &rtl8188e_PHY_QueryRFReg; pHalFunc->write_rfreg = &rtl8188e_PHY_SetRFReg; }
drivers/staging/r8188eu/include/hal_intf.h +0 -4
@@ -147,8 +147,6 @@ struct hal_ops {enum hal_def_variable eVariable, void *pValue); -void (*write_bbreg)(struct adapter *padapter,u32 RegAddr, -u32 BitMask,u32 Data);u32 (*read_rfreg)(struct adapter *padapter,enum rf_radio_path eRFPath,u32 RegAddr,u32 BitMask);
@@ -219,8 +217,6 @@ void rtw_hal_update_ra_mask(struct adapter *padapter, u32 mac_id, u8 level);void rtw_hal_clone_data (struct adapter *dst_adapt,struct adapter *src_adapt); -void rtw_hal_write_bbreg (struct adapter *padapter,u32 RegAddr,u32 BitMask, -u32 Data);u32 rtw_hal_read_rfreg (struct adapter *padapter,enum rf_radio_path eRFPath,u32 RegAddr,u32 BitMask); void rtw_hal_write_rfreg(struct adapter *padapter,
drivers/staging/r8188eu/os_dep/ioctl_linux.c +1 -1
@@ -3961,7 +3961,7 @@ static int rtw_dbg_port(struct net_device *dev,DBG_88E ("read_bbreg(0x%x) = 0x%x\n" , arg,rtl8188e_PHY_QueryBBReg (padapter, arg,0xffffffff ));break ;case 0x73 :/* write_bb */ -rtw_hal_write_bbreg (padapter, arg,0xffffffff , extra_arg); +rtl8188e_PHY_SetBBReg (padapter, arg,0xffffffff , extra_arg);DBG_88E ("write_bbreg(0x%x) = 0x%x\n" , arg,rtl8188e_PHY_QueryBBReg (padapter, arg,0xffffffff ));break ;case 0x74 :/* read_rf */
Signature · 1 line
2.33.0
PATCH 5/7 staging: r8188eu: remove read_rfreg from struct hal_ops
In reply to Michael StraubeRemove read_rfreg from struct hal_ops and its wrapper rtw_hal_read_rfreg(). Call rtl8188e_PHY_QueryRFReg() directly instead.
--- drivers/staging/r8188eu/core/rtw_debug.c | 8 ++++---- drivers/staging/r8188eu/core/rtw_mp.c | 2 +- drivers/staging/r8188eu/hal/hal_intf.c | 11 ----------- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 1 - drivers/staging/r8188eu/include/hal_intf.h | 5 ----- drivers/staging/r8188eu/os_dep/ioctl_linux.c | 12 ++++++------ 6 files changed, 11 insertions(+), 28 deletions(-)
drivers/staging/r8188eu/core/rtw_debug.c +4 -4
@@ -428,7 +428,7 @@ int proc_get_rf_reg_dump1(char *page, char **start, path =1 ; len +=snprintf (page + len, count - len,"\nRF_Path(%x)\n" , path);for (i =0 ; i <0xC0 ; i++) { - value =rtw_hal_read_rfreg (padapter, path, i,0xffffffff ); + value =rtl8188e_PHY_QueryRFReg (padapter, path, i,0xffffffff );if (j %4 ==1 ) len +=snprintf (page + len, count - len,"0x%02x " , i); len +=snprintf (page + len, count - len," 0x%08x " , value);
@@ -453,7 +453,7 @@ int proc_get_rf_reg_dump2(char *page, char **start, path =1 ; len +=snprintf (page + len, count - len,"\nRF_Path(%x)\n" , path);for (i =0xC0 ; i <0x100 ; i++) { - value =rtw_hal_read_rfreg (padapter, path, i,0xffffffff ); + value =rtl8188e_PHY_QueryRFReg (padapter, path, i,0xffffffff );if (j %4 ==1 ) len +=snprintf (page + len, count - len,"0x%02x " , i); len +=snprintf (page + len, count - len," 0x%08x " , value);
@@ -478,7 +478,7 @@ int proc_get_rf_reg_dump3(char *page, char **start, path =2 ; len +=snprintf (page + len, count - len,"\nRF_Path(%x)\n" , path);for (i =0 ; i <0xC0 ; i++) { - value =rtw_hal_read_rfreg (padapter, path, i,0xffffffff ); + value =rtl8188e_PHY_QueryRFReg (padapter, path, i,0xffffffff );if (j %4 ==1 ) len +=snprintf (page + len, count - len,"0x%02x " , i); len +=snprintf (page + len, count - len," 0x%08x " , value);
@@ -504,7 +504,7 @@ int proc_get_rf_reg_dump4(char *page, char **start, path =2 ; len +=snprintf (page + len, count - len,"\nRF_Path(%x)\n" , path);for (i =0xC0 ; i <0x100 ; i++) { - value =rtw_hal_read_rfreg (padapter, path, i,0xffffffff ); + value =rtl8188e_PHY_QueryRFReg (padapter, path, i,0xffffffff );if (j %4 ==1 ) len +=snprintf (page + len, count - len,"0x%02x " , i); len +=snprintf (page + len, count - len," 0x%08x " , value);
drivers/staging/r8188eu/core/rtw_mp.c +1 -1
@@ -19,7 +19,7 @@ void write_bbreg(struct adapter *padapter, u32 addr, u32 bitmask, u32 val)u32 _read_rfreg (struct adapter *padapter,u8 rfpath,u32 addr,u32 bitmask) { -return rtw_hal_read_rfreg (padapter, (enum rf_radio_path )rfpath, addr, bitmask); +return rtl8188e_PHY_QueryRFReg (padapter, (enum rf_radio_path )rfpath, addr, bitmask); }void _write_rfreg (struct adapter *padapter,u8 rfpath,u32 addr,u32 bitmask,u32 val)
drivers/staging/r8188eu/hal/hal_intf.c +0 -11
@@ -125,17 +125,6 @@ void rtw_hal_update_ra_mask(struct adapter *adapt, u32 mac_id, u8 rssi_level) } } -u32 rtw_hal_read_rfreg (struct adapter *adapt,enum rf_radio_path rfpath, -u32 regaddr,u32 bitmask) -{ -u32 data =0 ; - -if (adapt->HalFunc.read_rfreg) - data = adapt->HalFunc.read_rfreg (adapt, rfpath, regaddr, - bitmask); -return data; -} -void rtw_hal_write_rfreg (struct adapter *adapt,enum rf_radio_path rfpath,u32 regaddr,u32 bitmask,u32 data) {
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +0 -1
@@ -1750,7 +1750,6 @@ void hal_notch_filter_8188e(struct adapter *adapter, bool enable) }void rtl8188e_set_hal_ops (struct hal_ops *pHalFunc) { - pHalFunc->read_rfreg = &rtl8188e_PHY_QueryRFReg; pHalFunc->write_rfreg = &rtl8188e_PHY_SetRFReg; }
drivers/staging/r8188eu/include/hal_intf.h +0 -5
@@ -147,9 +147,6 @@ struct hal_ops {enum hal_def_variable eVariable, void *pValue); -u32 (*read_rfreg)(struct adapter *padapter, -enum rf_radio_path eRFPath,u32 RegAddr, -u32 BitMask);void (*write_rfreg)(struct adapter *padapter,enum rf_radio_path eRFPath,u32 RegAddr,u32 BitMask,u32 Data);
@@ -217,8 +214,6 @@ void rtw_hal_update_ra_mask(struct adapter *padapter, u32 mac_id, u8 level);void rtw_hal_clone_data (struct adapter *dst_adapt,struct adapter *src_adapt); -u32 rtw_hal_read_rfreg (struct adapter *padapter,enum rf_radio_path eRFPath, -u32 RegAddr,u32 BitMask);void rtw_hal_write_rfreg (struct adapter *padapter,enum rf_radio_path eRFPath,u32 RegAddr,u32 BitMask,u32 Data);
drivers/staging/r8188eu/os_dep/ioctl_linux.c +6 -6
@@ -2122,7 +2122,7 @@ static int rtw_wx_read_rf(struct net_device *dev, path = *(u32 *)extra; addr = *((u32 *)extra +1 ); - data32 =rtw_hal_read_rfreg (padapter, path, addr,0xFFFFF ); + data32 =rtl8188e_PHY_QueryRFReg (padapter, path, addr,0xFFFFF );/* * IMPORTANT!! * Only when wireless private ioctl is at odd order,
@@ -2262,7 +2262,7 @@ static void rtw_dbg_mode_hdl(struct adapter *padapter, u32 id, u8 *pdata, u32 le path = (u8 )prfreg->path; offset = (u8 )prfreg->offset; - value =rtw_hal_read_rfreg (padapter, path, offset,0xffffffff ); + value =rtl8188e_PHY_QueryRFReg (padapter, path, offset,0xffffffff ); prfreg->value = value;
@@ -3890,7 +3890,7 @@ static void rf_reg_dump(struct adapter *padapter)for (path =0 ; path < path_nums; path++) {pr_info ("\nRF_Path(%x)\n" , path);for (i =0 ; i <0x100 ; i++) { - value =rtw_hal_read_rfreg (padapter, path, i,0xffffffff ); + value =rtl8188e_PHY_QueryRFReg (padapter, path, i,0xffffffff );if (j %4 ==1 )pr_info ("0x%02x " , i);pr_info (" 0x%08x " , value);
@@ -3965,11 +3965,11 @@ static int rtw_dbg_port(struct net_device *dev,DBG_88E ("write_bbreg(0x%x) = 0x%x\n" , arg,rtl8188e_PHY_QueryBBReg (padapter, arg,0xffffffff ));break ;case 0x74 :/* read_rf */ -DBG_88E ("read RF_reg path(0x%02x), offset(0x%x), value(0x%08x)\n" , minor_cmd, arg,rtw_hal_read_rfreg (padapter, minor_cmd, arg,0xffffffff )); +DBG_88E ("read RF_reg path(0x%02x), offset(0x%x), value(0x%08x)\n" , minor_cmd, arg,rtl8188e_PHY_QueryRFReg (padapter, minor_cmd, arg,0xffffffff ));break ;case 0x75 :/* write_rf */ rtw_hal_write_rfreg (padapter, minor_cmd, arg,0xffffffff , extra_arg); -DBG_88E ("write RF_reg path(0x%02x), offset(0x%x), value(0x%08x)\n" , minor_cmd, arg,rtw_hal_read_rfreg (padapter, minor_cmd, arg,0xffffffff )); +DBG_88E ("write RF_reg path(0x%02x), offset(0x%x), value(0x%08x)\n" , minor_cmd, arg,rtl8188e_PHY_QueryRFReg (padapter, minor_cmd, arg,0xffffffff ));break ;case 0x76 :
@@ -6069,7 +6069,7 @@ static int rtw_mp_dump(struct net_device *dev,for (path =0 ; path < path_nums; path++) {for (i =0 ; i <0x34 ; i++) { - value =rtw_hal_read_rfreg (padapter, path, i,0xffffffff ); + value =rtl8188e_PHY_QueryRFReg (padapter, path, i,0xffffffff );if (j %4 ==1 )DBG_88E ("0x%02x " , i);DBG_88E (" 0x%08x " , value);
Signature · 1 line
2.33.0
PATCH 6/7 staging: r8188eu: remove write_rfreg from struct hal_ops
In reply to Michael StraubeRemove write_rfreg from struct hal_ops and its wrapper rtw_hal_write_rfreg(). Call rtl8188e_PHY_SetRFReg() directly instead.
--- drivers/staging/r8188eu/core/rtw_mp.c | 2 +- drivers/staging/r8188eu/hal/hal_intf.c | 8 -------- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 1 - drivers/staging/r8188eu/include/hal_intf.h | 8 -------- drivers/staging/r8188eu/os_dep/ioctl_linux.c | 6 +++--- 5 files changed, 4 insertions(+), 21 deletions(-)
drivers/staging/r8188eu/core/rtw_mp.c +1 -1
@@ -24,7 +24,7 @@ u32 _read_rfreg(struct adapter *padapter, u8 rfpath, u32 addr, u32 bitmask)void _write_rfreg (struct adapter *padapter,u8 rfpath,u32 addr,u32 bitmask,u32 val) { -rtw_hal_write_rfreg (padapter, (enum rf_radio_path )rfpath, addr, bitmask, val); +rtl8188e_PHY_SetRFReg (padapter, (enum rf_radio_path )rfpath, addr, bitmask, val); }u32 read_rfreg (struct adapter *padapter,u8 rfpath,u32 addr)
drivers/staging/r8188eu/hal/hal_intf.c +0 -8
@@ -124,11 +124,3 @@ void rtw_hal_update_ra_mask(struct adapter *adapt, u32 mac_id, u8 rssi_level)UpdateHalRAMask8188EUsb (adapt, mac_id, rssi_level); } } - -void rtw_hal_write_rfreg (struct adapter *adapt,enum rf_radio_path rfpath, -u32 regaddr,u32 bitmask,u32 data) -{ -if (adapt->HalFunc.write_rfreg) - adapt->HalFunc.write_rfreg (adapt, rfpath, regaddr, - bitmask, data); -}
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +0 -1
@@ -1750,7 +1750,6 @@ void hal_notch_filter_8188e(struct adapter *adapter, bool enable) }void rtl8188e_set_hal_ops (struct hal_ops *pHalFunc) { - pHalFunc->write_rfreg = &rtl8188e_PHY_SetRFReg; }u8 GetEEPROMSize8188E (struct adapter *padapter)
drivers/staging/r8188eu/include/hal_intf.h +0 -8
@@ -146,10 +146,6 @@ struct hal_ops {u8 (*SetHalDefVarHandler)(struct adapter *padapter,enum hal_def_variable eVariable,void *pValue); - -void (*write_rfreg)(struct adapter *padapter, -enum rf_radio_path eRFPath,u32 RegAddr, -u32 BitMask,u32 Data); };#define RF_CHANGE_BY_INIT 0
@@ -214,10 +210,6 @@ void rtw_hal_update_ra_mask(struct adapter *padapter, u32 mac_id, u8 level);void rtw_hal_clone_data (struct adapter *dst_adapt,struct adapter *src_adapt); -void rtw_hal_write_rfreg (struct adapter *padapter, -enum rf_radio_path eRFPath,u32 RegAddr, -u32 BitMask,u32 Data); -void indicate_wx_scan_complete_event (struct adapter *padapter);u8 rtw_do_join (struct adapter *padapter);
drivers/staging/r8188eu/os_dep/ioctl_linux.c +3 -3
@@ -2143,7 +2143,7 @@ static int rtw_wx_write_rf(struct net_device *dev, path = *(u32 *)extra; addr = *((u32 *)extra +1 ); data32 = *((u32 *)extra +2 ); -rtw_hal_write_rfreg (padapter, path, addr,0xFFFFF , data32); +rtl8188e_PHY_SetRFReg (padapter, path, addr,0xFFFFF , data32);return 0 ; }
@@ -2275,7 +2275,7 @@ static void rtw_dbg_mode_hdl(struct adapter *padapter, u32 id, u8 *pdata, u32 le offset = (u8 )prfreg->offset; value = prfreg->value; -rtw_hal_write_rfreg (padapter, path, offset,0xffffffff , value); +rtl8188e_PHY_SetRFReg (padapter, path, offset,0xffffffff , value);break ;case GEN_MP_IOCTL_SUBCODE (TRIGGER_GPIO ):
@@ -3968,7 +3968,7 @@ static int rtw_dbg_port(struct net_device *dev,DBG_88E ("read RF_reg path(0x%02x), offset(0x%x), value(0x%08x)\n" , minor_cmd, arg,rtl8188e_PHY_QueryRFReg (padapter, minor_cmd, arg,0xffffffff ));break ;case 0x75 :/* write_rf */ -rtw_hal_write_rfreg (padapter, minor_cmd, arg,0xffffffff , extra_arg); +rtl8188e_PHY_SetRFReg (padapter, minor_cmd, arg,0xffffffff , extra_arg);DBG_88E ("write RF_reg path(0x%02x), offset(0x%x), value(0x%08x)\n" , minor_cmd, arg,rtl8188e_PHY_QueryRFReg (padapter, minor_cmd, arg,0xffffffff ));break ;
Signature · 1 line
2.33.0
PATCH 7/7 staging: r8188eu: remove rtl8188e_set_hal_ops()
In reply to Michael StraubeAfter the removal of some pointers from struct hal_ops the function rtl8188e_set_hal_ops() is empty now. Remove it.
--- drivers/staging/r8188eu/hal/rtl8188e_hal_init.c | 3 --- drivers/staging/r8188eu/hal/usb_halinit.c | 2 -- drivers/staging/r8188eu/include/rtl8188e_hal.h | 2 -- 3 files changed, 7 deletions(-)
drivers/staging/r8188eu/hal/rtl8188e_hal_init.c +0 -3
@@ -1748,9 +1748,6 @@ void hal_notch_filter_8188e(struct adapter *adapter, bool enable)rtw_write8 (adapter, rOFDM0_RxDSP +1 ,rtw_read8 (adapter, rOFDM0_RxDSP +1 ) & ~BIT (1 )); } } -void rtl8188e_set_hal_ops (struct hal_ops *pHalFunc) -{ -}u8 GetEEPROMSize8188E (struct adapter *padapter) {
drivers/staging/r8188eu/hal/usb_halinit.c +0 -2
@@ -2227,6 +2227,4 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt) halfunc->GetHwRegHandler = &GetHwReg8188EU; halfunc->GetHalDefVarHandler = &GetHalDefVar8188EUsb; halfunc->SetHalDefVarHandler = &SetHalDefVar8188EUsb; - -rtl8188e_set_hal_ops (halfunc); }
drivers/staging/r8188eu/include/rtl8188e_hal.h +0 -2
@@ -432,8 +432,6 @@ void Hal_ReadPowerSavingMode88E(struct adapter *pAdapter, u8 *hwinfo,bool HalDetectPwrDownMode88E (struct adapter *Adapter); -void rtl8188e_set_hal_ops (struct hal_ops *pHalFunc); -void rtl8188e_read_chip_version (struct adapter *padapter);void rtw_IOL_cmd_tx_pkt_buf_dump (struct adapter *Adapter,int len);
Signature · 1 line
2.33.0
Quoted 4 lines · CEST Michael Straube
This series removes some more pointers from struct
hal_opsand removes the functionrtl8188e_set_hal_ops()that is empty after the removals.
Quoted 9 lines
Michael Straube (7):
staging: r8188eu: removemgnt_xmitfrom structhal_ops
staging: r8188eu: removehal_xmitfrom structhal_ops
staging: r8188eu: removeread_bbregfrom structhal_ops
staging: r8188eu: removewrite_bbregfrom structhal_ops
staging: r8188eu: removeread_rfregfrom structhal_ops
staging: r8188eu: removewrite_rfregfrom structhal_ops
staging: r8188eu: removertl8188e_set_hal_ops()
Hi Michael,
This series is good.
Furthermore, I compiled the whole series with gcc version 11.2.1 2020816 [revision 056e324ce46a7924b5cf10f61010cf9dd2ca10e9] (SUSE Linux) one patch at a time. There are no errors or warnings at any time in any of the seven builds.
But, unfortunately, I have no time to test. So the whole series is...
Thanks,
Fabio
Quoted 24 lines · Fabio M. De Francesco
Quoted 4 lines · CEST Michael Straube
This series removes some more pointers from struct
hal_opsand removes the functionrtl8188e_set_hal_ops()that is empty after the removals.Quoted 9 lines
Michael Straube (7):
staging: r8188eu: removemgnt_xmitfrom structhal_ops
staging: r8188eu: removehal_xmitfrom structhal_ops
staging: r8188eu: removeread_bbregfrom structhal_ops
staging: r8188eu: removewrite_bbregfrom structhal_ops
staging: r8188eu: removeread_rfregfrom structhal_ops
staging: r8188eu: removewrite_rfregfrom structhal_ops
staging: r8188eu: removertl8188e_set_hal_ops()Hi Michael,
This series is good.
Furthermore, I compiled the whole series with gcc version 11.2.1 2020816 [revision
056e324ce46a7924b5cf10f61010cf9dd2ca10e9] (SUSE Linux) one patch at a time. There are no errors or warnings at any time in any of the seven builds.
Quoted 8 lines
But, unfortunately, I have no time to test. So the whole series is...
Thanks,
Fabio
Hi Fabio,
thank you for the review. I have tested it on x86_64 with Inter-Tech DMG-02 connected to a CCMP network without any issues.
Perhaps I should have mentioned that in the cover letter. ;)
Thanks,
Michael
Quoted 9 lines · CEST Michael Straube
Quoted 8 lines · Fabio M. De Francesco
[...]
Hi Michael,This series is good.
Furthermore, I compiled the whole series with gcc version 11.2.1 2020816 [revision
056e324ce46a7924b5cf10f61010cf9dd2ca10e9] (SUSE Linux) one patch at a time. There are no errors or warnings at any time in any of
the
Quoted 10 lines
Quoted 9 lines
seven builds.
But, unfortunately, I have no time to test. So the whole series is...
Thanks,
Fabio
Quoted 8 lines
Hi Fabio,
thank you for the review. I have tested it on
x86_64with Inter-Tech DMG-02 connected to a CCMP network without any issues.Perhaps I should have mentioned that in the cover letter. ;)
I see Greg sometimes asks "how did you test it?" when he notices that the developers don't say so explicitly. I guess he wants to know this whenever changes have the potential to interrupt or alter the proper functioning of drivers in ways that aren't clearly identifiable by just reading the code.
I think not all changes require testing. However, I guess it's best to play it safe and say if and how you did the tests.
Thanks,
Fabio
Quoted 4 lines
Thanks,
Michael