*/
int MainVirtualIF_close(IN struct net_device *net_dev)
{
- RTMP_ADAPTER *pAd = net_dev->priv;
+ RTMP_ADAPTER *pAd = net_dev->ml_priv;
// Sanity check for pAd
if (pAd == NULL)
*/
int MainVirtualIF_open(IN struct net_device *net_dev)
{
- RTMP_ADAPTER *pAd = net_dev->priv;
+ RTMP_ADAPTER *pAd = net_dev->ml_priv;
// Sanity check for pAd
if (pAd == NULL)
int rt28xx_close(IN PNET_DEV dev)
{
struct net_device * net_dev = (struct net_device *)dev;
- RTMP_ADAPTER *pAd = net_dev->priv;
+ RTMP_ADAPTER *pAd = net_dev->ml_priv;
BOOLEAN Cancelled = FALSE;
UINT32 i = 0;
static int rt28xx_init(IN struct net_device *net_dev)
{
- PRTMP_ADAPTER pAd = (PRTMP_ADAPTER)net_dev->priv;
+ PRTMP_ADAPTER pAd = (PRTMP_ADAPTER)net_dev->ml_priv;
UINT index;
UCHAR TmpPhy;
NDIS_STATUS Status;
#endif // DOT11_N_SUPPORT //
RT28XX_IRQ_RELEASE(net_dev);
- // shall not set priv to NULL here because the priv didn't been free yet.
- //net_dev->priv = 0;
+ // shall not set ml_priv to NULL here because the ml_priv didn't been free yet.
+ //net_dev->ml_priv = 0;
#ifdef INF_AMAZON_SE
err0:
#endif // INF_AMAZON_SE //
int rt28xx_open(IN PNET_DEV dev)
{
struct net_device * net_dev = (struct net_device *)dev;
- PRTMP_ADAPTER pAd = (PRTMP_ADAPTER)net_dev->priv;
+ PRTMP_ADAPTER pAd = net_dev->ml_priv;
int retval = 0;
POS_COOKIE pObj;
if (pAd == NULL)
{
/* if 1st open fail, pAd will be free;
- So the net_dev->priv will be NULL in 2rd open */
+ So the net_dev->ml_priv will be NULL in 2rd open */
return -1;
}
if (status != NDIS_STATUS_SUCCESS)
goto err_out_free_netdev;
- net_dev->priv = (PVOID)pAd;
+ net_dev->ml_priv = (PVOID)pAd;
pAd->net_dev = net_dev; // must be before RT28XXNetDevInit()
RT28XXNetDevInit(_dev_p, net_dev, pAd);
int rt28xx_packet_xmit(struct sk_buff *skb)
{
struct net_device *net_dev = skb->dev;
- PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) net_dev->priv;
+ PRTMP_ADAPTER pAd = net_dev->ml_priv;
int status = 0;
PNDIS_PACKET pPacket = (PNDIS_PACKET) skb;
IN struct sk_buff *skb_p,
IN struct net_device *net_dev)
{
- RTMP_ADAPTER *pAd = net_dev->priv;
+ RTMP_ADAPTER *pAd = net_dev->ml_priv;
if (!(net_dev->flags & IFF_UP))
{
RELEASE_NDIS_PACKET(pAd, (PNDIS_PACKET)skb_p, NDIS_STATUS_FAILURE);
struct iw_statistics *rt28xx_get_wireless_stats(
IN struct net_device *net_dev)
{
- PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) net_dev->priv;
+ PRTMP_ADAPTER pAd = net_dev->ml_priv;
DBGPRINT(RT_DEBUG_TRACE, ("rt28xx_get_wireless_stats --->\n"));
if (net_dev->priv_flags == INT_MAIN)
{
- pAd = net_dev->priv;
+ pAd = net_dev->ml_priv;
}
else
{
- pVirtualAd = net_dev->priv;
- pAd = pVirtualAd->RtmpDev->priv;
+ pVirtualAd = net_dev->ml_priv;
+ pAd = pVirtualAd->RtmpDev->ml_priv;
}
if (pAd == NULL)
{
/* if 1st open fail, pAd will be free;
- So the net_dev->priv will be NULL in 2rd open */
+ So the net_dev->ml_priv will be NULL in 2rd open */
return -ENETDOWN;
}
RTMP_ADAPTER *pAd = NULL;
if (net_dev)
- pAd = net_dev->priv;
+ pAd = net_dev->ml_priv;
if (pAd)
{
struct iw_request_info *info,
char *name, char *extra)
{
-// PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
+// PRTMP_ADAPTER pAdapter = dev->ml_priv;
#ifdef RT2860
strncpy(name, "RT2860 Wireless", IFNAMSIZ);
struct iw_request_info *info,
struct iw_freq *freq, char *extra)
{
- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
+ PRTMP_ADAPTER pAdapter = dev->ml_priv;
int chan = -1;
//check if the interface is down
if (dev->priv_flags == INT_MAIN)
{
- pAdapter = dev->priv;
+ pAdapter = dev->ml_priv;
}
else
{
- pVirtualAd = dev->priv;
+ pVirtualAd = dev->ml_priv;
if (pVirtualAd && pVirtualAd->RtmpDev)
- pAdapter = pVirtualAd->RtmpDev->priv;
+ pAdapter = pVirtualAd->RtmpDev->ml_priv;
}
if (pAdapter == NULL)
{
/* if 1st open fail, pAd will be free;
- So the net_dev->priv will be NULL in 2rd open */
+ So the net_dev->ml_priv will be NULL in 2rd open */
return -ENETDOWN;
}
struct iw_request_info *info,
__u32 *mode, char *extra)
{
- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
+ PRTMP_ADAPTER pAdapter = dev->ml_priv;
//check if the interface is down
if(!RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_INTERRUPT_IN_USE))
if (dev->priv_flags == INT_MAIN)
{
- pAdapter = dev->priv;
+ pAdapter = dev->ml_priv;
}
else
{
- pVirtualAd = dev->priv;
+ pVirtualAd = dev->ml_priv;
if (pVirtualAd && pVirtualAd->RtmpDev)
- pAdapter = pVirtualAd->RtmpDev->priv;
+ pAdapter = pVirtualAd->RtmpDev->ml_priv;
}
if (pAdapter == NULL)
{
/* if 1st open fail, pAd will be free;
- So the net_dev->priv will be NULL in 2rd open */
+ So the net_dev->ml_priv will be NULL in 2rd open */
return -ENETDOWN;
}
struct iw_request_info *info,
char *name, char *extra)
{
- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
+ PRTMP_ADAPTER pAdapter = dev->ml_priv;
//check if the interface is down
if(!RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_INTERRUPT_IN_USE))
if (dev->priv_flags == INT_MAIN)
{
- pAdapter = dev->priv;
+ pAdapter = dev->ml_priv;
}
else
{
- pVirtualAd = dev->priv;
+ pVirtualAd = dev->ml_priv;
if (pVirtualAd && pVirtualAd->RtmpDev)
- pAdapter = pVirtualAd->RtmpDev->priv;
+ pAdapter = pVirtualAd->RtmpDev->ml_priv;
}
if (pAdapter == NULL)
{
/* if 1st open fail, pAd will be free;
- So the net_dev->priv will be NULL in 2rd open */
+ So the net_dev->ml_priv will be NULL in 2rd open */
return -ENETDOWN;
}
struct iw_request_info *info,
struct sockaddr *ap_addr, char *extra)
{
- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
+ PRTMP_ADAPTER pAdapter = dev->ml_priv;
NDIS_802_11_MAC_ADDRESS Bssid;
//check if the interface is down
if (dev->priv_flags == INT_MAIN)
{
- pAdapter = dev->priv;
+ pAdapter = dev->ml_priv;
}
else
{
- pVirtualAd = dev->priv;
+ pVirtualAd = dev->ml_priv;
if (pVirtualAd && pVirtualAd->RtmpDev)
- pAdapter = pVirtualAd->RtmpDev->priv;
+ pAdapter = pVirtualAd->RtmpDev->ml_priv;
}
if (pAdapter == NULL)
{
/* if 1st open fail, pAd will be free;
- So the net_dev->priv will be NULL in 2rd open */
+ So the net_dev->ml_priv will be NULL in 2rd open */
return -ENETDOWN;
}
struct iw_request_info *info,
struct iw_point *data, char *extra)
{
- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
+ PRTMP_ADAPTER pAdapter = dev->ml_priv;
struct sockaddr addr[IW_MAX_AP];
struct iw_quality qual[IW_MAX_AP];
struct iw_request_info *info,
struct iw_point *data, char *extra)
{
- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
+ PRTMP_ADAPTER pAdapter = dev->ml_priv;
ULONG Now;
int Status = NDIS_STATUS_SUCCESS;
struct iw_point *data, char *extra)
{
- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
+ PRTMP_ADAPTER pAdapter = dev->ml_priv;
int i=0;
char *current_ev = extra, *previous_ev = extra;
char *end_buf;
struct iw_request_info *info,
struct iw_point *data, char *essid)
{
- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
+ PRTMP_ADAPTER pAdapter = dev->ml_priv;
//check if the interface is down
if(!RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_INTERRUPT_IN_USE))
if (dev->priv_flags == INT_MAIN)
{
- pAdapter = dev->priv;
+ pAdapter = dev->ml_priv;
}
else
{
- pVirtualAd = dev->priv;
+ pVirtualAd = dev->ml_priv;
if (pVirtualAd && pVirtualAd->RtmpDev)
- pAdapter = pVirtualAd->RtmpDev->priv;
+ pAdapter = pVirtualAd->RtmpDev->ml_priv;
}
if (pAdapter == NULL)
{
/* if 1st open fail, pAd will be free;
- So the net_dev->priv will be NULL in 2rd open */
+ So the net_dev->ml_priv will be NULL in 2rd open */
return -ENETDOWN;
}
struct iw_request_info *info,
struct iw_point *data, char *nickname)
{
- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
+ PRTMP_ADAPTER pAdapter = dev->ml_priv;
//check if the interface is down
if(!RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_INTERRUPT_IN_USE))
if (dev->priv_flags == INT_MAIN)
{
- pAdapter = dev->priv;
+ pAdapter = dev->ml_priv;
}
else
{
- pVirtualAd = dev->priv;
+ pVirtualAd = dev->ml_priv;
if (pVirtualAd && pVirtualAd->RtmpDev)
- pAdapter = pVirtualAd->RtmpDev->priv;
+ pAdapter = pVirtualAd->RtmpDev->ml_priv;
}
if (pAdapter == NULL)
{
/* if 1st open fail, pAd will be free;
- So the net_dev->priv will be NULL in 2rd open */
+ So the net_dev->ml_priv will be NULL in 2rd open */
return -ENETDOWN;
}
struct iw_request_info *info,
struct iw_param *rts, char *extra)
{
- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
+ PRTMP_ADAPTER pAdapter = dev->ml_priv;
u16 val;
//check if the interface is down
if (dev->priv_flags == INT_MAIN)
{
- pAdapter = dev->priv;
+ pAdapter = dev->ml_priv;
}
else
{
- pVirtualAd = dev->priv;
+ pVirtualAd = dev->ml_priv;
if (pVirtualAd && pVirtualAd->RtmpDev)
- pAdapter = pVirtualAd->RtmpDev->priv;
+ pAdapter = pVirtualAd->RtmpDev->ml_priv;
}
if (pAdapter == NULL)
{
/* if 1st open fail, pAd will be free;
- So the net_dev->priv will be NULL in 2rd open */
+ So the net_dev->ml_priv will be NULL in 2rd open */
return -ENETDOWN;
}
struct iw_request_info *info,
struct iw_param *frag, char *extra)
{
- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
+ PRTMP_ADAPTER pAdapter = dev->ml_priv;
u16 val;
//check if the interface is down
if (dev->priv_flags == INT_MAIN)
{
- pAdapter = dev->priv;
+ pAdapter = dev->ml_priv;
}
else
{
- pVirtualAd = dev->priv;
+ pVirtualAd = dev->ml_priv;
if (pVirtualAd && pVirtualAd->RtmpDev)
- pAdapter = pVirtualAd->RtmpDev->priv;
+ pAdapter = pVirtualAd->RtmpDev->ml_priv;
}
if (pAdapter == NULL)
{
/* if 1st open fail, pAd will be free;
- So the net_dev->priv will be NULL in 2rd open */
+ So the net_dev->ml_priv will be NULL in 2rd open */
return -ENETDOWN;
}
struct iw_request_info *info,
struct iw_point *erq, char *extra)
{
- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
+ PRTMP_ADAPTER pAdapter = dev->ml_priv;
//check if the interface is down
if(!RTMP_TEST_FLAG(pAdapter, fRTMP_ADAPTER_INTERRUPT_IN_USE))
if (dev->priv_flags == INT_MAIN)
{
- pAdapter = dev->priv;
+ pAdapter = dev->ml_priv;
}
else
{
- pVirtualAd = dev->priv;
+ pVirtualAd = dev->ml_priv;
if (pVirtualAd && pVirtualAd->RtmpDev)
- pAdapter = pVirtualAd->RtmpDev->priv;
+ pAdapter = pVirtualAd->RtmpDev->ml_priv;
}
if (pAdapter == NULL)
{
/* if 1st open fail, pAd will be free;
- So the net_dev->priv will be NULL in 2rd open */
+ So the net_dev->ml_priv will be NULL in 2rd open */
return -ENETDOWN;
}
if (dev->priv_flags == INT_MAIN)
{
- pAdapter = dev->priv;
+ pAdapter = dev->ml_priv;
}
else
{
- pVirtualAd = dev->priv;
- pAdapter = pVirtualAd->RtmpDev->priv;
+ pVirtualAd = dev->ml_priv;
+ pAdapter = pVirtualAd->RtmpDev->ml_priv;
}
pObj = (POS_COOKIE) pAdapter->OS_Cookie;
if (pAdapter == NULL)
{
/* if 1st open fail, pAd will be free;
- So the net_dev->priv will be NULL in 2rd open */
+ So the net_dev->ml_priv will be NULL in 2rd open */
return -ENETDOWN;
}
struct iw_point *wrq, char *extra)
{
INT Status = 0;
- PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->priv;
+ PRTMP_ADAPTER pAd = dev->ml_priv;
if (extra == NULL)
{
u32 subcmd = wrq->flags;
if (dev->priv_flags == INT_MAIN)
- pAd = dev->priv;
+ pAd = dev->ml_priv;
else
{
- pVirtualAd = dev->priv;
- pAd = pVirtualAd->RtmpDev->priv;
+ pVirtualAd = dev->ml_priv;
+ pAd = pVirtualAd->RtmpDev->ml_priv;
}
pObj = (POS_COOKIE) pAd->OS_Cookie;
if (pAd == NULL)
{
/* if 1st open fail, pAd will be free;
- So the net_dev->priv will be NULL in 2rd open */
+ So the net_dev->ml_priv will be NULL in 2rd open */
return -ENETDOWN;
}
union iwreq_data *wrqu,
char *extra)
{
- PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->priv;
+ PRTMP_ADAPTER pAd = dev->ml_priv;
struct iw_mlme *pMlme = (struct iw_mlme *)wrqu->data.pointer;
MLME_QUEUE_ELEM MsgElem;
MLME_DISASSOC_REQ_STRUCT DisAssocReq;
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
+ PRTMP_ADAPTER pAdapter = dev->ml_priv;
struct iw_param *param = &wrqu->param;
//check if the interface is down
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
+ PRTMP_ADAPTER pAdapter = dev->ml_priv;
struct iw_param *param = &wrqu->param;
//check if the interface is down
union iwreq_data *wrqu,
char *extra)
{
- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
+ PRTMP_ADAPTER pAdapter = dev->ml_priv;
struct iw_point *encoding = &wrqu->encoding;
struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
int keyIdx, alg = ext->alg;
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
- PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->priv;
+ PRTMP_ADAPTER pAd = dev->ml_priv;
PCHAR pKey = NULL;
struct iw_point *encoding = &wrqu->encoding;
struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
- PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->priv;
+ PRTMP_ADAPTER pAd = dev->ml_priv;
if (wrqu->data.length > MAX_LEN_OF_RSNIE ||
(wrqu->data.length && extra == NULL))
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
- PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->priv;
+ PRTMP_ADAPTER pAd = dev->ml_priv;
if ((pAd->StaCfg.RSNIE_Len == 0) ||
(pAd->StaCfg.AuthMode < Ndis802_11AuthModeWPA))
union iwreq_data *wrqu,
char *extra)
{
- PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->priv;
+ PRTMP_ADAPTER pAd = dev->ml_priv;
struct iw_pmksa *pPmksa = (struct iw_pmksa *)wrqu->data.pointer;
INT CachedIdx = 0, idx = 0;
UINT32 bbpValue;
BOOLEAN bIsPrintAllBBP = FALSE;
INT Status = 0;
- PRTMP_ADAPTER pAdapter = (PRTMP_ADAPTER) dev->priv;
+ PRTMP_ADAPTER pAdapter = dev->ml_priv;
memset(extra, 0x00, IW_PRIV_SIZE_MASK);
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
- PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->priv;
+ PRTMP_ADAPTER pAd = dev->ml_priv;
UINT32 rate = wrqu->bitrate.value, fixed = wrqu->bitrate.fixed;
//check if the interface is down
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
- PRTMP_ADAPTER pAd = (PRTMP_ADAPTER) dev->priv;
+ PRTMP_ADAPTER pAd = dev->ml_priv;
int rate_index = 0, rate_count = 0;
HTTRANSMIT_SETTING ht_setting;
__s32 ralinkrate[] =
if (net_dev->priv_flags == INT_MAIN)
{
- pAd = net_dev->priv;
+ pAd = net_dev->ml_priv;
}
else
{
- pVirtualAd = net_dev->priv;
- pAd = pVirtualAd->RtmpDev->priv;
+ pVirtualAd = net_dev->ml_priv;
+ pAd = pVirtualAd->RtmpDev->ml_priv;
}
pObj = (POS_COOKIE) pAd->OS_Cookie;
if (pAd == NULL)
{
/* if 1st open fail, pAd will be free;
- So the net_dev->priv will be NULL in 2rd open */
+ So the net_dev->ml_priv will be NULL in 2rd open */
return -ENETDOWN;
}