Commit 2b0d92b2 authored by Tobin C. Harding's avatar Tobin C. Harding Committed by Greg Kroah-Hartman

staging: ks7010: remove cast from netdev_priv()

The returned pointer from netdev_priv() (void *) does not need to be
cast.

Remove unnecessary cast of void * returned by netdev_priv().
Signed-off-by: default avatarTobin C. Harding <me@tobin.cc>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8fb8e05c
...@@ -177,8 +177,7 @@ static int ks_wlan_get_name(struct net_device *dev, ...@@ -177,8 +177,7 @@ static int ks_wlan_get_name(struct net_device *dev,
struct iw_request_info *info, char *cwrq, struct iw_request_info *info, char *cwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -200,8 +199,7 @@ static int ks_wlan_set_freq(struct net_device *dev, ...@@ -200,8 +199,7 @@ static int ks_wlan_set_freq(struct net_device *dev,
struct iw_request_info *info, struct iw_freq *fwrq, struct iw_request_info *info, struct iw_freq *fwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
int channel; int channel;
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
...@@ -245,8 +243,7 @@ static int ks_wlan_get_freq(struct net_device *dev, ...@@ -245,8 +243,7 @@ static int ks_wlan_get_freq(struct net_device *dev,
struct iw_request_info *info, struct iw_freq *fwrq, struct iw_request_info *info, struct iw_freq *fwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
int f; int f;
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
...@@ -268,8 +265,7 @@ static int ks_wlan_set_essid(struct net_device *dev, ...@@ -268,8 +265,7 @@ static int ks_wlan_set_essid(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *dwrq, char *extra) struct iw_point *dwrq, char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
size_t len; size_t len;
DPRINTK(2, " %d\n", dwrq->flags); DPRINTK(2, " %d\n", dwrq->flags);
...@@ -325,8 +321,7 @@ static int ks_wlan_get_essid(struct net_device *dev, ...@@ -325,8 +321,7 @@ static int ks_wlan_get_essid(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *dwrq, char *extra) struct iw_point *dwrq, char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -355,8 +350,7 @@ static int ks_wlan_get_essid(struct net_device *dev, ...@@ -355,8 +350,7 @@ static int ks_wlan_get_essid(struct net_device *dev,
static int ks_wlan_set_wap(struct net_device *dev, struct iw_request_info *info, static int ks_wlan_set_wap(struct net_device *dev, struct iw_request_info *info,
struct sockaddr *ap_addr, char *extra) struct sockaddr *ap_addr, char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
DPRINTK(2, "\n"); DPRINTK(2, "\n");
...@@ -389,8 +383,7 @@ static int ks_wlan_set_wap(struct net_device *dev, struct iw_request_info *info, ...@@ -389,8 +383,7 @@ static int ks_wlan_set_wap(struct net_device *dev, struct iw_request_info *info,
static int ks_wlan_get_wap(struct net_device *dev, struct iw_request_info *info, static int ks_wlan_get_wap(struct net_device *dev, struct iw_request_info *info,
struct sockaddr *awrq, char *extra) struct sockaddr *awrq, char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -410,8 +403,7 @@ static int ks_wlan_set_nick(struct net_device *dev, ...@@ -410,8 +403,7 @@ static int ks_wlan_set_nick(struct net_device *dev,
struct iw_request_info *info, struct iw_point *dwrq, struct iw_request_info *info, struct iw_point *dwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -431,8 +423,7 @@ static int ks_wlan_get_nick(struct net_device *dev, ...@@ -431,8 +423,7 @@ static int ks_wlan_get_nick(struct net_device *dev,
struct iw_request_info *info, struct iw_point *dwrq, struct iw_request_info *info, struct iw_point *dwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -449,8 +440,7 @@ static int ks_wlan_set_rate(struct net_device *dev, ...@@ -449,8 +440,7 @@ static int ks_wlan_set_rate(struct net_device *dev,
struct iw_request_info *info, struct iw_param *vwrq, struct iw_request_info *info, struct iw_param *vwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
int i = 0; int i = 0;
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
...@@ -682,8 +672,7 @@ static int ks_wlan_get_rate(struct net_device *dev, ...@@ -682,8 +672,7 @@ static int ks_wlan_get_rate(struct net_device *dev,
struct iw_request_info *info, struct iw_param *vwrq, struct iw_request_info *info, struct iw_param *vwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
DPRINTK(2, "in_interrupt = %ld update_phyinfo = %d\n", DPRINTK(2, "in_interrupt = %ld update_phyinfo = %d\n",
in_interrupt(), atomic_read(&update_phyinfo)); in_interrupt(), atomic_read(&update_phyinfo));
...@@ -707,8 +696,7 @@ static int ks_wlan_get_rate(struct net_device *dev, ...@@ -707,8 +696,7 @@ static int ks_wlan_get_rate(struct net_device *dev,
static int ks_wlan_set_rts(struct net_device *dev, struct iw_request_info *info, static int ks_wlan_set_rts(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra) struct iw_param *vwrq, char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
int rthr = vwrq->value; int rthr = vwrq->value;
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
...@@ -729,8 +717,7 @@ static int ks_wlan_set_rts(struct net_device *dev, struct iw_request_info *info, ...@@ -729,8 +717,7 @@ static int ks_wlan_set_rts(struct net_device *dev, struct iw_request_info *info,
static int ks_wlan_get_rts(struct net_device *dev, struct iw_request_info *info, static int ks_wlan_get_rts(struct net_device *dev, struct iw_request_info *info,
struct iw_param *vwrq, char *extra) struct iw_param *vwrq, char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -747,8 +734,7 @@ static int ks_wlan_set_frag(struct net_device *dev, ...@@ -747,8 +734,7 @@ static int ks_wlan_set_frag(struct net_device *dev,
struct iw_request_info *info, struct iw_param *vwrq, struct iw_request_info *info, struct iw_param *vwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
int fthr = vwrq->value; int fthr = vwrq->value;
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
...@@ -771,8 +757,7 @@ static int ks_wlan_get_frag(struct net_device *dev, ...@@ -771,8 +757,7 @@ static int ks_wlan_get_frag(struct net_device *dev,
struct iw_request_info *info, struct iw_param *vwrq, struct iw_request_info *info, struct iw_param *vwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -789,8 +774,7 @@ static int ks_wlan_set_mode(struct net_device *dev, ...@@ -789,8 +774,7 @@ static int ks_wlan_set_mode(struct net_device *dev,
struct iw_request_info *info, __u32 *uwrq, struct iw_request_info *info, __u32 *uwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
DPRINTK(2, "mode=%d\n", *uwrq); DPRINTK(2, "mode=%d\n", *uwrq);
...@@ -823,8 +807,7 @@ static int ks_wlan_get_mode(struct net_device *dev, ...@@ -823,8 +807,7 @@ static int ks_wlan_get_mode(struct net_device *dev,
struct iw_request_info *info, __u32 *uwrq, struct iw_request_info *info, __u32 *uwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -849,8 +832,7 @@ static int ks_wlan_set_encode(struct net_device *dev, ...@@ -849,8 +832,7 @@ static int ks_wlan_set_encode(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *dwrq, char *extra) struct iw_point *dwrq, char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
struct wep_key key; struct wep_key key;
int index = (dwrq->flags & IW_ENCODE_INDEX); int index = (dwrq->flags & IW_ENCODE_INDEX);
...@@ -965,8 +947,7 @@ static int ks_wlan_get_encode(struct net_device *dev, ...@@ -965,8 +947,7 @@ static int ks_wlan_get_encode(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *dwrq, char *extra) struct iw_point *dwrq, char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
char zeros[16]; char zeros[16];
int index = (dwrq->flags & IW_ENCODE_INDEX) - 1; int index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
...@@ -1064,8 +1045,7 @@ static int ks_wlan_get_range(struct net_device *dev, ...@@ -1064,8 +1045,7 @@ static int ks_wlan_get_range(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *dwrq, char *extra) struct iw_point *dwrq, char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
struct iw_range *range = (struct iw_range *)extra; struct iw_range *range = (struct iw_range *)extra;
int i, k; int i, k;
...@@ -1197,8 +1177,7 @@ static int ks_wlan_set_power(struct net_device *dev, ...@@ -1197,8 +1177,7 @@ static int ks_wlan_set_power(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *vwrq, char *extra) struct iw_param *vwrq, char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -1221,8 +1200,7 @@ static int ks_wlan_get_power(struct net_device *dev, ...@@ -1221,8 +1200,7 @@ static int ks_wlan_get_power(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *vwrq, char *extra) struct iw_param *vwrq, char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -1239,8 +1217,7 @@ static int ks_wlan_get_iwstats(struct net_device *dev, ...@@ -1239,8 +1217,7 @@ static int ks_wlan_get_iwstats(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_quality *vwrq, char *extra) struct iw_quality *vwrq, char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -1279,8 +1256,7 @@ static int ks_wlan_get_aplist(struct net_device *dev, ...@@ -1279,8 +1256,7 @@ static int ks_wlan_get_aplist(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *dwrq, char *extra) struct iw_point *dwrq, char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
struct sockaddr *address = (struct sockaddr *)extra; struct sockaddr *address = (struct sockaddr *)extra;
struct iw_quality qual[LOCAL_APLIST_MAX]; struct iw_quality qual[LOCAL_APLIST_MAX];
...@@ -1312,8 +1288,7 @@ static int ks_wlan_set_scan(struct net_device *dev, ...@@ -1312,8 +1288,7 @@ static int ks_wlan_set_scan(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
union iwreq_data *wrqu, char *extra) union iwreq_data *wrqu, char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
struct iw_scan_req *req = NULL; struct iw_scan_req *req = NULL;
DPRINTK(2, "\n"); DPRINTK(2, "\n");
...@@ -1506,8 +1481,7 @@ static int ks_wlan_get_scan(struct net_device *dev, ...@@ -1506,8 +1481,7 @@ static int ks_wlan_get_scan(struct net_device *dev,
struct iw_request_info *info, struct iw_point *dwrq, struct iw_request_info *info, struct iw_point *dwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
int i; int i;
char *current_ev = extra; char *current_ev = extra;
...@@ -1552,8 +1526,7 @@ static int ks_wlan_config_commit(struct net_device *dev, ...@@ -1552,8 +1526,7 @@ static int ks_wlan_config_commit(struct net_device *dev,
struct iw_request_info *info, void *zwrq, struct iw_request_info *info, void *zwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (!priv->need_commit) if (!priv->need_commit)
return 0; return 0;
...@@ -1568,8 +1541,7 @@ static int ks_wlan_set_genie(struct net_device *dev, ...@@ -1568,8 +1541,7 @@ static int ks_wlan_set_genie(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *dwrq, char *extra) struct iw_point *dwrq, char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
DPRINTK(2, "\n"); DPRINTK(2, "\n");
...@@ -1584,8 +1556,7 @@ static int ks_wlan_set_auth_mode(struct net_device *dev, ...@@ -1584,8 +1556,7 @@ static int ks_wlan_set_auth_mode(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *vwrq, char *extra) struct iw_param *vwrq, char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
int index = (vwrq->flags & IW_AUTH_INDEX); int index = (vwrq->flags & IW_AUTH_INDEX);
int value = vwrq->value; int value = vwrq->value;
...@@ -1719,8 +1690,7 @@ static int ks_wlan_get_auth_mode(struct net_device *dev, ...@@ -1719,8 +1690,7 @@ static int ks_wlan_get_auth_mode(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *vwrq, char *extra) struct iw_param *vwrq, char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
int index = (vwrq->flags & IW_AUTH_INDEX); int index = (vwrq->flags & IW_AUTH_INDEX);
DPRINTK(2, "index=%d\n", index); DPRINTK(2, "index=%d\n", index);
...@@ -1764,8 +1734,7 @@ static int ks_wlan_set_encode_ext(struct net_device *dev, ...@@ -1764,8 +1734,7 @@ static int ks_wlan_set_encode_ext(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *dwrq, char *extra) struct iw_point *dwrq, char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
struct iw_encode_ext *enc; struct iw_encode_ext *enc;
int index = dwrq->flags & IW_ENCODE_INDEX; int index = dwrq->flags & IW_ENCODE_INDEX;
unsigned int commit = 0; unsigned int commit = 0;
...@@ -1861,8 +1830,7 @@ static int ks_wlan_get_encode_ext(struct net_device *dev, ...@@ -1861,8 +1830,7 @@ static int ks_wlan_get_encode_ext(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *dwrq, char *extra) struct iw_point *dwrq, char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -1882,8 +1850,7 @@ static int ks_wlan_set_pmksa(struct net_device *dev, ...@@ -1882,8 +1850,7 @@ static int ks_wlan_set_pmksa(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *dwrq, char *extra) struct iw_point *dwrq, char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
struct iw_pmksa *pmksa; struct iw_pmksa *pmksa;
int i; int i;
struct pmk_t *pmk; struct pmk_t *pmk;
...@@ -1982,8 +1949,7 @@ static int ks_wlan_set_pmksa(struct net_device *dev, ...@@ -1982,8 +1949,7 @@ static int ks_wlan_set_pmksa(struct net_device *dev,
static struct iw_statistics *ks_get_wireless_stats(struct net_device *dev) static struct iw_statistics *ks_get_wireless_stats(struct net_device *dev)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
struct iw_statistics *wstats = &priv->wstats; struct iw_statistics *wstats = &priv->wstats;
if (!atomic_read(&update_phyinfo)) { if (!atomic_read(&update_phyinfo)) {
...@@ -2010,8 +1976,8 @@ static int ks_wlan_set_stop_request(struct net_device *dev, ...@@ -2010,8 +1976,8 @@ static int ks_wlan_set_stop_request(struct net_device *dev,
struct iw_request_info *info, __u32 *uwrq, struct iw_request_info *info, __u32 *uwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
DPRINTK(2, "\n"); DPRINTK(2, "\n");
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
...@@ -2030,8 +1996,7 @@ static int ks_wlan_set_mlme(struct net_device *dev, ...@@ -2030,8 +1996,7 @@ static int ks_wlan_set_mlme(struct net_device *dev,
struct iw_request_info *info, struct iw_point *dwrq, struct iw_request_info *info, struct iw_point *dwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
struct iw_mlme *mlme = (struct iw_mlme *)extra; struct iw_mlme *mlme = (struct iw_mlme *)extra;
__u32 mode; __u32 mode;
...@@ -2057,8 +2022,8 @@ static int ks_wlan_get_firmware_version(struct net_device *dev, ...@@ -2057,8 +2022,8 @@ static int ks_wlan_get_firmware_version(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *dwrq, char *extra) struct iw_point *dwrq, char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
strcpy(extra, priv->firmware_version); strcpy(extra, priv->firmware_version);
dwrq->length = priv->version_size + 1; dwrq->length = priv->version_size + 1;
return 0; return 0;
...@@ -2068,8 +2033,7 @@ static int ks_wlan_set_preamble(struct net_device *dev, ...@@ -2068,8 +2033,7 @@ static int ks_wlan_set_preamble(struct net_device *dev,
struct iw_request_info *info, __u32 *uwrq, struct iw_request_info *info, __u32 *uwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -2091,8 +2055,7 @@ static int ks_wlan_get_preamble(struct net_device *dev, ...@@ -2091,8 +2055,7 @@ static int ks_wlan_get_preamble(struct net_device *dev,
struct iw_request_info *info, __u32 *uwrq, struct iw_request_info *info, __u32 *uwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -2106,8 +2069,7 @@ static int ks_wlan_set_power_mgmt(struct net_device *dev, ...@@ -2106,8 +2069,7 @@ static int ks_wlan_set_power_mgmt(struct net_device *dev,
struct iw_request_info *info, __u32 *uwrq, struct iw_request_info *info, __u32 *uwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -2138,8 +2100,7 @@ static int ks_wlan_get_power_mgmt(struct net_device *dev, ...@@ -2138,8 +2100,7 @@ static int ks_wlan_get_power_mgmt(struct net_device *dev,
struct iw_request_info *info, __u32 *uwrq, struct iw_request_info *info, __u32 *uwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -2153,8 +2114,7 @@ static int ks_wlan_set_scan_type(struct net_device *dev, ...@@ -2153,8 +2114,7 @@ static int ks_wlan_set_scan_type(struct net_device *dev,
struct iw_request_info *info, __u32 *uwrq, struct iw_request_info *info, __u32 *uwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -2174,8 +2134,7 @@ static int ks_wlan_get_scan_type(struct net_device *dev, ...@@ -2174,8 +2134,7 @@ static int ks_wlan_get_scan_type(struct net_device *dev,
struct iw_request_info *info, __u32 *uwrq, struct iw_request_info *info, __u32 *uwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -2188,8 +2147,7 @@ static int ks_wlan_set_beacon_lost(struct net_device *dev, ...@@ -2188,8 +2147,7 @@ static int ks_wlan_set_beacon_lost(struct net_device *dev,
struct iw_request_info *info, __u32 *uwrq, struct iw_request_info *info, __u32 *uwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -2211,8 +2169,7 @@ static int ks_wlan_get_beacon_lost(struct net_device *dev, ...@@ -2211,8 +2169,7 @@ static int ks_wlan_get_beacon_lost(struct net_device *dev,
struct iw_request_info *info, __u32 *uwrq, struct iw_request_info *info, __u32 *uwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -2225,8 +2182,7 @@ static int ks_wlan_set_phy_type(struct net_device *dev, ...@@ -2225,8 +2182,7 @@ static int ks_wlan_set_phy_type(struct net_device *dev,
struct iw_request_info *info, __u32 *uwrq, struct iw_request_info *info, __u32 *uwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -2249,8 +2205,7 @@ static int ks_wlan_get_phy_type(struct net_device *dev, ...@@ -2249,8 +2205,7 @@ static int ks_wlan_get_phy_type(struct net_device *dev,
struct iw_request_info *info, __u32 *uwrq, struct iw_request_info *info, __u32 *uwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -2263,8 +2218,7 @@ static int ks_wlan_set_cts_mode(struct net_device *dev, ...@@ -2263,8 +2218,7 @@ static int ks_wlan_set_cts_mode(struct net_device *dev,
struct iw_request_info *info, __u32 *uwrq, struct iw_request_info *info, __u32 *uwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -2290,8 +2244,7 @@ static int ks_wlan_get_cts_mode(struct net_device *dev, ...@@ -2290,8 +2244,7 @@ static int ks_wlan_get_cts_mode(struct net_device *dev,
struct iw_request_info *info, __u32 *uwrq, struct iw_request_info *info, __u32 *uwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -2304,8 +2257,7 @@ static int ks_wlan_set_sleep_mode(struct net_device *dev, ...@@ -2304,8 +2257,7 @@ static int ks_wlan_set_sleep_mode(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
__u32 *uwrq, char *extra) __u32 *uwrq, char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
DPRINTK(2, "\n"); DPRINTK(2, "\n");
...@@ -2332,8 +2284,7 @@ static int ks_wlan_get_sleep_mode(struct net_device *dev, ...@@ -2332,8 +2284,7 @@ static int ks_wlan_get_sleep_mode(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
__u32 *uwrq, char *extra) __u32 *uwrq, char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
DPRINTK(2, "GET_SLEEP_MODE %d\n", priv->sleep_mode); DPRINTK(2, "GET_SLEEP_MODE %d\n", priv->sleep_mode);
*uwrq = priv->sleep_mode; *uwrq = priv->sleep_mode;
...@@ -2347,8 +2298,8 @@ static int ks_wlan_set_wps_enable(struct net_device *dev, ...@@ -2347,8 +2298,8 @@ static int ks_wlan_set_wps_enable(struct net_device *dev,
struct iw_request_info *info, __u32 *uwrq, struct iw_request_info *info, __u32 *uwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
DPRINTK(2, "\n"); DPRINTK(2, "\n");
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
...@@ -2368,8 +2319,8 @@ static int ks_wlan_get_wps_enable(struct net_device *dev, ...@@ -2368,8 +2319,8 @@ static int ks_wlan_get_wps_enable(struct net_device *dev,
struct iw_request_info *info, __u32 *uwrq, struct iw_request_info *info, __u32 *uwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
DPRINTK(2, "\n"); DPRINTK(2, "\n");
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
...@@ -2387,8 +2338,7 @@ static int ks_wlan_set_wps_probe_req(struct net_device *dev, ...@@ -2387,8 +2338,7 @@ static int ks_wlan_set_wps_probe_req(struct net_device *dev,
{ {
u8 *p = extra; u8 *p = extra;
unsigned char len; unsigned char len;
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
DPRINTK(2, "\n"); DPRINTK(2, "\n");
...@@ -2422,8 +2372,7 @@ static int ks_wlan_set_tx_gain(struct net_device *dev, ...@@ -2422,8 +2372,7 @@ static int ks_wlan_set_tx_gain(struct net_device *dev,
struct iw_request_info *info, __u32 *uwrq, struct iw_request_info *info, __u32 *uwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -2446,8 +2395,7 @@ static int ks_wlan_get_tx_gain(struct net_device *dev, ...@@ -2446,8 +2395,7 @@ static int ks_wlan_get_tx_gain(struct net_device *dev,
struct iw_request_info *info, __u32 *uwrq, struct iw_request_info *info, __u32 *uwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -2461,8 +2409,7 @@ static int ks_wlan_set_rx_gain(struct net_device *dev, ...@@ -2461,8 +2409,7 @@ static int ks_wlan_set_rx_gain(struct net_device *dev,
struct iw_request_info *info, __u32 *uwrq, struct iw_request_info *info, __u32 *uwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -2485,8 +2432,7 @@ static int ks_wlan_get_rx_gain(struct net_device *dev, ...@@ -2485,8 +2432,7 @@ static int ks_wlan_get_rx_gain(struct net_device *dev,
struct iw_request_info *info, __u32 *uwrq, struct iw_request_info *info, __u32 *uwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
if (priv->sleep_mode == SLP_SLEEP) if (priv->sleep_mode == SLP_SLEEP)
return -EPERM; return -EPERM;
...@@ -2500,8 +2446,7 @@ static int ks_wlan_get_eeprom_cksum(struct net_device *dev, ...@@ -2500,8 +2446,7 @@ static int ks_wlan_get_eeprom_cksum(struct net_device *dev,
struct iw_request_info *info, __u32 *uwrq, struct iw_request_info *info, __u32 *uwrq,
char *extra) char *extra)
{ {
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
*uwrq = priv->eeprom_checksum; *uwrq = priv->eeprom_checksum;
return 0; return 0;
...@@ -2625,8 +2570,7 @@ static int ks_wlan_hostt(struct net_device *dev, struct iw_request_info *info, ...@@ -2625,8 +2570,7 @@ static int ks_wlan_hostt(struct net_device *dev, struct iw_request_info *info,
__u32 *uwrq, char *extra) __u32 *uwrq, char *extra)
{ {
int i, event; int i, event;
struct ks_wlan_private *priv = struct ks_wlan_private *priv = netdev_priv(dev);
(struct ks_wlan_private *)netdev_priv(dev);
for (i = 63; i >= 0; i--) { for (i = 63; i >= 0; i--) {
event = event =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment