Skip to content

Commit 07e964c

Browse files
Phil Elwellpopcornmix
Phil Elwell
authored andcommitted
net: Fix rtl8192cu build errors on other platforms
Signed-off-by: Phil Elwell <[email protected]> suppress spurious messages Add #if for 3.14 kernel change (#87) Fixes compiling after changes in torvalds/linux@f663dd9 and torvalds/linux@99932d4 Fixes #86 Set dev_type to wlan Fixes #23 Tentatively added support for more 8188CUS based devices. Add support for more 8188CUS and 8192CUS devices Add ProductId for the Netgear N150 - WNA1000M Fixes CONFIG_CONCURRENT_MODE CONFIG_MULTI_VIR_IFACES Fixes compatibility with 3.13 Enables warning in the compiler and fixes some issues, reference => https://github.com/diederikdehaas/rtl8812AU Starts device in station mode instead of monitor, fixes NetworkManager issues Enable cfg80211 support Fix cfg80211 for kernel >= 4.7 Fixes rtl8192cu for kernel >= 4.8 rtl8192: Fixup build fixup: rtl8192cu fixes from milhouse rtl8192: switch to netdev->priv_destructor() When trying to build from the rpi-4.11.y branch, I'm getting the following error : drivers/net/wireless/realtek/rtl8192cu/os_dep/linux/ioctl_cfg80211.c:3464:10: error: 'struct net_device' has no member named 'destructor' It seems to occur since this upstream commit : torvalds/linux@cf124db [...] netdev->priv_destructor() performs all actions to free up the private resources that used to be freed by netdev->destructor(), except for free_netdev(). netdev->needs_free_netdev is a boolean that indicates whether free_netdev() should be done at the end of unregister_netdevice(). Signed-off-by: Bilal Amarni <[email protected]> ARM64: Fix build break for RTL8187/RTL8192CU wifi These drivers use an ASM function from the base system to compute the ipv6 checksum. These functions are not available on ARM64, probably because nobody has bother to write them. The base system does have a generic "C" version, so a simple fix is to include the header to use the generic version on ARM64 only. A longer term solution would be to submit the necessary ASM function to the upstream source. With this change, these drivers now compile without any errors on ARM64. Signed-off-by: Michael Zoran <[email protected]>
1 parent 62abaad commit 07e964c

26 files changed

+245
-114
lines changed

drivers/net/wireless/realtek/rtl8192cu/Makefile

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,37 @@
11
EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS)
22
EXTRA_CFLAGS += -O1
33
#EXTRA_CFLAGS += -O3
4-
#EXTRA_CFLAGS += -Wall
5-
#EXTRA_CFLAGS += -Wextra
4+
EXTRA_CFLAGS += -Wall
5+
EXTRA_CFLAGS += -Wextra
66
#EXTRA_CFLAGS += -Werror
77
#EXTRA_CFLAGS += -pedantic
88
#EXTRA_CFLAGS += -Wshadow -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
99

10+
# The "$(call cc-option,-Wxxx)" macro only includes that option when it's
11+
# supported by the compiler used. It may only work on Debian systems.
12+
13+
# Wdate-time was added in gcc-4.9
14+
EXTRA_CFLAGS += $(call cc-option,-Werror=date-time)
15+
# Wincompatible-pointer-types was added in gcc-5.0
16+
EXTRA_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types)
17+
1018
EXTRA_CFLAGS += -Wno-unused-variable
1119
EXTRA_CFLAGS += -Wno-unused-value
1220
EXTRA_CFLAGS += -Wno-unused-label
1321
EXTRA_CFLAGS += -Wno-unused-parameter
1422
EXTRA_CFLAGS += -Wno-unused-function
1523
EXTRA_CFLAGS += -Wno-unused
1624

17-
EXTRA_CFLAGS += -Wno-uninitialized
25+
# Relax some warnings from '-Wextra' so we won't get flooded with warnings
26+
EXTRA_CFLAGS += -Wno-sign-compare
27+
EXTRA_CFLAGS += -Wno-missing-field-initializers
28+
29+
#EXTRA_CFLAGS += -Wno-uninitialized
1830

1931
EXTRA_CFLAGS += -I$(src)/include
2032

33+
EXTRA_LDFLAGS += --strip-debug
34+
2135
CONFIG_AUTOCFG_CP = n
2236

2337
CONFIG_RTL8192C = y

drivers/net/wireless/realtek/rtl8192cu/core/rtw_ap.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ void rtw_add_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index, u8 *d
210210
PNDIS_802_11_VARIABLE_IEs pIE;
211211
u8 bmatch = _FALSE;
212212
u8 *pie = pnetwork->IEs;
213-
u8 *p, *dst_ie, *premainder_ie=NULL, *pbackup_remainder_ie=NULL;
213+
u8 *p=NULL, *dst_ie=NULL, *premainder_ie=NULL, *pbackup_remainder_ie=NULL;
214214
u32 i, offset, ielen, ie_offset, remainder_ielen = 0;
215215

216216
for (i = sizeof(NDIS_802_11_FIXED_IEs); i < pnetwork->IELength;)
@@ -250,6 +250,9 @@ void rtw_add_bcn_ie(_adapter *padapter, WLAN_BSSID_EX *pnetwork, u8 index, u8 *d
250250
dst_ie = (p+ielen);
251251
}
252252

253+
if(dst_ie == NULL)
254+
return;
255+
253256
if(remainder_ielen>0)
254257
{
255258
pbackup_remainder_ie = rtw_malloc(remainder_ielen);
@@ -357,7 +360,7 @@ void expire_timeout_chk(_adapter *padapter)
357360
{
358361
_irqL irqL;
359362
_list *phead, *plist;
360-
u8 updated;
363+
u8 updated = _FALSE;
361364
struct sta_info *psta=NULL;
362365
struct sta_priv *pstapriv = &padapter->stapriv;
363366
u8 chk_alive_num = 0;

drivers/net/wireless/realtek/rtl8192cu/core/rtw_br_ext.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
#include <linux/icmpv6.h>
5252
#include <net/ndisc.h>
5353
#include <net/checksum.h>
54+
#include <net/ip6_checksum.h>
5455
#endif
5556
#endif
5657

drivers/net/wireless/realtek/rtl8192cu/core/rtw_ieee80211.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1859,7 +1859,8 @@ int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8* category, u8 *act
18591859
{
18601860
const u8 *frame_body = frame + sizeof(struct rtw_ieee80211_hdr_3addr);
18611861
u16 fc;
1862-
u8 c, a;
1862+
u8 c;
1863+
u8 a = ACT_PUBLIC_MAX;
18631864

18641865
fc = le16_to_cpu(((struct rtw_ieee80211_hdr_3addr *)frame)->frame_ctl);
18651866

drivers/net/wireless/realtek/rtl8192cu/core/rtw_ioctl_set.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ extern void indicate_wx_scan_complete_event(_adapter *padapter);
4343
(addr[4] == 0xff) && (addr[5] == 0xff) ) ? _TRUE : _FALSE \
4444
)
4545

46-
u8 rtw_validate_bssid(u8 *bssid)
46+
u8 rtw_validate_bssid(const u8 *bssid)
4747
{
4848
u8 ret = _TRUE;
4949

@@ -535,7 +535,8 @@ _func_exit_;
535535

536536
}
537537

538-
u8 rtw_set_802_11_connect(_adapter* padapter, u8 *bssid, NDIS_802_11_SSID *ssid)
538+
u8 rtw_set_802_11_connect(_adapter *padapter, const u8 *bssid
539+
, NDIS_802_11_SSID *ssid)
539540
{
540541
_irqL irqL;
541542
u8 status = _SUCCESS;

drivers/net/wireless/realtek/rtl8192cu/core/rtw_mlme_ext.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2454,7 +2454,7 @@ unsigned int OnDeAuth(_adapter *padapter, union recv_frame *precv_frame)
24542454
psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe));
24552455
if(psta)
24562456
{
2457-
u8 updated;
2457+
u8 updated = _FALSE;
24582458

24592459
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
24602460
if(rtw_is_list_empty(&psta->asoc_list)==_FALSE)
@@ -2548,7 +2548,7 @@ unsigned int OnDisassoc(_adapter *padapter, union recv_frame *precv_frame)
25482548
psta = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe));
25492549
if(psta)
25502550
{
2551-
u8 updated;
2551+
u8 updated = _FALSE;
25522552

25532553
_enter_critical_bh(&pstapriv->asoc_list_lock, &irqL);
25542554
if(rtw_is_list_empty(&psta->asoc_list)==_FALSE)
@@ -5663,7 +5663,7 @@ unsigned int on_action_public_p2p(union recv_frame *precv_frame)
56635663

56645664
// Commented by Kurt 20120113
56655665
// Get peer_dev_addr here if peer doesn't issue prov_disc frame.
5666-
if( _rtw_memcmp(pwdinfo->rx_prov_disc_info.peerDevAddr, empty_addr, ETH_ALEN) );
5666+
if( _rtw_memcmp(pwdinfo->rx_prov_disc_info.peerDevAddr, empty_addr, ETH_ALEN) )
56675667
_rtw_memcpy(pwdinfo->rx_prov_disc_info.peerDevAddr, GetAddr2Ptr(pframe), ETH_ALEN);
56685668

56695669
result = process_p2p_group_negotation_req( pwdinfo, frame_body, len );
@@ -11932,7 +11932,7 @@ u8 setkey_hdl(_adapter *padapter, u8 *pbuf)
1193211932
u8 set_stakey_hdl(_adapter *padapter, u8 *pbuf)
1193311933
{
1193411934
u16 ctrl=0;
11935-
u8 cam_id;//cam_entry
11935+
u8 cam_id=0;//cam_entry
1193611936
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
1193711937
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
1193811938
struct set_stakey_parm *pparm = (struct set_stakey_parm *)pbuf;

drivers/net/wireless/realtek/rtl8192cu/core/rtw_p2p.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4896,9 +4896,9 @@ void init_wifidirect_info( _adapter* padapter, enum P2P_ROLE role)
48964896
#endif
48974897
#ifdef CONFIG_CONCURRENT_MODE
48984898
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
4899-
struct wifidirect_info *pbuddy_wdinfo;
4900-
struct mlme_priv *pbuddy_mlmepriv;
4901-
struct mlme_ext_priv *pbuddy_mlmeext;
4899+
struct wifidirect_info *pbuddy_wdinfo = NULL;
4900+
struct mlme_priv *pbuddy_mlmepriv = NULL;
4901+
struct mlme_ext_priv *pbuddy_mlmeext = NULL;
49024902
#endif
49034903

49044904
pwdinfo = &padapter->wdinfo;

drivers/net/wireless/realtek/rtl8192cu/core/rtw_recv.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3894,7 +3894,7 @@ int process_recv_indicatepkts(_adapter *padapter, union recv_frame *prframe)
38943894

38953895
}
38963896

3897-
int recv_func_prehandle(_adapter *padapter, union recv_frame *rframe)
3897+
static int recv_func_prehandle(_adapter *padapter, union recv_frame *rframe)
38983898
{
38993899
int ret = _SUCCESS;
39003900
struct rx_pkt_attrib *pattrib = &rframe->u.hdr.attrib;
@@ -3935,7 +3935,7 @@ int recv_func_prehandle(_adapter *padapter, union recv_frame *rframe)
39353935
return ret;
39363936
}
39373937

3938-
int recv_func_posthandle(_adapter *padapter, union recv_frame *prframe)
3938+
static int recv_func_posthandle(_adapter *padapter, union recv_frame *prframe)
39393939
{
39403940
int ret = _SUCCESS;
39413941
union recv_frame *orig_prframe = prframe;
@@ -4107,8 +4107,7 @@ int recv_func_posthandle(_adapter *padapter, union recv_frame *prframe)
41074107
}
41084108

41094109

4110-
int recv_func(_adapter *padapter, union recv_frame *rframe);
4111-
int recv_func(_adapter *padapter, union recv_frame *rframe)
4110+
static int recv_func(_adapter *padapter, union recv_frame *rframe)
41124111
{
41134112
int ret;
41144113
struct rx_pkt_attrib *prxattrib = &rframe->u.hdr.attrib;

drivers/net/wireless/realtek/rtl8192cu/core/rtw_sta_mgt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ _func_exit_;
685685
}
686686

687687
/* any station allocated can be searched by hash list */
688-
struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
688+
struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, const u8 *hwaddr)
689689
{
690690

691691
_irqL irqL;
@@ -696,7 +696,7 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
696696

697697
u32 index;
698698

699-
u8 *addr;
699+
const u8 *addr;
700700

701701
u8 bc_addr[ETH_ALEN] = {0xff,0xff,0xff,0xff,0xff,0xff};
702702

drivers/net/wireless/realtek/rtl8192cu/core/rtw_wlan_util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ void flush_all_cam_entry(_adapter *padapter)
853853
{
854854
struct sta_priv *pstapriv = &padapter->stapriv;
855855
struct sta_info *psta;
856-
u8 cam_id;//cam_entry
856+
u8 cam_id=0;//cam_entry
857857

858858
psta = rtw_get_stainfo(pstapriv, pmlmeinfo->network.MacAddress);
859859
if(psta) {

drivers/net/wireless/realtek/rtl8192cu/core/rtw_xmit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2590,7 +2590,7 @@ struct xmit_frame *rtw_alloc_xmitframe_once(struct xmit_priv *pxmitpriv)
25902590
s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitframe)
25912591
{
25922592
_irqL irqL;
2593-
_queue *queue;
2593+
_queue *queue = NULL;
25942594
_adapter *padapter = pxmitpriv->adapter;
25952595
_pkt *pndis_pkt = NULL;
25962596

drivers/net/wireless/realtek/rtl8192cu/hal/rtl8192c/rtl8192c_rf6052.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ static void getTxPowerWriteValByRegulatory(
373373
{
374374
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
375375
struct dm_priv *pdmpriv = &pHalData->dmpriv;
376-
u8 i, chnlGroup, pwr_diff_limit[4];
376+
u8 i, chnlGroup = 0, pwr_diff_limit[4];
377377
u32 writeVal, customer_limit, rf;
378378

379379
//
@@ -615,7 +615,7 @@ phy_RF6052_Config_ParaFile(
615615
IN PADAPTER Adapter
616616
)
617617
{
618-
u32 u4RegValue;
618+
u32 u4RegValue=0;
619619
u8 eRFPath;
620620
BB_REGISTER_DEFINITION_T *pPhyReg;
621621

drivers/net/wireless/realtek/rtl8192cu/include/autoconf.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@
3131

3232
#define PLATFORM_LINUX 1
3333

34-
//#define CONFIG_IOCTL_CFG80211 1
34+
#define CONFIG_IOCTL_CFG80211 1
3535
#ifdef CONFIG_IOCTL_CFG80211
36-
//#define RTW_USE_CFG80211_STA_EVENT /* Indecate new sta asoc through cfg80211_new_sta */
37-
#define CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER
36+
/* Indicate new sta asoc through cfg80211_new_sta */
37+
#define RTW_USE_CFG80211_STA_EVENT
38+
/*#define CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER*/
3839
//#define CONFIG_DEBUG_CFG80211 1
3940
//#define CONFIG_DRV_ISSUE_PROV_REQ // IOT FOR S2
4041
#define CONFIG_SET_SCAN_DENY_TIMER
@@ -324,7 +325,7 @@
324325

325326
//#define DBG_MEMORY_LEAK 1
326327

327-
#define DBG_CONFIG_ERROR_DETECT
328+
/*#define DBG_CONFIG_ERROR_DETECT*/
328329
//#define DBG_CONFIG_ERROR_RESET
329330

330331
//TX use 1 urb

drivers/net/wireless/realtek/rtl8192cu/include/ioctl_cfg80211.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,15 @@ bool rtw_cfg80211_pwr_mgmt(_adapter *adapter);
149149
#define rtw_cfg80211_rx_mgmt(adapter, freq, sig_dbm, buf, len, gfp) cfg80211_rx_mgmt((adapter)->pnetdev, freq, buf, len, gfp)
150150
#elif (LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0))
151151
#define rtw_cfg80211_rx_mgmt(adapter, freq, sig_dbm, buf, len, gfp) cfg80211_rx_mgmt((adapter)->pnetdev, freq, sig_dbm, buf, len, gfp)
152-
#else
152+
#elif (LINUX_VERSION_CODE < KERNEL_VERSION(3,12,0))
153153
#define rtw_cfg80211_rx_mgmt(adapter, freq, sig_dbm, buf, len, gfp) cfg80211_rx_mgmt((adapter)->rtw_wdev, freq, sig_dbm, buf, len, gfp)
154+
#elif (LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0))
155+
/* 3.12 added a flags argument which is just set to zero*/
156+
#define rtw_cfg80211_rx_mgmt(adapter, freq, sig_dbm, buf, len, gfp) \
157+
cfg80211_rx_mgmt((adapter)->rtw_wdev, freq, sig_dbm, buf, len, 0, gfp)
158+
#else
159+
#define rtw_cfg80211_rx_mgmt(adapter, freq, sig_dbm, buf, len, gfp) \
160+
cfg80211_rx_mgmt((adapter)->rtw_wdev, freq, sig_dbm, buf, len, 0)
154161
#endif
155162

156163
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0)) && !defined(COMPAT_KERNEL_RELEASE)

drivers/net/wireless/realtek/rtl8192cu/include/osdep_service.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,8 @@ __inline static void _set_workitem(_workitem *pwork)
786786
#include <linux/interrupt.h> // for struct tasklet_struct
787787
#include <linux/ip.h>
788788
#include <linux/kthread.h>
789+
#include <linux/signal.h>
790+
#include <linux/sched/signal.h>
789791

790792
#ifdef CONFIG_IOCTL_CFG80211
791793
// #include <linux/ieee80211.h>
@@ -1395,8 +1397,8 @@ void _rtw_usb_buffer_free(struct usb_device *dev, size_t size, void *addr, dma_a
13951397
extern void* rtw_malloc2d(int h, int w, int size);
13961398
extern void rtw_mfree2d(void *pbuf, int h, int w, int size);
13971399

1398-
extern void _rtw_memcpy(void* dec, void* sour, u32 sz);
1399-
extern int _rtw_memcmp(void *dst, void *src, u32 sz);
1400+
extern void _rtw_memcpy(void *dec, const void *sour, u32 sz);
1401+
extern int _rtw_memcmp(const void *dst, const void *src, u32 sz);
14001402
extern void _rtw_memset(void *pbuf, int c, u32 sz);
14011403

14021404
extern void _rtw_init_listhead(_list *list);

drivers/net/wireless/realtek/rtl8192cu/include/rtw_debug.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,15 +313,15 @@ extern u32 GlobalDebugLevel;
313313
#if defined (_dbgdump)
314314
#undef DBG_871X
315315
// #define DBG_871X _dbgdump
316-
#define DBG_871X(...) LOG_LEVEL(_drv_emerg_ , __VA_ARGS__)
316+
#define DBG_871X(...) LOG_LEVEL(_drv_debug_ , __VA_ARGS__)
317317

318318
#undef MSG_8192C
319319
// #define MSG_8192C _dbgdump
320-
#define MSG_8192C(...) LOG_LEVEL(_drv_emerg_ , __VA_ARGS__)
320+
#define MSG_8192C(...) LOG_LEVEL(_drv_info_ , __VA_ARGS__)
321321

322322
#undef DBG_8192C
323323
// #define DBG_8192C _dbgdump
324-
#define DBG_8192C(...) LOG_LEVEL(_drv_emerg_ , __VA_ARGS__)
324+
#define DBG_8192C(...) LOG_LEVEL(_drv_debug_ , __VA_ARGS__)
325325

326326

327327
#undef WRN_8192C

drivers/net/wireless/realtek/rtl8192cu/include/rtw_ioctl_set.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,11 @@ u8 rtw_set_802_11_bssid_list_scan(_adapter* padapter, NDIS_802_11_SSID *pssid, i
6363
u8 rtw_set_802_11_infrastructure_mode(_adapter * padapter, NDIS_802_11_NETWORK_INFRASTRUCTURE networktype);
6464
u8 rtw_set_802_11_remove_wep(_adapter * padapter, u32 keyindex);
6565
u8 rtw_set_802_11_ssid(_adapter * padapter, NDIS_802_11_SSID * ssid);
66-
u8 rtw_set_802_11_connect(_adapter* padapter, u8 *bssid, NDIS_802_11_SSID *ssid);
66+
u8 rtw_set_802_11_connect(_adapter *padapter, const u8 *bssid
67+
, NDIS_802_11_SSID *ssid);
6768
u8 rtw_set_802_11_remove_key(_adapter * padapter, NDIS_802_11_REMOVE_KEY * key);
6869

69-
u8 rtw_validate_bssid(u8 *bssid);
70+
u8 rtw_validate_bssid(const u8 *bssid);
7071
u8 rtw_validate_ssid(NDIS_802_11_SSID *ssid);
7172

7273
u16 rtw_get_cur_max_rate(_adapter *adapter);

drivers/net/wireless/realtek/rtl8192cu/include/sta_info.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ struct sta_priv {
395395
};
396396

397397

398-
__inline static u32 wifi_mac_hash(u8 *mac)
398+
__inline static u32 wifi_mac_hash(const u8 *mac)
399399
{
400400
u32 x;
401401

@@ -423,7 +423,7 @@ struct sta_info *rtw_get_stainfo_by_offset(struct sta_priv *stapriv, int offset)
423423
extern struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr);
424424
extern u32 rtw_free_stainfo(_adapter *padapter , struct sta_info *psta);
425425
extern void rtw_free_all_stainfo(_adapter *padapter);
426-
extern struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr);
426+
extern struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, const u8 *hwaddr);
427427
extern u32 rtw_init_bcmc_stainfo(_adapter* padapter);
428428
extern struct sta_info* rtw_get_bcmc_stainfo(_adapter* padapter);
429429
extern u8 rtw_access_ctrl(_adapter *padapter, u8 *mac_addr);

drivers/net/wireless/realtek/rtl8192cu/include/wifi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ enum WIFI_REG_DOMAIN {
425425
(addr[4] == 0xff) && (addr[5] == 0xff) ) ? _TRUE : _FALSE \
426426
)
427427

428-
__inline static int IS_MCAST(unsigned char *da)
428+
__inline static int IS_MCAST(const unsigned char *da)
429429
{
430430
if ((*da) & 0x01)
431431
return _TRUE;

0 commit comments

Comments
 (0)