staging: vt6656: iwctl/key/rf use new structures.
PATCH 7/11 staging: vt6656: iwctl/key/rf use new structures.
This patch cleans up function declarations, definitions and local variables were appropriate replacing types defined in "ttype.h" with linux/types.h
Signed-off-by Malcolm Priestley <[email protected]>
--- drivers/staging/vt6656/iwctl.c | 100 ++++++++++++++--------------- drivers/staging/vt6656/key.c | 140 +++++++++++++++-------------------------- drivers/staging/vt6656/key.h | 96 ++++++++++------------------ drivers/staging/vt6656/rf.c | 134 +++++++++++++++++---------------------- drivers/staging/vt6656/rf.h | 26 +++----- 5 files changed, 198 insertions(+), 298 deletions(-)
drivers/staging/vt6656/iwctl.c +50 -50
@@ -55,7 +55,7 @@ static int msglevel = MSG_LEVEL_INFO;struct iw_statistics *iwctl_get_wireless_stats (struct net_device *dev) { -PSDevice pDevice =netdev_priv (dev); +struct vnt_private *pDevice =netdev_priv (dev);long ldBm; pDevice->wstats.status = pDevice->eOPMode;
@@ -91,9 +91,9 @@ int iwctl_giwname(struct net_device *dev, struct iw_request_info *info,int iwctl_siwscan (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra) { -PSDevice pDevice =netdev_priv (dev); +struct vnt_private *pDevice =netdev_priv (dev);struct iw_point *wrq = &wrqu->data; -PSMgmtObject pMgmt = &(pDevice->sMgmtObj); +struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;struct iw_scan_req *req = (struct iw_scan_req *)extra;BYTE abyScanSSID[WLAN_IEHDR_LEN +WLAN_SSID_MAXLEN +1 ];PWLAN_IE_SSID pItemSSID =NULL ;
@@ -169,8 +169,8 @@ int iwctl_giwscan(struct net_device *dev, struct iw_request_info *info,int ii;int jj;int kk; -PSDevice pDevice =netdev_priv (dev); -PSMgmtObject pMgmt = &(pDevice->sMgmtObj); +struct vnt_private *pDevice =netdev_priv (dev); +struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;PKnownBSS pBSS;PWLAN_IE_SSID pItemSSID;PWLAN_IE_SUPP_RATES pSuppRates;
@@ -309,7 +309,7 @@ int iwctl_giwscan(struct net_device *dev, struct iw_request_info *info,int iwctl_siwfreq (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra) { -PSDevice pDevice =netdev_priv (dev); +struct vnt_private *pDevice =netdev_priv (dev);struct iw_freq *wrq = &wrqu->freq;int rc =0 ;
@@ -348,9 +348,9 @@ int iwctl_siwfreq(struct net_device *dev, struct iw_request_info *info,int iwctl_giwfreq (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra) { -PSDevice pDevice =netdev_priv (dev); +struct vnt_private *pDevice =netdev_priv (dev);struct iw_freq *wrq = &wrqu->freq; -PSMgmtObject pMgmt = &(pDevice->sMgmtObj); +struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO " SIOCGIWFREQ\n" );
@@ -379,9 +379,9 @@ int iwctl_giwfreq(struct net_device *dev, struct iw_request_info *info,int iwctl_siwmode (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra) { -PSDevice pDevice =netdev_priv (dev); +struct vnt_private *pDevice =netdev_priv (dev);__u32 *wmode = &wrqu->mode; -PSMgmtObject pMgmt = &(pDevice->sMgmtObj); +struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;int rc =0 ;DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO " SIOCSIWMODE\n" );
@@ -492,9 +492,9 @@ int iwctl_siwmode(struct net_device *dev, struct iw_request_info *info,int iwctl_giwmode (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra) { -PSDevice pDevice =netdev_priv (dev); +struct vnt_private *pDevice =netdev_priv (dev);__u32 *wmode = &wrqu->mode; -PSMgmtObject pMgmt = &(pDevice->sMgmtObj); +struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO " SIOCGIWMODE\n" );
@@ -631,9 +631,9 @@ int iwctl_giwrange(struct net_device *dev, struct iw_request_info *info,int iwctl_siwap (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra) { -PSDevice pDevice =netdev_priv (dev); +struct vnt_private *pDevice =netdev_priv (dev);struct sockaddr *wrq = &wrqu->ap_addr; -PSMgmtObject pMgmt = &(pDevice->sMgmtObj); +struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;int rc =0 ;BYTE ZeroBSSID[WLAN_BSSID_LEN ] = {0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 };
@@ -683,9 +683,9 @@ int iwctl_siwap(struct net_device *dev, struct iw_request_info *info,int iwctl_giwap (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra) { -PSDevice pDevice =netdev_priv (dev); +struct vnt_private *pDevice =netdev_priv (dev);struct sockaddr *wrq = &wrqu->ap_addr; -PSMgmtObject pMgmt = &(pDevice->sMgmtObj); +struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO " SIOCGIWAP\n" );
@@ -713,8 +713,8 @@ int iwctl_giwaplist(struct net_device *dev, struct iw_request_info *info,struct iw_point *wrq = &wrqu->data;struct sockaddr *sock;struct iw_quality *qual; -PSDevice pDevice =netdev_priv (dev); -PSMgmtObject pMgmt = &pDevice->sMgmtObj; +struct vnt_private *pDevice =netdev_priv (dev); +struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;PKnownBSS pBSS = &pMgmt->sBSSList[0 ];int ii;int jj;
@@ -771,9 +771,9 @@ int iwctl_giwaplist(struct net_device *dev, struct iw_request_info *info,int iwctl_siwessid (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra) { -PSDevice pDevice =netdev_priv (dev); +struct vnt_private *pDevice =netdev_priv (dev);struct iw_point *wrq = &wrqu->essid; -PSMgmtObject pMgmt = &(pDevice->sMgmtObj); +struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;PWLAN_IE_SSID pItemSSID;if (pMgmt ==NULL )
@@ -878,9 +878,9 @@ int iwctl_siwessid(struct net_device *dev, struct iw_request_info *info,int iwctl_giwessid (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra) { -PSDevice pDevice =netdev_priv (dev); +struct vnt_private *pDevice =netdev_priv (dev);struct iw_point *wrq = &wrqu->essid; -PSMgmtObject pMgmt = &(pDevice->sMgmtObj); +struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;PWLAN_IE_SSID pItemSSID;DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO " SIOCGIWESSID\n" );
@@ -908,7 +908,7 @@ int iwctl_giwessid(struct net_device *dev, struct iw_request_info *info,int iwctl_siwrate (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra) { -PSDevice pDevice =netdev_priv (dev); +struct vnt_private *pDevice =netdev_priv (dev);struct iw_param *wrq = &wrqu->bitrate;int rc =0 ;u8 brate =0 ;
@@ -986,9 +986,9 @@ int iwctl_siwrate(struct net_device *dev, struct iw_request_info *info,int iwctl_giwrate (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra) { -PSDevice pDevice =netdev_priv (dev); +struct vnt_private *pDevice =netdev_priv (dev);struct iw_param *wrq = &wrqu->bitrate; -PSMgmtObject pMgmt = &(pDevice->sMgmtObj); +struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO " SIOCGIWRATE\n" );
@@ -1037,7 +1037,7 @@ int iwctl_giwrate(struct net_device *dev, struct iw_request_info *info,int iwctl_siwrts (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra) { -PSDevice pDevice =netdev_priv (dev); +struct vnt_private *pDevice =netdev_priv (dev);struct iw_param *wrq = &wrqu->rts;if ((wrq->value <0 || wrq->value >2312 ) && !wrq->disabled)
@@ -1057,7 +1057,7 @@ int iwctl_siwrts(struct net_device *dev, struct iw_request_info *info,int iwctl_giwrts (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra) { -PSDevice pDevice =netdev_priv (dev); +struct vnt_private *pDevice =netdev_priv (dev);struct iw_param *wrq = &wrqu->rts;DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO " SIOCGIWRTS\n" );
@@ -1073,7 +1073,7 @@ int iwctl_giwrts(struct net_device *dev, struct iw_request_info *info,int iwctl_siwfrag (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra) { -PSDevice pDevice =netdev_priv (dev); +struct vnt_private *pDevice =netdev_priv (dev);struct iw_param *wrq = &wrqu->frag;int rc =0 ;int fthr = wrq->value;
@@ -1097,7 +1097,7 @@ int iwctl_siwfrag(struct net_device *dev, struct iw_request_info *info,int iwctl_giwfrag (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra) { -PSDevice pDevice =netdev_priv (dev); +struct vnt_private *pDevice =netdev_priv (dev);struct iw_param *wrq = &wrqu->frag;DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO " SIOCGIWFRAG\n" );
@@ -1113,7 +1113,7 @@ int iwctl_giwfrag(struct net_device *dev, struct iw_request_info *info,int iwctl_siwretry (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra) { -PSDevice pDevice =netdev_priv (dev); +struct vnt_private *pDevice =netdev_priv (dev);struct iw_param *wrq = &wrqu->retry;int rc =0 ;
@@ -1146,7 +1146,7 @@ int iwctl_siwretry(struct net_device *dev, struct iw_request_info *info,int iwctl_giwretry (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra) { -PSDevice pDevice =netdev_priv (dev); +struct vnt_private *pDevice =netdev_priv (dev);struct iw_param *wrq = &wrqu->retry;DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO " SIOCGIWRETRY\n" ); wrq->disabled =0 ;// Can't be disabled
@@ -1173,8 +1173,8 @@ int iwctl_giwretry(struct net_device *dev, struct iw_request_info *info,int iwctl_siwencode (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra) { -PSDevice pDevice =netdev_priv (dev); -PSMgmtObject pMgmt = &(pDevice->sMgmtObj); +struct vnt_private *pDevice =netdev_priv (dev); +struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;struct iw_point *wrq = &wrqu->encoding;u32 dwKeyIndex = (u32)(wrq->flags &IW_ENCODE_INDEX );int ii;
@@ -1271,8 +1271,8 @@ int iwctl_siwencode(struct net_device *dev, struct iw_request_info *info,int iwctl_giwencode (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra) { -PSDevice pDevice =netdev_priv (dev); -PSMgmtObject pMgmt = &(pDevice->sMgmtObj); +struct vnt_private *pDevice =netdev_priv (dev); +struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;struct iw_point *wrq = &wrqu->encoding;char abyKey[WLAN_WEP232_KEYLEN ];
@@ -1333,8 +1333,8 @@ int iwctl_giwencode(struct net_device *dev, struct iw_request_info *info,int iwctl_siwpower (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra) { -PSDevice pDevice =netdev_priv (dev); -PSMgmtObject pMgmt = &(pDevice->sMgmtObj); +struct vnt_private *pDevice =netdev_priv (dev); +struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;struct iw_param *wrq = &wrqu->power;int rc =0 ;
@@ -1385,8 +1385,8 @@ int iwctl_siwpower(struct net_device *dev, struct iw_request_info *info,int iwctl_giwpower (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra) { -PSDevice pDevice =netdev_priv (dev); -PSMgmtObject pMgmt = &(pDevice->sMgmtObj); +struct vnt_private *pDevice =netdev_priv (dev); +struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;struct iw_param *wrq = &wrqu->power;int mode = pDevice->ePSMode;
@@ -1418,7 +1418,7 @@ int iwctl_giwpower(struct net_device *dev, struct iw_request_info *info,int iwctl_giwsens (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra) { -PSDevice pDevice =netdev_priv (dev); +struct vnt_private *pDevice =netdev_priv (dev);struct iw_param *wrq = &wrqu->sens;long ldBm;
@@ -1437,8 +1437,8 @@ int iwctl_giwsens(struct net_device *dev, struct iw_request_info *info,int iwctl_siwauth (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra) { -PSDevice pDevice =netdev_priv (dev); -PSMgmtObject pMgmt = &(pDevice->sMgmtObj); +struct vnt_private *pDevice =netdev_priv (dev); +struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;struct iw_param *wrq = &wrqu->param;int ret =0 ;static int wpa_version =0 ;// must be static to save the last value, einsn liu
@@ -1547,8 +1547,8 @@ int iwctl_giwauth(struct net_device *dev, struct iw_request_info *info,int iwctl_siwgenie (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra) { -PSDevice pDevice =netdev_priv (dev); -PSMgmtObject pMgmt = &(pDevice->sMgmtObj); +struct vnt_private *pDevice =netdev_priv (dev); +struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;struct iw_point *wrq = &wrqu->data;int ret =0 ;
@@ -1582,8 +1582,8 @@ out: // not completely ...not necessary in wpa_supplicant 0.5.8int iwctl_giwgenie (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra) { -PSDevice pDevice =netdev_priv (dev); -PSMgmtObject pMgmt = &(pDevice->sMgmtObj); +struct vnt_private *pDevice =netdev_priv (dev); +struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;struct iw_point *wrq = &wrqu->data;int ret =0 ;int space = wrq->length;
@@ -1608,8 +1608,8 @@ int iwctl_giwgenie(struct net_device *dev, struct iw_request_info *info,int iwctl_siwencodeext (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra) { -PSDevice pDevice =netdev_priv (dev); -PSMgmtObject pMgmt = &(pDevice->sMgmtObj); +struct vnt_private *pDevice =netdev_priv (dev); +struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;struct iw_point *wrq = &wrqu->encoding;struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;struct viawget_wpa_param *param=NULL ;
@@ -1741,8 +1741,8 @@ int iwctl_giwencodeext(struct net_device *dev, struct iw_request_info *info,int iwctl_siwmlme (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra) { -PSDevice pDevice =netdev_priv (dev); -PSMgmtObject pMgmt = &(pDevice->sMgmtObj); +struct vnt_private *pDevice =netdev_priv (dev); +struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;struct iw_mlme *mlme = (struct iw_mlme *)extra;int ret =0 ;
drivers/staging/vt6656/key.c +52 -88
227 lines not on this page · raw message
drivers/staging/vt6656/key.h +32 -64
101 lines not on this page · raw message
drivers/staging/vt6656/rf.c +56 -78
290 lines not on this page · raw message
drivers/staging/vt6656/rf.h +8 -18
@@ -60,25 +60,15 @@/*--------------------- Export Classes ----------------------------*/ /*--------------------- Export Variables --------------------------*/ -extern const BYTE RFaby11aChannelIndex[200 ]; +extern const u8 RFaby11aChannelIndex[200 ];/*--------------------- Export Functions --------------------------*/ -BOOL IFRFbWriteEmbedded (PSDevice pDevice,DWORD dwData); -BOOL RFbSetPower (PSDevice pDevice,unsigned int uRATE,unsigned int uCH); - -BOOL RFbRawSetPower ( -PSDevice pDevice, -BYTE byPwr, -unsigned int uRATE - ); - -void RFvRSSITodBm (PSDevice pDevice,BYTE byCurrRSSI,long *pldBm); -void RFbRFTableDownload (PSDevice pDevice); - -BOOL s_bVT3226D0_11bLoCurrentAdjust ( -PSDevice pDevice, -BYTE byChannel, -BOOL b11bMode - ); +int IFRFbWriteEmbedded (struct vnt_private *,u32 dwData); +int RFbSetPower (struct vnt_private *,u32 uRATE,u32 uCH); +int RFbRawSetPower (struct vnt_private *,u8 byPwr,u32 uRATE); +void RFvRSSITodBm (struct vnt_private *,u8 byCurrRSSI,long *pldBm); +void RFbRFTableDownload (struct vnt_private *pDevice); +int s_bVT3226D0_11bLoCurrentAdjust (struct vnt_private *,u8 byChannel, +int b11bMode);#endif /* __RF_H__ */
Signature · 1 line
1.8.0