Commit 89e70645 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Kalle Valo

wifi: airo: Avoid clashing function prototypes

When built with Control Flow Integrity, function prototypes between
caller and function declaration must match. These mismatches are visible
at compile time with the new -Wcast-function-type-strict in Clang[1].

Fix a total of 32 warnings like these:

../drivers/net/wireless/cisco/airo.c:7570:2: warning: cast from 'int (*)(struct net_device *, struct iw_request_info *, void *, char *)' to 'iw_handler' (aka 'int (*)(struct net_device *, struct iw_request_info *, union iwreq_data *, char *)') converts to incompatible function type [-Wcast-function-type-strict]
        (iw_handler) airo_config_commit,        /* SIOCSIWCOMMIT */
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The airo Wireless Extension handler callbacks (iw_handler) use a
union for the data argument. Actually use the union and perform explicit
member selection in the function body instead of having a function
prototype mismatch. There are no resulting binary differences
before/after changes.

These changes were made partly manually and partly with the help of
Coccinelle.

Link: https://github.com/KSPP/linux/issues/236
Link: https://reviews.llvm.org/D134831 [1]
Reviewed-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarGustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/820abf91d12809904696ddb8925ec5e1e0da3e4c.1667934775.git.gustavoars@kernel.org
parent ff7efc66
...@@ -4807,7 +4807,8 @@ static int get_dec_u16(char *buffer, int *start, int limit) ...@@ -4807,7 +4807,8 @@ static int get_dec_u16(char *buffer, int *start, int limit)
} }
static int airo_config_commit(struct net_device *dev, static int airo_config_commit(struct net_device *dev,
struct iw_request_info *info, void *zwrq, struct iw_request_info *info,
union iwreq_data *wrqu,
char *extra); char *extra);
static inline int sniffing_mode(struct airo_info *ai) static inline int sniffing_mode(struct airo_info *ai)
...@@ -5804,10 +5805,10 @@ static int airo_get_quality (StatusRid *status_rid, CapabilityRid *cap_rid) ...@@ -5804,10 +5805,10 @@ static int airo_get_quality (StatusRid *status_rid, CapabilityRid *cap_rid)
*/ */
static int airo_get_name(struct net_device *dev, static int airo_get_name(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
char *cwrq, union iwreq_data *cwrq,
char *extra) char *extra)
{ {
strcpy(cwrq, "IEEE 802.11-DS"); strcpy(cwrq->name, "IEEE 802.11-DS");
return 0; return 0;
} }
...@@ -5817,9 +5818,10 @@ static int airo_get_name(struct net_device *dev, ...@@ -5817,9 +5818,10 @@ static int airo_get_name(struct net_device *dev,
*/ */
static int airo_set_freq(struct net_device *dev, static int airo_set_freq(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_freq *fwrq, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
struct iw_freq *fwrq = &wrqu->freq;
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
int rc = -EINPROGRESS; /* Call commit handler */ int rc = -EINPROGRESS; /* Call commit handler */
...@@ -5858,9 +5860,10 @@ static int airo_set_freq(struct net_device *dev, ...@@ -5858,9 +5860,10 @@ static int airo_set_freq(struct net_device *dev,
*/ */
static int airo_get_freq(struct net_device *dev, static int airo_get_freq(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_freq *fwrq, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
struct iw_freq *fwrq = &wrqu->freq;
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
StatusRid status_rid; /* Card status info */ StatusRid status_rid; /* Card status info */
int ch; int ch;
...@@ -5890,9 +5893,10 @@ static int airo_get_freq(struct net_device *dev, ...@@ -5890,9 +5893,10 @@ static int airo_get_freq(struct net_device *dev,
*/ */
static int airo_set_essid(struct net_device *dev, static int airo_set_essid(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *dwrq, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
struct iw_point *dwrq = &wrqu->essid;
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
SsidRid SSID_rid; /* SSIDs */ SsidRid SSID_rid; /* SSIDs */
...@@ -5935,9 +5939,10 @@ static int airo_set_essid(struct net_device *dev, ...@@ -5935,9 +5939,10 @@ static int airo_set_essid(struct net_device *dev,
*/ */
static int airo_get_essid(struct net_device *dev, static int airo_get_essid(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *dwrq, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
struct iw_point *dwrq = &wrqu->essid;
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
StatusRid status_rid; /* Card status info */ StatusRid status_rid; /* Card status info */
...@@ -5963,9 +5968,10 @@ static int airo_get_essid(struct net_device *dev, ...@@ -5963,9 +5968,10 @@ static int airo_get_essid(struct net_device *dev,
*/ */
static int airo_set_wap(struct net_device *dev, static int airo_set_wap(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct sockaddr *awrq, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
struct sockaddr *awrq = &wrqu->ap_addr;
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
Cmd cmd; Cmd cmd;
Resp rsp; Resp rsp;
...@@ -5998,9 +6004,10 @@ static int airo_set_wap(struct net_device *dev, ...@@ -5998,9 +6004,10 @@ static int airo_set_wap(struct net_device *dev,
*/ */
static int airo_get_wap(struct net_device *dev, static int airo_get_wap(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct sockaddr *awrq, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
struct sockaddr *awrq = &wrqu->ap_addr;
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
StatusRid status_rid; /* Card status info */ StatusRid status_rid; /* Card status info */
...@@ -6019,9 +6026,10 @@ static int airo_get_wap(struct net_device *dev, ...@@ -6019,9 +6026,10 @@ static int airo_get_wap(struct net_device *dev,
*/ */
static int airo_set_nick(struct net_device *dev, static int airo_set_nick(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *dwrq, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
struct iw_point *dwrq = &wrqu->data;
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
/* Check the size of the string */ /* Check the size of the string */
...@@ -6042,9 +6050,10 @@ static int airo_set_nick(struct net_device *dev, ...@@ -6042,9 +6050,10 @@ static int airo_set_nick(struct net_device *dev,
*/ */
static int airo_get_nick(struct net_device *dev, static int airo_get_nick(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *dwrq, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
struct iw_point *dwrq = &wrqu->data;
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
readConfigRid(local, 1); readConfigRid(local, 1);
...@@ -6061,9 +6070,10 @@ static int airo_get_nick(struct net_device *dev, ...@@ -6061,9 +6070,10 @@ static int airo_get_nick(struct net_device *dev,
*/ */
static int airo_set_rate(struct net_device *dev, static int airo_set_rate(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *vwrq, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
struct iw_param *vwrq = &wrqu->bitrate;
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
CapabilityRid cap_rid; /* Card capability info */ CapabilityRid cap_rid; /* Card capability info */
u8 brate = 0; u8 brate = 0;
...@@ -6131,9 +6141,10 @@ static int airo_set_rate(struct net_device *dev, ...@@ -6131,9 +6141,10 @@ static int airo_set_rate(struct net_device *dev,
*/ */
static int airo_get_rate(struct net_device *dev, static int airo_get_rate(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *vwrq, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
struct iw_param *vwrq = &wrqu->bitrate;
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
StatusRid status_rid; /* Card status info */ StatusRid status_rid; /* Card status info */
...@@ -6153,9 +6164,10 @@ static int airo_get_rate(struct net_device *dev, ...@@ -6153,9 +6164,10 @@ static int airo_get_rate(struct net_device *dev,
*/ */
static int airo_set_rts(struct net_device *dev, static int airo_set_rts(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *vwrq, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
struct iw_param *vwrq = &wrqu->rts;
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
int rthr = vwrq->value; int rthr = vwrq->value;
...@@ -6177,9 +6189,10 @@ static int airo_set_rts(struct net_device *dev, ...@@ -6177,9 +6189,10 @@ static int airo_set_rts(struct net_device *dev,
*/ */
static int airo_get_rts(struct net_device *dev, static int airo_get_rts(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *vwrq, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
struct iw_param *vwrq = &wrqu->rts;
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
readConfigRid(local, 1); readConfigRid(local, 1);
...@@ -6196,9 +6209,9 @@ static int airo_get_rts(struct net_device *dev, ...@@ -6196,9 +6209,9 @@ static int airo_get_rts(struct net_device *dev,
*/ */
static int airo_set_frag(struct net_device *dev, static int airo_set_frag(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *vwrq, union iwreq_data *wrqu, char *extra)
char *extra)
{ {
struct iw_param *vwrq = &wrqu->frag;
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
int fthr = vwrq->value; int fthr = vwrq->value;
...@@ -6221,9 +6234,10 @@ static int airo_set_frag(struct net_device *dev, ...@@ -6221,9 +6234,10 @@ static int airo_set_frag(struct net_device *dev,
*/ */
static int airo_get_frag(struct net_device *dev, static int airo_get_frag(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *vwrq, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
struct iw_param *vwrq = &wrqu->frag;
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
readConfigRid(local, 1); readConfigRid(local, 1);
...@@ -6240,9 +6254,10 @@ static int airo_get_frag(struct net_device *dev, ...@@ -6240,9 +6254,10 @@ static int airo_get_frag(struct net_device *dev,
*/ */
static int airo_set_mode(struct net_device *dev, static int airo_set_mode(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
__u32 *uwrq, union iwreq_data *uwrq,
char *extra) char *extra)
{ {
__u32 mode = uwrq->mode;
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
int reset = 0; int reset = 0;
...@@ -6250,7 +6265,7 @@ static int airo_set_mode(struct net_device *dev, ...@@ -6250,7 +6265,7 @@ static int airo_set_mode(struct net_device *dev,
if (sniffing_mode(local)) if (sniffing_mode(local))
reset = 1; reset = 1;
switch(*uwrq) { switch (mode) {
case IW_MODE_ADHOC: case IW_MODE_ADHOC:
local->config.opmode &= ~MODE_CFG_MASK; local->config.opmode &= ~MODE_CFG_MASK;
local->config.opmode |= MODE_STA_IBSS; local->config.opmode |= MODE_STA_IBSS;
...@@ -6303,7 +6318,7 @@ static int airo_set_mode(struct net_device *dev, ...@@ -6303,7 +6318,7 @@ static int airo_set_mode(struct net_device *dev,
*/ */
static int airo_get_mode(struct net_device *dev, static int airo_get_mode(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
__u32 *uwrq, union iwreq_data *uwrq,
char *extra) char *extra)
{ {
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
...@@ -6312,16 +6327,16 @@ static int airo_get_mode(struct net_device *dev, ...@@ -6312,16 +6327,16 @@ static int airo_get_mode(struct net_device *dev,
/* If not managed, assume it's ad-hoc */ /* If not managed, assume it's ad-hoc */
switch (local->config.opmode & MODE_CFG_MASK) { switch (local->config.opmode & MODE_CFG_MASK) {
case MODE_STA_ESS: case MODE_STA_ESS:
*uwrq = IW_MODE_INFRA; uwrq->mode = IW_MODE_INFRA;
break; break;
case MODE_AP: case MODE_AP:
*uwrq = IW_MODE_MASTER; uwrq->mode = IW_MODE_MASTER;
break; break;
case MODE_AP_RPTR: case MODE_AP_RPTR:
*uwrq = IW_MODE_REPEAT; uwrq->mode = IW_MODE_REPEAT;
break; break;
default: default:
*uwrq = IW_MODE_ADHOC; uwrq->mode = IW_MODE_ADHOC;
} }
return 0; return 0;
...@@ -6338,9 +6353,10 @@ static inline int valid_index(struct airo_info *ai, int index) ...@@ -6338,9 +6353,10 @@ static inline int valid_index(struct airo_info *ai, int index)
*/ */
static int airo_set_encode(struct net_device *dev, static int airo_set_encode(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *dwrq, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
struct iw_point *dwrq = &wrqu->encoding;
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
int perm = (dwrq->flags & IW_ENCODE_TEMP ? 0 : 1); int perm = (dwrq->flags & IW_ENCODE_TEMP ? 0 : 1);
__le16 currentAuthType = local->config.authType; __le16 currentAuthType = local->config.authType;
...@@ -6437,9 +6453,10 @@ static int airo_set_encode(struct net_device *dev, ...@@ -6437,9 +6453,10 @@ static int airo_set_encode(struct net_device *dev,
*/ */
static int airo_get_encode(struct net_device *dev, static int airo_get_encode(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *dwrq, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
struct iw_point *dwrq = &wrqu->encoding;
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
int index = (dwrq->flags & IW_ENCODE_INDEX) - 1; int index = (dwrq->flags & IW_ENCODE_INDEX) - 1;
int wep_key_len; int wep_key_len;
...@@ -6784,9 +6801,10 @@ static int airo_get_auth(struct net_device *dev, ...@@ -6784,9 +6801,10 @@ static int airo_get_auth(struct net_device *dev,
*/ */
static int airo_set_txpow(struct net_device *dev, static int airo_set_txpow(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *vwrq, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
struct iw_param *vwrq = &wrqu->txpower;
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
CapabilityRid cap_rid; /* Card capability info */ CapabilityRid cap_rid; /* Card capability info */
int i; int i;
...@@ -6821,9 +6839,10 @@ static int airo_set_txpow(struct net_device *dev, ...@@ -6821,9 +6839,10 @@ static int airo_set_txpow(struct net_device *dev,
*/ */
static int airo_get_txpow(struct net_device *dev, static int airo_get_txpow(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *vwrq, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
struct iw_param *vwrq = &wrqu->txpower;
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
readConfigRid(local, 1); readConfigRid(local, 1);
...@@ -6841,9 +6860,10 @@ static int airo_get_txpow(struct net_device *dev, ...@@ -6841,9 +6860,10 @@ static int airo_get_txpow(struct net_device *dev,
*/ */
static int airo_set_retry(struct net_device *dev, static int airo_set_retry(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *vwrq, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
struct iw_param *vwrq = &wrqu->retry;
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
int rc = -EINVAL; int rc = -EINVAL;
...@@ -6879,9 +6899,10 @@ static int airo_set_retry(struct net_device *dev, ...@@ -6879,9 +6899,10 @@ static int airo_set_retry(struct net_device *dev,
*/ */
static int airo_get_retry(struct net_device *dev, static int airo_get_retry(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *vwrq, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
struct iw_param *vwrq = &wrqu->retry;
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
vwrq->disabled = 0; /* Can't be disabled */ vwrq->disabled = 0; /* Can't be disabled */
...@@ -6910,9 +6931,10 @@ static int airo_get_retry(struct net_device *dev, ...@@ -6910,9 +6931,10 @@ static int airo_get_retry(struct net_device *dev,
*/ */
static int airo_get_range(struct net_device *dev, static int airo_get_range(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *dwrq, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
struct iw_point *dwrq = &wrqu->data;
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
struct iw_range *range = (struct iw_range *) extra; struct iw_range *range = (struct iw_range *) extra;
CapabilityRid cap_rid; /* Card capability info */ CapabilityRid cap_rid; /* Card capability info */
...@@ -7036,9 +7058,9 @@ static int airo_get_range(struct net_device *dev, ...@@ -7036,9 +7058,9 @@ static int airo_get_range(struct net_device *dev,
*/ */
static int airo_set_power(struct net_device *dev, static int airo_set_power(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *vwrq, union iwreq_data *wrqu, char *extra)
char *extra)
{ {
struct iw_param *vwrq = &wrqu->power;
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
readConfigRid(local, 1); readConfigRid(local, 1);
...@@ -7094,9 +7116,10 @@ static int airo_set_power(struct net_device *dev, ...@@ -7094,9 +7116,10 @@ static int airo_set_power(struct net_device *dev,
*/ */
static int airo_get_power(struct net_device *dev, static int airo_get_power(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *vwrq, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
struct iw_param *vwrq = &wrqu->power;
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
__le16 mode; __le16 mode;
...@@ -7125,9 +7148,10 @@ static int airo_get_power(struct net_device *dev, ...@@ -7125,9 +7148,10 @@ static int airo_get_power(struct net_device *dev,
*/ */
static int airo_set_sens(struct net_device *dev, static int airo_set_sens(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *vwrq, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
struct iw_param *vwrq = &wrqu->sens;
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
readConfigRid(local, 1); readConfigRid(local, 1);
...@@ -7144,9 +7168,10 @@ static int airo_set_sens(struct net_device *dev, ...@@ -7144,9 +7168,10 @@ static int airo_set_sens(struct net_device *dev,
*/ */
static int airo_get_sens(struct net_device *dev, static int airo_get_sens(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_param *vwrq, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
struct iw_param *vwrq = &wrqu->sens;
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
readConfigRid(local, 1); readConfigRid(local, 1);
...@@ -7164,9 +7189,10 @@ static int airo_get_sens(struct net_device *dev, ...@@ -7164,9 +7189,10 @@ static int airo_get_sens(struct net_device *dev,
*/ */
static int airo_get_aplist(struct net_device *dev, static int airo_get_aplist(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *dwrq, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
struct iw_point *dwrq = &wrqu->data;
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
struct sockaddr *address = (struct sockaddr *) extra; struct sockaddr *address = (struct sockaddr *) extra;
struct iw_quality *qual; struct iw_quality *qual;
...@@ -7242,7 +7268,7 @@ static int airo_get_aplist(struct net_device *dev, ...@@ -7242,7 +7268,7 @@ static int airo_get_aplist(struct net_device *dev,
*/ */
static int airo_set_scan(struct net_device *dev, static int airo_set_scan(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *dwrq, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
struct airo_info *ai = dev->ml_priv; struct airo_info *ai = dev->ml_priv;
...@@ -7473,9 +7499,10 @@ static inline char *airo_translate_scan(struct net_device *dev, ...@@ -7473,9 +7499,10 @@ static inline char *airo_translate_scan(struct net_device *dev,
*/ */
static int airo_get_scan(struct net_device *dev, static int airo_get_scan(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
struct iw_point *dwrq, union iwreq_data *wrqu,
char *extra) char *extra)
{ {
struct iw_point *dwrq = &wrqu->data;
struct airo_info *ai = dev->ml_priv; struct airo_info *ai = dev->ml_priv;
BSSListElement *net; BSSListElement *net;
int err = 0; int err = 0;
...@@ -7517,7 +7544,7 @@ static int airo_get_scan(struct net_device *dev, ...@@ -7517,7 +7544,7 @@ static int airo_get_scan(struct net_device *dev,
*/ */
static int airo_config_commit(struct net_device *dev, static int airo_config_commit(struct net_device *dev,
struct iw_request_info *info, /* NULL */ struct iw_request_info *info, /* NULL */
void *zwrq, /* NULL */ union iwreq_data *wrqu, /* NULL */
char *extra) /* NULL */ char *extra) /* NULL */
{ {
struct airo_info *local = dev->ml_priv; struct airo_info *local = dev->ml_priv;
...@@ -7567,61 +7594,46 @@ static const struct iw_priv_args airo_private_args[] = { ...@@ -7567,61 +7594,46 @@ static const struct iw_priv_args airo_private_args[] = {
static const iw_handler airo_handler[] = static const iw_handler airo_handler[] =
{ {
(iw_handler) airo_config_commit, /* SIOCSIWCOMMIT */ IW_HANDLER(SIOCSIWCOMMIT, airo_config_commit),
(iw_handler) airo_get_name, /* SIOCGIWNAME */ IW_HANDLER(SIOCGIWNAME, airo_get_name),
(iw_handler) NULL, /* SIOCSIWNWID */ IW_HANDLER(SIOCSIWFREQ, airo_set_freq),
(iw_handler) NULL, /* SIOCGIWNWID */ IW_HANDLER(SIOCGIWFREQ, airo_get_freq),
(iw_handler) airo_set_freq, /* SIOCSIWFREQ */ IW_HANDLER(SIOCSIWMODE, airo_set_mode),
(iw_handler) airo_get_freq, /* SIOCGIWFREQ */ IW_HANDLER(SIOCGIWMODE, airo_get_mode),
(iw_handler) airo_set_mode, /* SIOCSIWMODE */ IW_HANDLER(SIOCSIWSENS, airo_set_sens),
(iw_handler) airo_get_mode, /* SIOCGIWMODE */ IW_HANDLER(SIOCGIWSENS, airo_get_sens),
(iw_handler) airo_set_sens, /* SIOCSIWSENS */ IW_HANDLER(SIOCGIWRANGE, airo_get_range),
(iw_handler) airo_get_sens, /* SIOCGIWSENS */ IW_HANDLER(SIOCSIWSPY, iw_handler_set_spy),
(iw_handler) NULL, /* SIOCSIWRANGE */ IW_HANDLER(SIOCGIWSPY, iw_handler_get_spy),
(iw_handler) airo_get_range, /* SIOCGIWRANGE */ IW_HANDLER(SIOCSIWTHRSPY, iw_handler_set_thrspy),
(iw_handler) NULL, /* SIOCSIWPRIV */ IW_HANDLER(SIOCGIWTHRSPY, iw_handler_get_thrspy),
(iw_handler) NULL, /* SIOCGIWPRIV */ IW_HANDLER(SIOCSIWAP, airo_set_wap),
(iw_handler) NULL, /* SIOCSIWSTATS */ IW_HANDLER(SIOCGIWAP, airo_get_wap),
(iw_handler) NULL, /* SIOCGIWSTATS */ IW_HANDLER(SIOCGIWAPLIST, airo_get_aplist),
iw_handler_set_spy, /* SIOCSIWSPY */ IW_HANDLER(SIOCSIWSCAN, airo_set_scan),
iw_handler_get_spy, /* SIOCGIWSPY */ IW_HANDLER(SIOCGIWSCAN, airo_get_scan),
iw_handler_set_thrspy, /* SIOCSIWTHRSPY */ IW_HANDLER(SIOCSIWESSID, airo_set_essid),
iw_handler_get_thrspy, /* SIOCGIWTHRSPY */ IW_HANDLER(SIOCGIWESSID, airo_get_essid),
(iw_handler) airo_set_wap, /* SIOCSIWAP */ IW_HANDLER(SIOCSIWNICKN, airo_set_nick),
(iw_handler) airo_get_wap, /* SIOCGIWAP */ IW_HANDLER(SIOCGIWNICKN, airo_get_nick),
(iw_handler) NULL, /* -- hole -- */ IW_HANDLER(SIOCSIWRATE, airo_set_rate),
(iw_handler) airo_get_aplist, /* SIOCGIWAPLIST */ IW_HANDLER(SIOCGIWRATE, airo_get_rate),
(iw_handler) airo_set_scan, /* SIOCSIWSCAN */ IW_HANDLER(SIOCSIWRTS, airo_set_rts),
(iw_handler) airo_get_scan, /* SIOCGIWSCAN */ IW_HANDLER(SIOCGIWRTS, airo_get_rts),
(iw_handler) airo_set_essid, /* SIOCSIWESSID */ IW_HANDLER(SIOCSIWFRAG, airo_set_frag),
(iw_handler) airo_get_essid, /* SIOCGIWESSID */ IW_HANDLER(SIOCGIWFRAG, airo_get_frag),
(iw_handler) airo_set_nick, /* SIOCSIWNICKN */ IW_HANDLER(SIOCSIWTXPOW, airo_set_txpow),
(iw_handler) airo_get_nick, /* SIOCGIWNICKN */ IW_HANDLER(SIOCGIWTXPOW, airo_get_txpow),
(iw_handler) NULL, /* -- hole -- */ IW_HANDLER(SIOCSIWRETRY, airo_set_retry),
(iw_handler) NULL, /* -- hole -- */ IW_HANDLER(SIOCGIWRETRY, airo_get_retry),
(iw_handler) airo_set_rate, /* SIOCSIWRATE */ IW_HANDLER(SIOCSIWENCODE, airo_set_encode),
(iw_handler) airo_get_rate, /* SIOCGIWRATE */ IW_HANDLER(SIOCGIWENCODE, airo_get_encode),
(iw_handler) airo_set_rts, /* SIOCSIWRTS */ IW_HANDLER(SIOCSIWPOWER, airo_set_power),
(iw_handler) airo_get_rts, /* SIOCGIWRTS */ IW_HANDLER(SIOCGIWPOWER, airo_get_power),
(iw_handler) airo_set_frag, /* SIOCSIWFRAG */ IW_HANDLER(SIOCSIWAUTH, airo_set_auth),
(iw_handler) airo_get_frag, /* SIOCGIWFRAG */ IW_HANDLER(SIOCGIWAUTH, airo_get_auth),
(iw_handler) airo_set_txpow, /* SIOCSIWTXPOW */ IW_HANDLER(SIOCSIWENCODEEXT, airo_set_encodeext),
(iw_handler) airo_get_txpow, /* SIOCGIWTXPOW */ IW_HANDLER(SIOCGIWENCODEEXT, airo_get_encodeext),
(iw_handler) airo_set_retry, /* SIOCSIWRETRY */
(iw_handler) airo_get_retry, /* SIOCGIWRETRY */
(iw_handler) airo_set_encode, /* SIOCSIWENCODE */
(iw_handler) airo_get_encode, /* SIOCGIWENCODE */
(iw_handler) airo_set_power, /* SIOCSIWPOWER */
(iw_handler) airo_get_power, /* SIOCGIWPOWER */
(iw_handler) NULL, /* -- hole -- */
(iw_handler) NULL, /* -- hole -- */
(iw_handler) NULL, /* SIOCSIWGENIE */
(iw_handler) NULL, /* SIOCGIWGENIE */
(iw_handler) airo_set_auth, /* SIOCSIWAUTH */
(iw_handler) airo_get_auth, /* SIOCGIWAUTH */
(iw_handler) airo_set_encodeext, /* SIOCSIWENCODEEXT */
(iw_handler) airo_get_encodeext, /* SIOCGIWENCODEEXT */
(iw_handler) NULL, /* SIOCSIWPMKSA */
}; };
/* Note : don't describe AIROIDIFC and AIROOLDIDIFC in here. /* Note : don't describe AIROIDIFC and AIROOLDIDIFC in here.
......
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