diff options
author | Wang Chen <wangchen@cn.fujitsu.com> | 2008-11-13 02:39:10 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-13 02:39:10 -0500 |
commit | 524ad0a79126efabf58d0a49eace6155ab5b4549 (patch) | |
tree | 927e79d7d28d2c563c5beba74f06527df564e31c /drivers/net/wireless/rndis_wlan.c | |
parent | 8f15ea42b64941001a401cf855a0869e24f3a845 (diff) |
netdevice: safe convert to netdev_priv() #part-4
We have some reasons to kill netdev->priv:
1. netdev->priv is equal to netdev_priv().
2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously
netdev_priv() is more flexible than netdev->priv.
But we cann't kill netdev->priv, because so many drivers reference to it
directly.
This patch is a safe convert for netdev->priv to netdev_priv(netdev).
Since all of the netdev->priv is only for read.
But it is too big to be sent in one mail.
I split it to 4 parts and make every part smaller than 100,000 bytes,
which is max size allowed by vger.
Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/rndis_wlan.c')
-rw-r--r-- | drivers/net/wireless/rndis_wlan.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index a1eeb48f9466..607ce9f61b54 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
@@ -1104,7 +1104,7 @@ static int rndis_iw_get_range(struct net_device *dev, | |||
1104 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1104 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1105 | { | 1105 | { |
1106 | struct iw_range *range = (struct iw_range *)extra; | 1106 | struct iw_range *range = (struct iw_range *)extra; |
1107 | struct usbnet *usbdev = dev->priv; | 1107 | struct usbnet *usbdev = netdev_priv(dev); |
1108 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 1108 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
1109 | int len, ret, i, j, num, has_80211g_rates; | 1109 | int len, ret, i, j, num, has_80211g_rates; |
1110 | u8 rates[8]; | 1110 | u8 rates[8]; |
@@ -1210,7 +1210,7 @@ static int rndis_iw_get_range(struct net_device *dev, | |||
1210 | static int rndis_iw_get_name(struct net_device *dev, | 1210 | static int rndis_iw_get_name(struct net_device *dev, |
1211 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1211 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1212 | { | 1212 | { |
1213 | struct usbnet *usbdev = dev->priv; | 1213 | struct usbnet *usbdev = netdev_priv(dev); |
1214 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 1214 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
1215 | 1215 | ||
1216 | strcpy(wrqu->name, priv->name); | 1216 | strcpy(wrqu->name, priv->name); |
@@ -1223,7 +1223,7 @@ static int rndis_iw_set_essid(struct net_device *dev, | |||
1223 | { | 1223 | { |
1224 | struct ndis_80211_ssid ssid; | 1224 | struct ndis_80211_ssid ssid; |
1225 | int length = wrqu->essid.length; | 1225 | int length = wrqu->essid.length; |
1226 | struct usbnet *usbdev = dev->priv; | 1226 | struct usbnet *usbdev = netdev_priv(dev); |
1227 | 1227 | ||
1228 | devdbg(usbdev, "SIOCSIWESSID: [flags:%d,len:%d] '%.32s'", | 1228 | devdbg(usbdev, "SIOCSIWESSID: [flags:%d,len:%d] '%.32s'", |
1229 | wrqu->essid.flags, wrqu->essid.length, essid); | 1229 | wrqu->essid.flags, wrqu->essid.length, essid); |
@@ -1250,7 +1250,7 @@ static int rndis_iw_get_essid(struct net_device *dev, | |||
1250 | struct iw_request_info *info, union iwreq_data *wrqu, char *essid) | 1250 | struct iw_request_info *info, union iwreq_data *wrqu, char *essid) |
1251 | { | 1251 | { |
1252 | struct ndis_80211_ssid ssid; | 1252 | struct ndis_80211_ssid ssid; |
1253 | struct usbnet *usbdev = dev->priv; | 1253 | struct usbnet *usbdev = netdev_priv(dev); |
1254 | int ret; | 1254 | int ret; |
1255 | 1255 | ||
1256 | ret = get_essid(usbdev, &ssid); | 1256 | ret = get_essid(usbdev, &ssid); |
@@ -1273,7 +1273,7 @@ static int rndis_iw_get_essid(struct net_device *dev, | |||
1273 | static int rndis_iw_get_bssid(struct net_device *dev, | 1273 | static int rndis_iw_get_bssid(struct net_device *dev, |
1274 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1274 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1275 | { | 1275 | { |
1276 | struct usbnet *usbdev = dev->priv; | 1276 | struct usbnet *usbdev = netdev_priv(dev); |
1277 | unsigned char bssid[ETH_ALEN]; | 1277 | unsigned char bssid[ETH_ALEN]; |
1278 | int ret; | 1278 | int ret; |
1279 | 1279 | ||
@@ -1294,7 +1294,7 @@ static int rndis_iw_get_bssid(struct net_device *dev, | |||
1294 | static int rndis_iw_set_bssid(struct net_device *dev, | 1294 | static int rndis_iw_set_bssid(struct net_device *dev, |
1295 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1295 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1296 | { | 1296 | { |
1297 | struct usbnet *usbdev = dev->priv; | 1297 | struct usbnet *usbdev = netdev_priv(dev); |
1298 | u8 *bssid = (u8 *)wrqu->ap_addr.sa_data; | 1298 | u8 *bssid = (u8 *)wrqu->ap_addr.sa_data; |
1299 | int ret; | 1299 | int ret; |
1300 | 1300 | ||
@@ -1316,7 +1316,7 @@ static int rndis_iw_set_auth(struct net_device *dev, | |||
1316 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1316 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1317 | { | 1317 | { |
1318 | struct iw_param *p = &wrqu->param; | 1318 | struct iw_param *p = &wrqu->param; |
1319 | struct usbnet *usbdev = dev->priv; | 1319 | struct usbnet *usbdev = netdev_priv(dev); |
1320 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 1320 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
1321 | int ret = -ENOTSUPP; | 1321 | int ret = -ENOTSUPP; |
1322 | 1322 | ||
@@ -1397,7 +1397,7 @@ static int rndis_iw_get_auth(struct net_device *dev, | |||
1397 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1397 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1398 | { | 1398 | { |
1399 | struct iw_param *p = &wrqu->param; | 1399 | struct iw_param *p = &wrqu->param; |
1400 | struct usbnet *usbdev = dev->priv; | 1400 | struct usbnet *usbdev = netdev_priv(dev); |
1401 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 1401 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
1402 | 1402 | ||
1403 | switch (p->flags & IW_AUTH_INDEX) { | 1403 | switch (p->flags & IW_AUTH_INDEX) { |
@@ -1429,7 +1429,7 @@ static int rndis_iw_get_mode(struct net_device *dev, | |||
1429 | struct iw_request_info *info, | 1429 | struct iw_request_info *info, |
1430 | union iwreq_data *wrqu, char *extra) | 1430 | union iwreq_data *wrqu, char *extra) |
1431 | { | 1431 | { |
1432 | struct usbnet *usbdev = dev->priv; | 1432 | struct usbnet *usbdev = netdev_priv(dev); |
1433 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 1433 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
1434 | 1434 | ||
1435 | switch (priv->infra_mode) { | 1435 | switch (priv->infra_mode) { |
@@ -1452,7 +1452,7 @@ static int rndis_iw_get_mode(struct net_device *dev, | |||
1452 | static int rndis_iw_set_mode(struct net_device *dev, | 1452 | static int rndis_iw_set_mode(struct net_device *dev, |
1453 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1453 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1454 | { | 1454 | { |
1455 | struct usbnet *usbdev = dev->priv; | 1455 | struct usbnet *usbdev = netdev_priv(dev); |
1456 | int mode; | 1456 | int mode; |
1457 | 1457 | ||
1458 | devdbg(usbdev, "SIOCSIWMODE: %08x", wrqu->mode); | 1458 | devdbg(usbdev, "SIOCSIWMODE: %08x", wrqu->mode); |
@@ -1477,7 +1477,7 @@ static int rndis_iw_set_mode(struct net_device *dev, | |||
1477 | static int rndis_iw_set_encode(struct net_device *dev, | 1477 | static int rndis_iw_set_encode(struct net_device *dev, |
1478 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1478 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1479 | { | 1479 | { |
1480 | struct usbnet *usbdev = dev->priv; | 1480 | struct usbnet *usbdev = netdev_priv(dev); |
1481 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 1481 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
1482 | int ret, index, key_len; | 1482 | int ret, index, key_len; |
1483 | u8 *key; | 1483 | u8 *key; |
@@ -1540,7 +1540,7 @@ static int rndis_iw_set_encode_ext(struct net_device *dev, | |||
1540 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1540 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1541 | { | 1541 | { |
1542 | struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; | 1542 | struct iw_encode_ext *ext = (struct iw_encode_ext *)extra; |
1543 | struct usbnet *usbdev = dev->priv; | 1543 | struct usbnet *usbdev = netdev_priv(dev); |
1544 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 1544 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
1545 | struct ndis_80211_key ndis_key; | 1545 | struct ndis_80211_key ndis_key; |
1546 | int keyidx, ret; | 1546 | int keyidx, ret; |
@@ -1625,7 +1625,7 @@ static int rndis_iw_set_encode_ext(struct net_device *dev, | |||
1625 | static int rndis_iw_set_scan(struct net_device *dev, | 1625 | static int rndis_iw_set_scan(struct net_device *dev, |
1626 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1626 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1627 | { | 1627 | { |
1628 | struct usbnet *usbdev = dev->priv; | 1628 | struct usbnet *usbdev = netdev_priv(dev); |
1629 | union iwreq_data evt; | 1629 | union iwreq_data evt; |
1630 | int ret = -EINVAL; | 1630 | int ret = -EINVAL; |
1631 | __le32 tmp; | 1631 | __le32 tmp; |
@@ -1650,7 +1650,7 @@ static char *rndis_translate_scan(struct net_device *dev, | |||
1650 | struct ndis_80211_bssid_ex *bssid) | 1650 | struct ndis_80211_bssid_ex *bssid) |
1651 | { | 1651 | { |
1652 | #ifdef DEBUG | 1652 | #ifdef DEBUG |
1653 | struct usbnet *usbdev = dev->priv; | 1653 | struct usbnet *usbdev = netdev_priv(dev); |
1654 | #endif | 1654 | #endif |
1655 | u8 *ie; | 1655 | u8 *ie; |
1656 | char *current_val; | 1656 | char *current_val; |
@@ -1773,7 +1773,7 @@ static char *rndis_translate_scan(struct net_device *dev, | |||
1773 | static int rndis_iw_get_scan(struct net_device *dev, | 1773 | static int rndis_iw_get_scan(struct net_device *dev, |
1774 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1774 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1775 | { | 1775 | { |
1776 | struct usbnet *usbdev = dev->priv; | 1776 | struct usbnet *usbdev = netdev_priv(dev); |
1777 | void *buf = NULL; | 1777 | void *buf = NULL; |
1778 | char *cev = extra; | 1778 | char *cev = extra; |
1779 | struct ndis_80211_bssid_list_ex *bssid_list; | 1779 | struct ndis_80211_bssid_list_ex *bssid_list; |
@@ -1819,7 +1819,7 @@ out: | |||
1819 | static int rndis_iw_set_genie(struct net_device *dev, | 1819 | static int rndis_iw_set_genie(struct net_device *dev, |
1820 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1820 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1821 | { | 1821 | { |
1822 | struct usbnet *usbdev = dev->priv; | 1822 | struct usbnet *usbdev = netdev_priv(dev); |
1823 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 1823 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
1824 | int ret = 0; | 1824 | int ret = 0; |
1825 | 1825 | ||
@@ -1853,7 +1853,7 @@ static int rndis_iw_set_genie(struct net_device *dev, | |||
1853 | static int rndis_iw_get_genie(struct net_device *dev, | 1853 | static int rndis_iw_get_genie(struct net_device *dev, |
1854 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1854 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1855 | { | 1855 | { |
1856 | struct usbnet *usbdev = dev->priv; | 1856 | struct usbnet *usbdev = netdev_priv(dev); |
1857 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 1857 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
1858 | 1858 | ||
1859 | devdbg(usbdev, "SIOCGIWGENIE"); | 1859 | devdbg(usbdev, "SIOCGIWGENIE"); |
@@ -1876,7 +1876,7 @@ static int rndis_iw_get_genie(struct net_device *dev, | |||
1876 | static int rndis_iw_set_rts(struct net_device *dev, | 1876 | static int rndis_iw_set_rts(struct net_device *dev, |
1877 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1877 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1878 | { | 1878 | { |
1879 | struct usbnet *usbdev = dev->priv; | 1879 | struct usbnet *usbdev = netdev_priv(dev); |
1880 | __le32 tmp; | 1880 | __le32 tmp; |
1881 | devdbg(usbdev, "SIOCSIWRTS"); | 1881 | devdbg(usbdev, "SIOCSIWRTS"); |
1882 | 1882 | ||
@@ -1889,7 +1889,7 @@ static int rndis_iw_set_rts(struct net_device *dev, | |||
1889 | static int rndis_iw_get_rts(struct net_device *dev, | 1889 | static int rndis_iw_get_rts(struct net_device *dev, |
1890 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1890 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1891 | { | 1891 | { |
1892 | struct usbnet *usbdev = dev->priv; | 1892 | struct usbnet *usbdev = netdev_priv(dev); |
1893 | __le32 tmp; | 1893 | __le32 tmp; |
1894 | int len, ret; | 1894 | int len, ret; |
1895 | 1895 | ||
@@ -1910,7 +1910,7 @@ static int rndis_iw_get_rts(struct net_device *dev, | |||
1910 | static int rndis_iw_set_frag(struct net_device *dev, | 1910 | static int rndis_iw_set_frag(struct net_device *dev, |
1911 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1911 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1912 | { | 1912 | { |
1913 | struct usbnet *usbdev = dev->priv; | 1913 | struct usbnet *usbdev = netdev_priv(dev); |
1914 | __le32 tmp; | 1914 | __le32 tmp; |
1915 | 1915 | ||
1916 | devdbg(usbdev, "SIOCSIWFRAG"); | 1916 | devdbg(usbdev, "SIOCSIWFRAG"); |
@@ -1924,7 +1924,7 @@ static int rndis_iw_set_frag(struct net_device *dev, | |||
1924 | static int rndis_iw_get_frag(struct net_device *dev, | 1924 | static int rndis_iw_get_frag(struct net_device *dev, |
1925 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1925 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1926 | { | 1926 | { |
1927 | struct usbnet *usbdev = dev->priv; | 1927 | struct usbnet *usbdev = netdev_priv(dev); |
1928 | __le32 tmp; | 1928 | __le32 tmp; |
1929 | int len, ret; | 1929 | int len, ret; |
1930 | 1930 | ||
@@ -1944,7 +1944,7 @@ static int rndis_iw_get_frag(struct net_device *dev, | |||
1944 | static int rndis_iw_set_nick(struct net_device *dev, | 1944 | static int rndis_iw_set_nick(struct net_device *dev, |
1945 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1945 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1946 | { | 1946 | { |
1947 | struct usbnet *usbdev = dev->priv; | 1947 | struct usbnet *usbdev = netdev_priv(dev); |
1948 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 1948 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
1949 | 1949 | ||
1950 | devdbg(usbdev, "SIOCSIWNICK"); | 1950 | devdbg(usbdev, "SIOCSIWNICK"); |
@@ -1961,7 +1961,7 @@ static int rndis_iw_set_nick(struct net_device *dev, | |||
1961 | static int rndis_iw_get_nick(struct net_device *dev, | 1961 | static int rndis_iw_get_nick(struct net_device *dev, |
1962 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1962 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1963 | { | 1963 | { |
1964 | struct usbnet *usbdev = dev->priv; | 1964 | struct usbnet *usbdev = netdev_priv(dev); |
1965 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 1965 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
1966 | 1966 | ||
1967 | wrqu->data.flags = 1; | 1967 | wrqu->data.flags = 1; |
@@ -1977,7 +1977,7 @@ static int rndis_iw_get_nick(struct net_device *dev, | |||
1977 | static int rndis_iw_set_freq(struct net_device *dev, | 1977 | static int rndis_iw_set_freq(struct net_device *dev, |
1978 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 1978 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
1979 | { | 1979 | { |
1980 | struct usbnet *usbdev = dev->priv; | 1980 | struct usbnet *usbdev = netdev_priv(dev); |
1981 | struct ndis_80211_conf config; | 1981 | struct ndis_80211_conf config; |
1982 | unsigned int dsconfig; | 1982 | unsigned int dsconfig; |
1983 | int len, ret; | 1983 | int len, ret; |
@@ -2008,7 +2008,7 @@ static int rndis_iw_set_freq(struct net_device *dev, | |||
2008 | static int rndis_iw_get_freq(struct net_device *dev, | 2008 | static int rndis_iw_get_freq(struct net_device *dev, |
2009 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 2009 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
2010 | { | 2010 | { |
2011 | struct usbnet *usbdev = dev->priv; | 2011 | struct usbnet *usbdev = netdev_priv(dev); |
2012 | struct ndis_80211_conf config; | 2012 | struct ndis_80211_conf config; |
2013 | int len, ret; | 2013 | int len, ret; |
2014 | 2014 | ||
@@ -2025,7 +2025,7 @@ static int rndis_iw_get_freq(struct net_device *dev, | |||
2025 | static int rndis_iw_get_txpower(struct net_device *dev, | 2025 | static int rndis_iw_get_txpower(struct net_device *dev, |
2026 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 2026 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
2027 | { | 2027 | { |
2028 | struct usbnet *usbdev = dev->priv; | 2028 | struct usbnet *usbdev = netdev_priv(dev); |
2029 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 2029 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
2030 | __le32 tx_power; | 2030 | __le32 tx_power; |
2031 | int ret = 0, len; | 2031 | int ret = 0, len; |
@@ -2059,7 +2059,7 @@ static int rndis_iw_get_txpower(struct net_device *dev, | |||
2059 | static int rndis_iw_set_txpower(struct net_device *dev, | 2059 | static int rndis_iw_set_txpower(struct net_device *dev, |
2060 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 2060 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
2061 | { | 2061 | { |
2062 | struct usbnet *usbdev = dev->priv; | 2062 | struct usbnet *usbdev = netdev_priv(dev); |
2063 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 2063 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
2064 | __le32 tx_power = 0; | 2064 | __le32 tx_power = 0; |
2065 | int ret = 0; | 2065 | int ret = 0; |
@@ -2111,7 +2111,7 @@ static int rndis_iw_set_txpower(struct net_device *dev, | |||
2111 | static int rndis_iw_get_rate(struct net_device *dev, | 2111 | static int rndis_iw_get_rate(struct net_device *dev, |
2112 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 2112 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
2113 | { | 2113 | { |
2114 | struct usbnet *usbdev = dev->priv; | 2114 | struct usbnet *usbdev = netdev_priv(dev); |
2115 | __le32 tmp; | 2115 | __le32 tmp; |
2116 | int ret, len; | 2116 | int ret, len; |
2117 | 2117 | ||
@@ -2129,7 +2129,7 @@ static int rndis_iw_get_rate(struct net_device *dev, | |||
2129 | static int rndis_iw_set_mlme(struct net_device *dev, | 2129 | static int rndis_iw_set_mlme(struct net_device *dev, |
2130 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) | 2130 | struct iw_request_info *info, union iwreq_data *wrqu, char *extra) |
2131 | { | 2131 | { |
2132 | struct usbnet *usbdev = dev->priv; | 2132 | struct usbnet *usbdev = netdev_priv(dev); |
2133 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 2133 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
2134 | struct iw_mlme *mlme = (struct iw_mlme *)extra; | 2134 | struct iw_mlme *mlme = (struct iw_mlme *)extra; |
2135 | unsigned char bssid[ETH_ALEN]; | 2135 | unsigned char bssid[ETH_ALEN]; |
@@ -2154,7 +2154,7 @@ static int rndis_iw_set_mlme(struct net_device *dev, | |||
2154 | 2154 | ||
2155 | static struct iw_statistics *rndis_get_wireless_stats(struct net_device *dev) | 2155 | static struct iw_statistics *rndis_get_wireless_stats(struct net_device *dev) |
2156 | { | 2156 | { |
2157 | struct usbnet *usbdev = dev->priv; | 2157 | struct usbnet *usbdev = netdev_priv(dev); |
2158 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 2158 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
2159 | unsigned long flags; | 2159 | unsigned long flags; |
2160 | 2160 | ||
@@ -2284,7 +2284,7 @@ get_bssid: | |||
2284 | 2284 | ||
2285 | static void rndis_wext_set_multicast_list(struct net_device *dev) | 2285 | static void rndis_wext_set_multicast_list(struct net_device *dev) |
2286 | { | 2286 | { |
2287 | struct usbnet *usbdev = dev->priv; | 2287 | struct usbnet *usbdev = netdev_priv(dev); |
2288 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); | 2288 | struct rndis_wext_private *priv = get_rndis_wext_priv(usbdev); |
2289 | 2289 | ||
2290 | if (test_bit(WORK_SET_MULTICAST_LIST, &priv->work_pending)) | 2290 | if (test_bit(WORK_SET_MULTICAST_LIST, &priv->work_pending)) |