Loading drivers/staging/vt6655/device_main.c +11 −19 Original line number Diff line number Diff line Loading @@ -997,11 +997,13 @@ device_found1(struct pci_dev *pcid, const struct pci_device_id *ent) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) dev = alloc_etherdev(0); dev = alloc_etherdev(sizeof(DEVICE_INFO)); #else dev = init_etherdev(dev, 0); #endif pDevice = (PSDevice) netdev_priv(dev); if (dev == NULL) { printk(KERN_ERR DEVICE_NAME ": allocate net device failed \n"); return -ENODEV; Loading @@ -1025,7 +1027,6 @@ device_found1(struct pci_dev *pcid, const struct pci_device_id *ent) pDevice->dev = dev; pDevice->next_module = root_device_dev; root_device_dev = dev; dev->priv = pDevice; dev->irq = pcid->irq; if (pci_enable_device(pcid)) { Loading Loading @@ -1194,7 +1195,6 @@ device_found1(struct pci_dev *pcid, const struct pci_device_id *ent) printk("Fail to Register WPADEV?\n"); unregister_netdev(pDevice->dev); free_netdev(dev); kfree(pDevice); } device_print_info(pDevice); pci_set_drvdata(pcid, pDevice); Loading Loading @@ -1226,11 +1226,6 @@ static BOOL device_init_info(struct pci_dev* pcid, PSDevice* ppDevice, PSDevice p; *ppDevice = kmalloc(sizeof(DEVICE_INFO),GFP_ATOMIC); if (*ppDevice == NULL) return FALSE; memset(*ppDevice,0,sizeof(DEVICE_INFO)); if (pDevice_Infos == NULL) { Loading Loading @@ -1374,8 +1369,6 @@ device_release_WPADEV(pDevice); if (pDevice->pcid) { pci_set_drvdata(pDevice->pcid,NULL); } kfree(pDevice); } #endif// ifndef PRIVATE_OBJ Loading Loading @@ -2059,7 +2052,7 @@ int __device_open(HANDLE pExDevice) { #else static int device_open(struct net_device *dev) { PSDevice pDevice=(PSDevice) dev->priv; PSDevice pDevice=(PSDevice) netdev_priv(dev); int i; #endif pDevice->rx_buf_sz = PKT_BUF_SZ; Loading Loading @@ -2212,7 +2205,7 @@ int __device_close(HANDLE pExDevice) { #else static int device_close(struct net_device *dev) { PSDevice pDevice=(PSDevice) dev->priv; PSDevice pDevice=(PSDevice) netdev_priv(dev); #endif PSMgmtObject pMgmt = pDevice->pMgmt; //PLICE_DEBUG-> Loading Loading @@ -2282,7 +2275,7 @@ int __device_dma0_tx_80211(HANDLE pExDevice, struct sk_buff *skb) { static int device_dma0_tx_80211(struct sk_buff *skb, struct net_device *dev) { PSDevice pDevice=dev->priv; PSDevice pDevice=netdev_priv(dev); #endif PBYTE pbMPDU; UINT cbMPDULen = 0; Loading Loading @@ -2494,7 +2487,7 @@ int __device_xmit(HANDLE pExDevice, struct sk_buff *skb) { #else static int device_xmit(struct sk_buff *skb, struct net_device *dev) { PSDevice pDevice=dev->priv; PSDevice pDevice=netdev_priv(dev); #endif PSMgmtObject pMgmt = pDevice->pMgmt; Loading Loading @@ -2950,7 +2943,7 @@ int __device_intr(int irq, HANDLE pExDevice, struct pt_regs *regs) { #else static irqreturn_t device_intr(int irq, void *dev_instance) { struct net_device* dev=dev_instance; PSDevice pDevice=(PSDevice) dev->priv; PSDevice pDevice=(PSDevice) netdev_priv(dev); #endif int max_count=0; Loading Loading @@ -3367,7 +3360,7 @@ void __device_set_multi(HANDLE pExDevice) { #else static void device_set_multi(struct net_device *dev) { PSDevice pDevice = (PSDevice) dev->priv; PSDevice pDevice = (PSDevice) netdev_priv(dev); #endif PSMgmtObject pMgmt = pDevice->pMgmt; Loading Loading @@ -3441,7 +3434,7 @@ struct net_device_stats *__device_get_stats(HANDLE pExDevice) { #else static struct net_device_stats *device_get_stats(struct net_device *dev) { PSDevice pDevice=(PSDevice) dev->priv; PSDevice pDevice=(PSDevice) netdev_priv(dev); #endif return &pDevice->stats; Loading @@ -3458,7 +3451,7 @@ int __device_ioctl(HANDLE pExDevice, struct ifreq *rq, int cmd) { #else static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); #endif #ifdef WIRELESS_EXT Loading Loading @@ -4116,7 +4109,6 @@ int __device_hw_init(HANDLE pExDevice){ PSDevice_info pDevice_info = (PSDevice_info)pExDevice; PSDevice pDevice; pDevice = (PSDevice)kmalloc(sizeof(DEVICE_INFO), (int)GFP_ATOMIC); if (pDevice == NULL) return FALSE; Loading drivers/staging/vt6655/hostap.c +4 −2 Original line number Diff line number Diff line Loading @@ -100,6 +100,7 @@ static int msglevel =MSG_LEVEL_INFO; static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked) { PSDevice apdev_priv; struct net_device *dev = pDevice->dev; int ret; Loading Loading @@ -129,7 +130,8 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked) return -ENOMEM; memset(pDevice->apdev, 0, sizeof(struct net_device)); pDevice->apdev->priv = pDevice; apdev_priv = netdev_priv(pDevice->apdev); *apdev_priv = *pDevice; memcpy(pDevice->apdev->dev_addr, dev->dev_addr, ETH_ALEN); pDevice->apdev->hard_start_xmit = pDevice->tx_80211; pDevice->apdev->type = ARPHRD_IEEE80211; Loading drivers/staging/vt6655/iwctl.c +31 −31 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ static int msglevel =MSG_LEVEL_INFO; struct iw_statistics *iwctl_get_wireless_stats(struct net_device *dev) { PSDevice pDevice = dev->priv; PSDevice pDevice = netdev_priv(dev); long ldBm; pDevice->wstats.status = pDevice->eOPMode; #ifdef Calcu_LinkQual Loading Loading @@ -209,7 +209,7 @@ int iwctl_siwscan(struct net_device *dev, struct iw_point *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); struct iw_scan_req *req = (struct iw_scan_req *)extra; PSMgmtObject pMgmt = &(pDevice->sMgmtObj); BYTE abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; Loading Loading @@ -276,7 +276,7 @@ int iwctl_giwscan(struct net_device *dev, char *extra) { int ii, jj, kk; PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PKnownBSS pBSS; PWLAN_IE_SSID pItemSSID; Loading Loading @@ -522,7 +522,7 @@ int iwctl_siwfreq(struct net_device *dev, struct iw_freq *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); int rc = 0; DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWFREQ \n"); Loading Loading @@ -568,7 +568,7 @@ int iwctl_giwfreq(struct net_device *dev, struct iw_freq *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWFREQ \n"); Loading Loading @@ -598,7 +598,7 @@ int iwctl_siwmode(struct net_device *dev, __u32 *wmode, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); int rc = 0; Loading Loading @@ -665,7 +665,7 @@ int iwctl_giwmode(struct net_device *dev, __u32 *wmode, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); Loading Loading @@ -819,7 +819,7 @@ int iwctl_siwap(struct net_device *dev, struct sockaddr *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); int rc = 0; BYTE ZeroBSSID[WLAN_BSSID_LEN]={0x00,0x00,0x00,0x00,0x00,0x00}; Loading Loading @@ -877,7 +877,7 @@ int iwctl_giwap(struct net_device *dev, struct sockaddr *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); Loading Loading @@ -911,7 +911,7 @@ int iwctl_giwaplist(struct net_device *dev, int ii,jj, rc = 0; struct sockaddr sock[IW_MAX_AP]; struct iw_quality qual[IW_MAX_AP]; PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); Loading Loading @@ -960,7 +960,7 @@ int iwctl_siwessid(struct net_device *dev, struct iw_point *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PWLAN_IE_SSID pItemSSID; //2008-0409-05, <Add> by Einsn Liu Loading Loading @@ -1089,7 +1089,7 @@ int iwctl_giwessid(struct net_device *dev, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PWLAN_IE_SSID pItemSSID; Loading Loading @@ -1125,7 +1125,7 @@ int iwctl_siwrate(struct net_device *dev, struct iw_param *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); int rc = 0; u8 brate = 0; int i; Loading Loading @@ -1210,7 +1210,7 @@ int iwctl_giwrate(struct net_device *dev, struct iw_param *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); //2007-0118-05,<Mark> by EinsnLiu //Mark the unnecessary sentences. // PSMgmtObject pMgmt = &(pDevice->sMgmtObj); Loading Loading @@ -1276,7 +1276,7 @@ int iwctl_siwrts(struct net_device *dev, struct iw_param *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); int rc = 0; DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWRTS \n"); Loading Loading @@ -1304,7 +1304,7 @@ int iwctl_giwrts(struct net_device *dev, struct iw_param *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRTS \n"); wrq->value = pDevice->wRTSThreshold; Loading @@ -1323,7 +1323,7 @@ int iwctl_siwfrag(struct net_device *dev, struct iw_param *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); int rc = 0; int fthr = wrq->value; Loading Loading @@ -1352,7 +1352,7 @@ int iwctl_giwfrag(struct net_device *dev, struct iw_param *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWFRAG \n"); wrq->value = pDevice->wFragmentationThreshold; Loading @@ -1372,7 +1372,7 @@ int iwctl_siwretry(struct net_device *dev, struct iw_param *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); int rc = 0; Loading Loading @@ -1410,7 +1410,7 @@ int iwctl_giwretry(struct net_device *dev, struct iw_param *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRETRY \n"); wrq->disabled = 0; // Can't be disabled Loading Loading @@ -1441,7 +1441,7 @@ int iwctl_siwencode(struct net_device *dev, struct iw_point *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); DWORD dwKeyIndex = (DWORD)(wrq->flags & IW_ENCODE_INDEX); int ii,uu, rc = 0; Loading Loading @@ -1660,7 +1660,7 @@ int iwctl_giwencode(struct net_device *dev, struct iw_point *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); int rc = 0; char abyKey[WLAN_WEP232_KEYLEN]; Loading Loading @@ -1729,7 +1729,7 @@ int iwctl_giwencode(struct net_device *dev, struct iw_point *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); char abyKey[WLAN_WEP232_KEYLEN]; Loading Loading @@ -1790,7 +1790,7 @@ int iwctl_siwpower(struct net_device *dev, struct iw_param *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); int rc = 0; Loading Loading @@ -1840,7 +1840,7 @@ int iwctl_giwpower(struct net_device *dev, struct iw_param *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); int mode = pDevice->ePSMode; Loading Loading @@ -1872,7 +1872,7 @@ int iwctl_giwsens(struct net_device *dev, struct iw_param *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); long ldBm; DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWSENS \n"); Loading @@ -1898,7 +1898,7 @@ int iwctl_siwauth(struct net_device *dev, struct iw_param *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); int ret=0; static int wpa_version=0; //must be static to save the last value,einsn liu Loading Loading @@ -2023,7 +2023,7 @@ int iwctl_siwgenie(struct net_device *dev, struct iw_point *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); int ret=0; Loading Loading @@ -2056,7 +2056,7 @@ int iwctl_giwgenie(struct net_device *dev, struct iw_point *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); int ret=0; int space = wrq->length; Loading @@ -2081,7 +2081,7 @@ int iwctl_siwencodeext(struct net_device *dev, struct iw_point *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); struct iw_encode_ext *ext = (struct iw_encode_ext*)extra; struct viawget_wpa_param *param=NULL; //original member Loading Loading @@ -2232,7 +2232,7 @@ int iwctl_siwmlme(struct net_device *dev, struct iw_point *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); struct iw_mlme *mlme = (struct iw_mlme *)extra; //u16 reason = cpu_to_le16(mlme->reason_code); Loading drivers/staging/vt6655/wpactl.c +5 −2 Original line number Diff line number Diff line Loading @@ -112,14 +112,17 @@ static void wpadev_setup(struct net_device *dev) static int wpa_init_wpadev(PSDevice pDevice) { PSDevice wpadev_priv; struct net_device *dev = pDevice->dev; int ret=0; pDevice->wpadev = alloc_netdev(0, "vntwpa", wpadev_setup); pDevice->wpadev = alloc_netdev(sizeof(PSDevice), "vntwpa", wpadev_setup); if (pDevice->wpadev == NULL) return -ENOMEM; pDevice->wpadev->priv = pDevice; wpadev_priv = netdev_priv(pDevice->wpadev); *wpadev_priv = *pDevice; memcpy(pDevice->wpadev->dev_addr, dev->dev_addr, U_ETHER_ADDR_LEN); pDevice->wpadev->base_addr = dev->base_addr; pDevice->wpadev->irq = dev->irq; Loading Loading
drivers/staging/vt6655/device_main.c +11 −19 Original line number Diff line number Diff line Loading @@ -997,11 +997,13 @@ device_found1(struct pci_dev *pcid, const struct pci_device_id *ent) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) dev = alloc_etherdev(0); dev = alloc_etherdev(sizeof(DEVICE_INFO)); #else dev = init_etherdev(dev, 0); #endif pDevice = (PSDevice) netdev_priv(dev); if (dev == NULL) { printk(KERN_ERR DEVICE_NAME ": allocate net device failed \n"); return -ENODEV; Loading @@ -1025,7 +1027,6 @@ device_found1(struct pci_dev *pcid, const struct pci_device_id *ent) pDevice->dev = dev; pDevice->next_module = root_device_dev; root_device_dev = dev; dev->priv = pDevice; dev->irq = pcid->irq; if (pci_enable_device(pcid)) { Loading Loading @@ -1194,7 +1195,6 @@ device_found1(struct pci_dev *pcid, const struct pci_device_id *ent) printk("Fail to Register WPADEV?\n"); unregister_netdev(pDevice->dev); free_netdev(dev); kfree(pDevice); } device_print_info(pDevice); pci_set_drvdata(pcid, pDevice); Loading Loading @@ -1226,11 +1226,6 @@ static BOOL device_init_info(struct pci_dev* pcid, PSDevice* ppDevice, PSDevice p; *ppDevice = kmalloc(sizeof(DEVICE_INFO),GFP_ATOMIC); if (*ppDevice == NULL) return FALSE; memset(*ppDevice,0,sizeof(DEVICE_INFO)); if (pDevice_Infos == NULL) { Loading Loading @@ -1374,8 +1369,6 @@ device_release_WPADEV(pDevice); if (pDevice->pcid) { pci_set_drvdata(pDevice->pcid,NULL); } kfree(pDevice); } #endif// ifndef PRIVATE_OBJ Loading Loading @@ -2059,7 +2052,7 @@ int __device_open(HANDLE pExDevice) { #else static int device_open(struct net_device *dev) { PSDevice pDevice=(PSDevice) dev->priv; PSDevice pDevice=(PSDevice) netdev_priv(dev); int i; #endif pDevice->rx_buf_sz = PKT_BUF_SZ; Loading Loading @@ -2212,7 +2205,7 @@ int __device_close(HANDLE pExDevice) { #else static int device_close(struct net_device *dev) { PSDevice pDevice=(PSDevice) dev->priv; PSDevice pDevice=(PSDevice) netdev_priv(dev); #endif PSMgmtObject pMgmt = pDevice->pMgmt; //PLICE_DEBUG-> Loading Loading @@ -2282,7 +2275,7 @@ int __device_dma0_tx_80211(HANDLE pExDevice, struct sk_buff *skb) { static int device_dma0_tx_80211(struct sk_buff *skb, struct net_device *dev) { PSDevice pDevice=dev->priv; PSDevice pDevice=netdev_priv(dev); #endif PBYTE pbMPDU; UINT cbMPDULen = 0; Loading Loading @@ -2494,7 +2487,7 @@ int __device_xmit(HANDLE pExDevice, struct sk_buff *skb) { #else static int device_xmit(struct sk_buff *skb, struct net_device *dev) { PSDevice pDevice=dev->priv; PSDevice pDevice=netdev_priv(dev); #endif PSMgmtObject pMgmt = pDevice->pMgmt; Loading Loading @@ -2950,7 +2943,7 @@ int __device_intr(int irq, HANDLE pExDevice, struct pt_regs *regs) { #else static irqreturn_t device_intr(int irq, void *dev_instance) { struct net_device* dev=dev_instance; PSDevice pDevice=(PSDevice) dev->priv; PSDevice pDevice=(PSDevice) netdev_priv(dev); #endif int max_count=0; Loading Loading @@ -3367,7 +3360,7 @@ void __device_set_multi(HANDLE pExDevice) { #else static void device_set_multi(struct net_device *dev) { PSDevice pDevice = (PSDevice) dev->priv; PSDevice pDevice = (PSDevice) netdev_priv(dev); #endif PSMgmtObject pMgmt = pDevice->pMgmt; Loading Loading @@ -3441,7 +3434,7 @@ struct net_device_stats *__device_get_stats(HANDLE pExDevice) { #else static struct net_device_stats *device_get_stats(struct net_device *dev) { PSDevice pDevice=(PSDevice) dev->priv; PSDevice pDevice=(PSDevice) netdev_priv(dev); #endif return &pDevice->stats; Loading @@ -3458,7 +3451,7 @@ int __device_ioctl(HANDLE pExDevice, struct ifreq *rq, int cmd) { #else static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); #endif #ifdef WIRELESS_EXT Loading Loading @@ -4116,7 +4109,6 @@ int __device_hw_init(HANDLE pExDevice){ PSDevice_info pDevice_info = (PSDevice_info)pExDevice; PSDevice pDevice; pDevice = (PSDevice)kmalloc(sizeof(DEVICE_INFO), (int)GFP_ATOMIC); if (pDevice == NULL) return FALSE; Loading
drivers/staging/vt6655/hostap.c +4 −2 Original line number Diff line number Diff line Loading @@ -100,6 +100,7 @@ static int msglevel =MSG_LEVEL_INFO; static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked) { PSDevice apdev_priv; struct net_device *dev = pDevice->dev; int ret; Loading Loading @@ -129,7 +130,8 @@ static int hostap_enable_hostapd(PSDevice pDevice, int rtnl_locked) return -ENOMEM; memset(pDevice->apdev, 0, sizeof(struct net_device)); pDevice->apdev->priv = pDevice; apdev_priv = netdev_priv(pDevice->apdev); *apdev_priv = *pDevice; memcpy(pDevice->apdev->dev_addr, dev->dev_addr, ETH_ALEN); pDevice->apdev->hard_start_xmit = pDevice->tx_80211; pDevice->apdev->type = ARPHRD_IEEE80211; Loading
drivers/staging/vt6655/iwctl.c +31 −31 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ static int msglevel =MSG_LEVEL_INFO; struct iw_statistics *iwctl_get_wireless_stats(struct net_device *dev) { PSDevice pDevice = dev->priv; PSDevice pDevice = netdev_priv(dev); long ldBm; pDevice->wstats.status = pDevice->eOPMode; #ifdef Calcu_LinkQual Loading Loading @@ -209,7 +209,7 @@ int iwctl_siwscan(struct net_device *dev, struct iw_point *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); struct iw_scan_req *req = (struct iw_scan_req *)extra; PSMgmtObject pMgmt = &(pDevice->sMgmtObj); BYTE abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; Loading Loading @@ -276,7 +276,7 @@ int iwctl_giwscan(struct net_device *dev, char *extra) { int ii, jj, kk; PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PKnownBSS pBSS; PWLAN_IE_SSID pItemSSID; Loading Loading @@ -522,7 +522,7 @@ int iwctl_siwfreq(struct net_device *dev, struct iw_freq *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); int rc = 0; DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWFREQ \n"); Loading Loading @@ -568,7 +568,7 @@ int iwctl_giwfreq(struct net_device *dev, struct iw_freq *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWFREQ \n"); Loading Loading @@ -598,7 +598,7 @@ int iwctl_siwmode(struct net_device *dev, __u32 *wmode, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); int rc = 0; Loading Loading @@ -665,7 +665,7 @@ int iwctl_giwmode(struct net_device *dev, __u32 *wmode, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); Loading Loading @@ -819,7 +819,7 @@ int iwctl_siwap(struct net_device *dev, struct sockaddr *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); int rc = 0; BYTE ZeroBSSID[WLAN_BSSID_LEN]={0x00,0x00,0x00,0x00,0x00,0x00}; Loading Loading @@ -877,7 +877,7 @@ int iwctl_giwap(struct net_device *dev, struct sockaddr *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); Loading Loading @@ -911,7 +911,7 @@ int iwctl_giwaplist(struct net_device *dev, int ii,jj, rc = 0; struct sockaddr sock[IW_MAX_AP]; struct iw_quality qual[IW_MAX_AP]; PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); Loading Loading @@ -960,7 +960,7 @@ int iwctl_siwessid(struct net_device *dev, struct iw_point *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PWLAN_IE_SSID pItemSSID; //2008-0409-05, <Add> by Einsn Liu Loading Loading @@ -1089,7 +1089,7 @@ int iwctl_giwessid(struct net_device *dev, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PWLAN_IE_SSID pItemSSID; Loading Loading @@ -1125,7 +1125,7 @@ int iwctl_siwrate(struct net_device *dev, struct iw_param *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); int rc = 0; u8 brate = 0; int i; Loading Loading @@ -1210,7 +1210,7 @@ int iwctl_giwrate(struct net_device *dev, struct iw_param *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); //2007-0118-05,<Mark> by EinsnLiu //Mark the unnecessary sentences. // PSMgmtObject pMgmt = &(pDevice->sMgmtObj); Loading Loading @@ -1276,7 +1276,7 @@ int iwctl_siwrts(struct net_device *dev, struct iw_param *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); int rc = 0; DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWRTS \n"); Loading Loading @@ -1304,7 +1304,7 @@ int iwctl_giwrts(struct net_device *dev, struct iw_param *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRTS \n"); wrq->value = pDevice->wRTSThreshold; Loading @@ -1323,7 +1323,7 @@ int iwctl_siwfrag(struct net_device *dev, struct iw_param *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); int rc = 0; int fthr = wrq->value; Loading Loading @@ -1352,7 +1352,7 @@ int iwctl_giwfrag(struct net_device *dev, struct iw_param *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWFRAG \n"); wrq->value = pDevice->wFragmentationThreshold; Loading @@ -1372,7 +1372,7 @@ int iwctl_siwretry(struct net_device *dev, struct iw_param *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); int rc = 0; Loading Loading @@ -1410,7 +1410,7 @@ int iwctl_giwretry(struct net_device *dev, struct iw_param *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRETRY \n"); wrq->disabled = 0; // Can't be disabled Loading Loading @@ -1441,7 +1441,7 @@ int iwctl_siwencode(struct net_device *dev, struct iw_point *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); DWORD dwKeyIndex = (DWORD)(wrq->flags & IW_ENCODE_INDEX); int ii,uu, rc = 0; Loading Loading @@ -1660,7 +1660,7 @@ int iwctl_giwencode(struct net_device *dev, struct iw_point *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); int rc = 0; char abyKey[WLAN_WEP232_KEYLEN]; Loading Loading @@ -1729,7 +1729,7 @@ int iwctl_giwencode(struct net_device *dev, struct iw_point *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); char abyKey[WLAN_WEP232_KEYLEN]; Loading Loading @@ -1790,7 +1790,7 @@ int iwctl_siwpower(struct net_device *dev, struct iw_param *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); int rc = 0; Loading Loading @@ -1840,7 +1840,7 @@ int iwctl_giwpower(struct net_device *dev, struct iw_param *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); int mode = pDevice->ePSMode; Loading Loading @@ -1872,7 +1872,7 @@ int iwctl_giwsens(struct net_device *dev, struct iw_param *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); long ldBm; DEVICE_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWSENS \n"); Loading @@ -1898,7 +1898,7 @@ int iwctl_siwauth(struct net_device *dev, struct iw_param *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); int ret=0; static int wpa_version=0; //must be static to save the last value,einsn liu Loading Loading @@ -2023,7 +2023,7 @@ int iwctl_siwgenie(struct net_device *dev, struct iw_point *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); int ret=0; Loading Loading @@ -2056,7 +2056,7 @@ int iwctl_giwgenie(struct net_device *dev, struct iw_point *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); int ret=0; int space = wrq->length; Loading @@ -2081,7 +2081,7 @@ int iwctl_siwencodeext(struct net_device *dev, struct iw_point *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); struct iw_encode_ext *ext = (struct iw_encode_ext*)extra; struct viawget_wpa_param *param=NULL; //original member Loading Loading @@ -2232,7 +2232,7 @@ int iwctl_siwmlme(struct net_device *dev, struct iw_point *wrq, char *extra) { PSDevice pDevice = (PSDevice)dev->priv; PSDevice pDevice = (PSDevice)netdev_priv(dev); PSMgmtObject pMgmt = &(pDevice->sMgmtObj); struct iw_mlme *mlme = (struct iw_mlme *)extra; //u16 reason = cpu_to_le16(mlme->reason_code); Loading
drivers/staging/vt6655/wpactl.c +5 −2 Original line number Diff line number Diff line Loading @@ -112,14 +112,17 @@ static void wpadev_setup(struct net_device *dev) static int wpa_init_wpadev(PSDevice pDevice) { PSDevice wpadev_priv; struct net_device *dev = pDevice->dev; int ret=0; pDevice->wpadev = alloc_netdev(0, "vntwpa", wpadev_setup); pDevice->wpadev = alloc_netdev(sizeof(PSDevice), "vntwpa", wpadev_setup); if (pDevice->wpadev == NULL) return -ENOMEM; pDevice->wpadev->priv = pDevice; wpadev_priv = netdev_priv(pDevice->wpadev); *wpadev_priv = *pDevice; memcpy(pDevice->wpadev->dev_addr, dev->dev_addr, U_ETHER_ADDR_LEN); pDevice->wpadev->base_addr = dev->base_addr; pDevice->wpadev->irq = dev->irq; Loading