diff --git a/Makefile b/Makefile index 5cd241c..cf27ed1 100644 --- a/Makefile +++ b/Makefile @@ -113,6 +113,12 @@ ifeq ($(APIFINAL),WEXT) $(info Using Wireless Extension API) endif +ifeq ($(shell dpkg --print-architecture),amd64) +BINARCH = x86_64 +else +BINARCH = i386 +endif + obj-m += wl.o wl-objs := @@ -126,7 +132,9 @@ EXTRA_CFLAGS += -I$(src)/src/wl/sys -I$(src)/src/wl/phy -I$(src)/src/wl/pp EXTRA_CFLAGS += -I$(src)/src/shared/bcmwifi/include #EXTRA_CFLAGS += -DBCMDBG_ASSERT -DBCMDBG_ERR -EXTRA_LDFLAGS := $(src)/lib/wlc_hybrid.o_shipped +EXTRA_CFLAGS += -Wno-date-time + +EXTRA_LDFLAGS := $(src)/lib/wlc_hybrid.o_shipped_$(BINARCH) KBASE ?= /lib/modules/`uname -r` KBUILD_DIR ?= $(KBASE)/build diff --git a/dkms.conf b/dkms.conf new file mode 100644 index 0000000..d04e9ff --- /dev/null +++ b/dkms.conf @@ -0,0 +1,10 @@ +PACKAGE_NAME="bcmwl" +PACKAGE_VERSION="6.30.223.248+bdcom" +CLEAN="rm -f *.*o" + +BUILT_MODULE_NAME[0]="wl" +MAKE[0]="make -C $kernel_source_dir M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build" +DEST_MODULE_LOCATION[0]="/updates" + + +AUTOINSTALL="yes" diff --git a/lib/wlc_hybrid.o_shipped b/lib/wlc_hybrid.o_shipped deleted file mode 100644 index 7ba97ac..0000000 Binary files a/lib/wlc_hybrid.o_shipped and /dev/null differ diff --git a/lib/wlc_hybrid.o_shipped_x86_64 b/lib/wlc_hybrid.o_shipped_x86_64 new file mode 100644 index 0000000..7ba97ac Binary files /dev/null and b/lib/wlc_hybrid.o_shipped_x86_64 differ diff --git a/src/include/bcmutils.h b/src/include/bcmutils.h index 21f15c3..2d3890b 100644 --- a/src/include/bcmutils.h +++ b/src/include/bcmutils.h @@ -612,11 +612,14 @@ extern void printbig(char *buf); extern void prhex(const char *msg, uchar *buf, uint len); extern bcm_tlv_t *BCMROMFN(bcm_next_tlv)(bcm_tlv_t *elt, int *buflen); +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) extern bcm_tlv_t *BCMROMFN(bcm_parse_tlvs)(void *buf, int buflen, uint key); +#else +extern bcm_tlv_t *BCMROMFN(bcm_parse_tlvs)(const void *buf, int buflen, uint key); +#endif extern bcm_tlv_t *BCMROMFN(bcm_parse_ordered_tlvs)(void *buf, int buflen, uint key); extern const char *bcmerrorstr(int bcmerror); -extern bcm_tlv_t *BCMROMFN(bcm_parse_tlvs)(void *buf, int buflen, uint key); typedef uint32 mbool; #define mboolset(mb, bit) ((mb) |= (bit)) diff --git a/src/include/linuxver.h b/src/include/linuxver.h index 14049fb..0306bbd 100644 --- a/src/include/linuxver.h +++ b/src/include/linuxver.h @@ -169,8 +169,12 @@ typedef irqreturn_t(*FN_ISR) (int irq, void *dev_id, struct pt_regs *ptregs); #define __devexit #endif #ifndef __devinit +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) +#define __devinit +#else #define __devinit __init #endif +#endif #ifndef __devinitdata #define __devinitdata #endif diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c index ea0726f..986c94f 100644 --- a/src/wl/sys/wl_cfg80211_hybrid.c +++ b/src/wl/sys/wl_cfg80211_hybrid.c @@ -63,8 +63,13 @@ static s32 wl_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed); static s32 wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_ibss_params *params); static s32 wl_cfg80211_leave_ibss(struct wiphy *wiphy, struct net_device *dev); +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0) static s32 wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev, u8 *mac, struct station_info *sinfo); +#else +static s32 wl_cfg80211_get_station(struct wiphy *wiphy, + struct net_device *dev, const u8 *mac, struct station_info *sinfo); +#endif static s32 wl_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev, bool enabled, s32 timeout); static int wl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev, @@ -76,9 +81,15 @@ static s32 wl_cfg80211_set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, enum nl80211_tx_power_setting type, s32 dbm); #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) static s32 wl_cfg80211_set_tx_power(struct wiphy *wiphy, enum nl80211_tx_power_setting type, s32 dbm); #else +static int wl_cfg80211_set_tx_power(struct wiphy *wiphy, + struct wireless_dev *wdev, + enum nl80211_tx_power_setting type, int dbm); +#endif /* 3.8 */ +#else static s32 wl_cfg80211_set_tx_power(struct wiphy *wiphy, enum tx_power_setting type, s32 dbm); #endif @@ -1086,9 +1097,15 @@ static s32 wl_cfg80211_set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, enum nl80211_tx_power_setting type, s32 dbm) #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) static s32 wl_cfg80211_set_tx_power(struct wiphy *wiphy, enum nl80211_tx_power_setting type, s32 dbm) #else +static int +wl_cfg80211_set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, + enum nl80211_tx_power_setting type, int dbm) +#endif /* 3.8 */ +#else #define NL80211_TX_POWER_AUTOMATIC TX_POWER_AUTOMATIC #define NL80211_TX_POWER_LIMITED TX_POWER_LIMITED #define NL80211_TX_POWER_FIXED TX_POWER_FIXED @@ -1138,12 +1155,16 @@ wl_cfg80211_set_tx_power(struct wiphy *wiphy, enum tx_power_setting type, s32 db return err; } wl->conf->tx_power = dbm; - +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) return err; +#else + return (int) err; +#endif } #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) -static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, s32 *dbm) +static int wl_cfg80211_get_tx_power(struct wiphy *wiphy, + struct wireless_dev *wdev, int *dbm) #else static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, s32 *dbm) #endif @@ -1152,7 +1173,11 @@ static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, s32 *dbm) struct net_device *ndev = wl_to_ndev(wl); s32 txpwrdbm; u8 result; +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) s32 err = 0; +#else + int err = 0; +#endif err = wl_dev_intvar_get(ndev, "qtxpower", &txpwrdbm); if (err) { @@ -1160,7 +1185,11 @@ static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, s32 *dbm) return err; } result = (u8) (txpwrdbm & ~WL_TXPWR_OVERRIDE); +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) *dbm = (s32) bcm_qdbm_to_mw(result); +#else + *dbm = (int) bcm_qdbm_to_mw(result); +#endif return err; } @@ -1387,7 +1416,7 @@ wl_cfg80211_get_key(struct wiphy *wiphy, struct net_device *dev, key_endian_to_host(&key); params.key_len = (u8) min_t(u8, DOT11_MAX_KEY_SIZE, key.len); - memcpy(params.key, key.data, params.key_len); + memcpy((char *)params.key, key.data, params.key_len); if ((err = wl_dev_ioctl(dev, WLC_GET_WSEC, &wsec, sizeof(wsec)))) { return err; @@ -1421,9 +1450,15 @@ wl_cfg80211_get_key(struct wiphy *wiphy, struct net_device *dev, return err; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0) static s32 wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev, u8 *mac, struct station_info *sinfo) +#else +static s32 +wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev, + const u8 *mac, struct station_info *sinfo) +#endif { struct wl_cfg80211_priv *wl = wiphy_to_wl(wiphy); scb_val_t scb_val; @@ -1441,7 +1476,11 @@ wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev, WL_DBG(("Could not get rate (%d)\n", err)); } else { rate = dtoh32(rate); +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0) sinfo->filled |= STATION_INFO_TX_BITRATE; +#else + sinfo->filled |= BIT(NL80211_STA_INFO_TX_BITRATE); +#endif sinfo->txrate.legacy = rate * 5; WL_DBG(("Rate %d Mbps\n", (rate / 2))); } @@ -1454,7 +1493,11 @@ wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev, return err; } rssi = dtoh32(scb_val.val); +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0) sinfo->filled |= STATION_INFO_SIGNAL; +#else + sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL); +#endif sinfo->signal = rssi; WL_DBG(("RSSI %d dBm\n", rssi)); } @@ -2010,9 +2053,15 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info notify_ie = (u8 *)bi + le16_to_cpu(bi->ie_offset); notify_ielen = le32_to_cpu(bi->ie_length); +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) cbss = cfg80211_inform_bss(wiphy, channel, (const u8 *)(bi->BSSID.octet), 0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int, (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL); +#else + cbss = cfg80211_inform_bss(wiphy, channel, CFG80211_BSS_FTYPE_UNKNOWN, (const u8 *)(bi->BSSID.octet), + 0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int, + (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL); +#endif if (unlikely(!cbss)) return -ENOMEM; @@ -2071,7 +2120,26 @@ wl_notify_connect_status(struct wl_cfg80211_priv *wl, struct net_device *ndev, wl_get_assoc_ies(wl); memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN); wl_update_bss_info(wl); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0) + { + struct wl_bss_info *bi; + u16 bss_info_channel; + struct ieee80211_channel *channel; + u32 freq; + + bi = (struct wl_bss_info *)(wl->extra_buf + 4); + bss_info_channel = bi->ctl_ch ? bi->ctl_ch : CHSPEC_CHANNEL(bi->chanspec); + + freq = ieee80211_channel_to_frequency(bss_info_channel, + (bss_info_channel <= CH_MAX_2G_CHANNEL) ? + IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ); + + channel = ieee80211_get_channel(wl_to_wiphy(wl), freq); + cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL); + } +#else cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, GFP_KERNEL); +#endif set_bit(WL_STATUS_CONNECTED, &wl->status); wl->profile->active = true; } @@ -2238,9 +2306,9 @@ static s32 wl_update_bss_info(struct wl_cfg80211_priv *wl) struct wlc_ssid *ssid; struct bcm_tlv *tim; s32 dtim_period; + s32 err = 0; size_t ie_len; u8 *ie; - s32 err = 0; ssid = &wl->profile->ssid; bss = cfg80211_get_bss(wl_to_wiphy(wl), NULL, (s8 *)&wl->bssid, @@ -2629,7 +2697,18 @@ cfg80211_attach_out: void wl_cfg80211_detach(struct net_device *ndev) { - struct wl_cfg80211_priv *wl = ndev_to_wl(ndev); + struct wl_cfg80211_priv *wl; + struct wireless_dev *wdev=NULL; + if ( ndev == NULL ) { + printk(KERN_ERR "[%s()] in ndev=%p: IEEE80211ptr=%p\n", __FUNCTION__, ndev, wdev); + return; + } + wdev = ndev->ieee80211_ptr; + if (wdev == NULL) { + printk(KERN_ERR "[%s()] in ndev=%p: IEEE80211ptr=%p\n", __FUNCTION__, ndev, wdev); + return; + } + wl = ndev_to_wl(ndev); wl_deinit_cfg80211_priv(wl); wl_free_wdev(wl); diff --git a/src/wl/sys/wl_dbg.h b/src/wl/sys/wl_dbg.h index 85b3d19..1be4e4c 100644 --- a/src/wl/sys/wl_dbg.h +++ b/src/wl/sys/wl_dbg.h @@ -55,10 +55,12 @@ extern int osl_printf(const char *fmt, ...); #define WL_NONE(args) +#define FORCE_TRACE_LEVEL(fmt, ...) do { printk(KERN_ERR fmt, ## __VA_ARGS__); } while (0) /* ## is GCC specific syntax to remove comma when single arg */ + #ifdef BCMDBG_ERR #define WL_ERROR(args) WL_PRINT(args) #else -#define WL_ERROR(args) +#define WL_ERROR(args) FORCE_TRACE_LEVEL args #endif #define WL_TRACE(args) #define WL_APSTA_UPDN(args) diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c index 860b935..8be038a 100644 --- a/src/wl/sys/wl_linux.c +++ b/src/wl/sys/wl_linux.c @@ -111,6 +111,10 @@ static void wl_dpc_rxwork(struct wl_task *task); static int wl_reg_proc_entry(wl_info_t *wl); +#ifndef init_MUTEX +#define init_MUTEX(sem) sema_init(sem, 1) +#endif + static int wl_linux_watchdog(void *ctx); static int wl_found = 0; @@ -205,6 +209,7 @@ module_param(macaddr, charp, S_IRUGO); static int nompc = 0; module_param(nompc, int, 0); +MODULE_LICENSE("Mixed/Proprietary"); #ifdef quote_str #undef quote_str @@ -215,7 +220,7 @@ module_param(nompc, int, 0); #define to_str(s) #s #define quote_str(s) to_str(s) -#define BRCM_WLAN_IFNAME eth%d +#define BRCM_WLAN_IFNAME wlan%d static char intf_name[IFNAMSIZ] = quote_str(BRCM_WLAN_IFNAME); @@ -878,7 +883,11 @@ wl_remove(struct pci_dev *pdev) static SIMPLE_DEV_PM_OPS(wl_pm_ops, wl_suspend, wl_resume); #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) static struct pci_driver wl_pci_driver = { +#else +static struct pci_driver wl_pci_driver __refdata = { +#endif .name = "wl", .probe = wl_pci_probe, .remove = __devexit_p(wl_remove), @@ -1270,6 +1279,7 @@ wl_free_if(wl_info_t *wl, wl_if_t *wlif) MFREE(wl->osh, wlif->dev, sizeof(struct net_device)); #else free_netdev(wlif->dev); +// wlif->dev = NULL; #endif } @@ -1307,7 +1317,12 @@ wl_alloc_linux_if(wl_if_t *wlif) dev->priv = priv_link; #else +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)) dev = alloc_netdev(sizeof(priv_link_t), intf_name, ether_setup); +#else + dev = alloc_netdev(sizeof(priv_link_t), intf_name, NET_NAME_UNKNOWN, + ether_setup); +#endif if (!dev) { WL_ERROR(("wl%d: %s: alloc_netdev failed\n", (wl->pub)?wl->pub->unit:wlif->subunit, __FUNCTION__)); @@ -2157,9 +2172,14 @@ wl_start(struct sk_buff *skb, struct net_device *dev) wlif = WL_DEV_IF(dev); wl = WL_INFO(dev); - if (WL_ALL_PASSIVE_ENAB(wl) || (WL_RTR() && WL_CONFIG_SMP())) { - skb->prev = NULL; + if ( skb == NULL ) { + WL_TRACE(("skb == NULL -- would have crashed..\n")); + } else { + skb->prev = NULL; + } + + if (WL_ALL_PASSIVE_ENAB(wl) || (WL_RTR() && WL_CONFIG_SMP())) { TXQ_LOCK(wl); if ((wl_txq_thresh > 0) && (wl->txq_cnt >= wl_txq_thresh)) { @@ -2456,7 +2476,10 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p) len = sizeof(p80211msg_t) + oskb->len - D11_PHY_HDR_LEN; if ((skb = dev_alloc_skb(len)) == NULL) + { + WL_ERROR(("in %s:%d [%s()] dev_alloc_skb() failure!", __FILE__, __LINE__, __FUNCTION__)); return; + } skb_put(skb, len); phdr = (p80211msg_t*)skb->data; @@ -2536,7 +2559,10 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p) len = rtap_len + (oskb->len - D11_PHY_HDR_LEN); if ((skb = dev_alloc_skb(len)) == NULL) + { + WL_ERROR(("in %s:%d [%s()] dev_alloc_skb() failure!", __FILE__, __LINE__, __FUNCTION__)); return; + } skb_put(skb, len); @@ -2665,7 +2691,10 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p) } if ((skb = dev_alloc_skb(len)) == NULL) + { + WL_ERROR(("in %s:%d [%s()] dev_alloc_skb() failure!", __FILE__, __LINE__, __FUNCTION__)); return; + } skb_put(skb, len); @@ -2990,7 +3019,7 @@ _wl_del_monitor(wl_task_t *task) } void -wl_set_monitor(wl_info_t *wl, int val) +wl_set_monitor(wl_info_t *wl, int val) /* public => is called by wlc_hybrid.o_shipped */ { const char *devname; wl_if_t *wlif; @@ -3224,42 +3253,75 @@ wl_linux_watchdog(void *ctx) #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) static int wl_proc_read(char *buffer, char **start, off_t offset, int length, int *eof, void *data) +{ + wl_info_t * wl = (wl_info_t *)data; #else static ssize_t -wl_proc_read(struct file *filp, char __user *buffer, size_t length, loff_t *data) -#endif +wl_proc_read(struct file *filp, char __user *buffer, size_t length, loff_t *offp) { - wl_info_t * wl = (wl_info_t *)data; - int to_user; - int len; + wl_info_t * wl = PDE_DATA(file_inode(filp)); +#endif + int bcmerror, len; + int to_user = 0; + char tmp[8]; #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) if (offset > 0) { *eof = 1; return 0; } +#else + if (*offp > 0) { /* for example, stop: cat /proc/brcm_monitor0 */ + return 0; /* 0 <=> EOF */ + } #endif - if (!length) { - WL_ERROR(("%s: Not enough return buf space\n", __FUNCTION__)); - return 0; - } WL_LOCK(wl); - wlc_ioctl(wl->wlc, WLC_GET_MONITOR, &to_user, sizeof(int), NULL); - len = sprintf(buffer, "%d\n", to_user); - WL_UNLOCK(wl); - return len; + bcmerror = wlc_ioctl(wl->wlc, WLC_GET_MONITOR, &to_user, sizeof(int), NULL); + WL_UNLOCK(wl); + + if (bcmerror != BCME_OK) { + WL_ERROR(("%s: GET_MONITOR failed with %d\n", __FUNCTION__, bcmerror)); + return -EIO; + } + + len = snprintf(tmp, ARRAY_SIZE(tmp), "%d\n", to_user); + tmp[ARRAY_SIZE(tmp) - 1] = '\0'; + if (len >= ARRAY_SIZE(tmp)) { + printk(KERN_ERR "%s:%d [%s()] output would be truncated (ret=%d)!", __FILE__, __LINE__, __FUNCTION__, len); + return -ERANGE; + } + else if (len < 0) { + printk(KERN_ERR "%s:%d [%s()] unable to convert value (ret=%d)!", __FILE__, __LINE__, __FUNCTION__, len); + return len; + } + if (length < len) { + printk(KERN_ERR "%s:%d [%s()] user buffer is too small (at least=%d ; user=%d)!", __FILE__, __LINE__, __FUNCTION__, len, (int)length); + return -EMSGSIZE; + } + if (copy_to_user(buffer, tmp, len) != 0) { + printk(KERN_ERR "%s:%d [%s()] unable to copy data!", __FILE__, __LINE__, __FUNCTION__); + return -EFAULT; + } + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) + *offp += len; +#endif + + return len; } #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) static int wl_proc_write(struct file *filp, const char *buff, unsigned long length, void *data) +{ + wl_info_t * wl = (wl_info_t *)data; #else static ssize_t -wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t *data) -#endif +wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t *offp) { - wl_info_t * wl = (wl_info_t *)data; + wl_info_t * wl = PDE_DATA(file_inode(filp)); +#endif int from_user = 0; int bcmerror; @@ -3270,7 +3332,11 @@ wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t } if (copy_from_user(&from_user, buff, 1)) { WL_ERROR(("%s: copy from user failed\n", __FUNCTION__)); - return -EIO; +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) + return -EIO; +#else + return -EFAULT; +#endif } if (from_user >= 0x30) @@ -3280,10 +3346,15 @@ wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t bcmerror = wlc_ioctl(wl->wlc, WLC_SET_MONITOR, &from_user, sizeof(int), NULL); WL_UNLOCK(wl); - if (bcmerror < 0) { + if (bcmerror != BCME_OK) { WL_ERROR(("%s: SET_MONITOR failed with %d\n", __FUNCTION__, bcmerror)); return -EIO; } + +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)) && 0 /* no need to update offset because this file should only trigger action... */ + *offp += length; +#endif + return length; } @@ -3304,8 +3375,8 @@ wl_reg_proc_entry(wl_info_t *wl) if ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) { WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp)); #else - if ((wl->proc_entry = proc_create(tmp, 0644, NULL, &wl_fops)) == NULL) { - WL_ERROR(("%s: proc_create %s failed\n", __FUNCTION__, tmp)); + if ((wl->proc_entry = proc_create_data(tmp, 0644, NULL, &wl_fops, wl)) == NULL) { + WL_ERROR(("%s: proc_create_data %s failed\n", __FUNCTION__, tmp)); #endif ASSERT(0); return -1;