Staging: wlan-ng: initialise mibitem
$ gcc --version gcc (Debian 4.4.2-5) 4.4.2 Copyright (C) 2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ make ... drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_dorequest’: drivers/staging/wlan-ng/p80211wext.c:139: warning: ‘mibitem.len’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:139: warning: ‘mibitem.status’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_giwretry’: drivers/staging/wlan-ng/p80211wext.c:967: warning: ‘mibitem.len’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:967: warning: ‘mibitem.status’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:967: warning: ‘mibitem.data’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_siwretry’: drivers/staging/wlan-ng/p80211wext.c:1057: warning: ‘mibitem.len’ may be used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:1057: warning: ‘mibitem.status’ may be used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_giwtxpow’: drivers/staging/wlan-ng/p80211wext.c:1149: warning: ‘mibitem.len’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:1149: warning: ‘mibitem.status’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:1149: warning: ‘mibitem.data’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_siwtxpow’: drivers/staging/wlan-ng/p80211wext.c:1123: warning: ‘mibitem.len’ may be used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:1123: warning: ‘mibitem.status’ may be used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_giwfrag’: drivers/staging/wlan-ng/p80211wext.c:891: warning: ‘mibitem.len’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:891: warning: ‘mibitem.status’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:891: warning: ‘mibitem.data’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_siwfrag’: drivers/staging/wlan-ng/p80211wext.c:933: warning: ‘mibitem.len’ may be used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:933: warning: ‘mibitem.status’ may be used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_giwrts’: drivers/staging/wlan-ng/p80211wext.c:826: warning: ‘mibitem.len’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:826: warning: ‘mibitem.status’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:826: warning: ‘mibitem.data’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_siwrts’: drivers/staging/wlan-ng/p80211wext.c:866: warning: ‘mibitem.len’ may be used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:866: warning: ‘mibitem.status’ may be used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_giwrate’: drivers/staging/wlan-ng/p80211wext.c:775: warning: ‘mibitem.len’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:775: warning: ‘mibitem.status’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:775: warning: ‘mibitem.data’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_giwfreq’: drivers/staging/wlan-ng/p80211wext.c:273: warning: ‘mibitem.len’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:273: warning: ‘mibitem.status’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:273: warning: ‘mibitem.data’ is used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_siwfreq’: drivers/staging/wlan-ng/p80211wext.c:320: warning: ‘mibitem.len’ may be used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c: In function ‘p80211wext_siwmode’: drivers/staging/wlan-ng/p80211wext.c:401: warning: ‘mibitem.len’ may be used uninitialized in this function drivers/staging/wlan-ng/p80211wext.c:401: warning: ‘mibitem.status’ may be used uninitialized in this function ... Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
e8ffaa3a06
commit
8125e2f668
1 changed files with 15 additions and 0 deletions
|
@ -134,6 +134,7 @@ static int p80211wext_dorequest(wlandevice_t *wlandev, u32 did, u32 data)
|
|||
int result;
|
||||
|
||||
msg.msgcode = DIDmsg_dot11req_mibset;
|
||||
memset(&mibitem, 0, sizeof(mibitem));
|
||||
mibitem.did = did;
|
||||
mibitem.data = data;
|
||||
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
|
||||
|
@ -269,6 +270,7 @@ static int p80211wext_giwfreq(netdevice_t *dev,
|
|||
int err = 0;
|
||||
|
||||
msg.msgcode = DIDmsg_dot11req_mibget;
|
||||
memset(&mibitem, 0, sizeof(mibitem));
|
||||
mibitem.did = DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel;
|
||||
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
|
||||
result = p80211req_dorequest(wlandev, (u8 *) & msg);
|
||||
|
@ -309,6 +311,7 @@ static int p80211wext_siwfreq(netdevice_t *dev,
|
|||
}
|
||||
|
||||
msg.msgcode = DIDmsg_dot11req_mibset;
|
||||
memset(&mibitem, 0, sizeof(mibitem));
|
||||
mibitem.did = DIDmib_dot11phy_dot11PhyDSSSTable_dot11CurrentChannel;
|
||||
mibitem.status = P80211ENUM_msgitem_status_data_ok;
|
||||
|
||||
|
@ -396,6 +399,7 @@ static int p80211wext_siwmode(netdevice_t *dev,
|
|||
|
||||
/* Set Operation mode to the PORT TYPE RID */
|
||||
msg.msgcode = DIDmsg_dot11req_mibset;
|
||||
memset(&mibitem, 0, sizeof(mibitem));
|
||||
mibitem.did = DIDmib_p2_p2Static_p2CnfPortType;
|
||||
mibitem.data = (*mode == IW_MODE_ADHOC) ? 0 : 1;
|
||||
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
|
||||
|
@ -771,6 +775,7 @@ static int p80211wext_giwrate(netdevice_t *dev,
|
|||
int err = 0;
|
||||
|
||||
msg.msgcode = DIDmsg_dot11req_mibget;
|
||||
memset(&mibitem, 0, sizeof(mibitem));
|
||||
mibitem.did = DIDmib_p2_p2MAC_p2CurrentTxRate;
|
||||
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
|
||||
result = p80211req_dorequest(wlandev, (u8 *) & msg);
|
||||
|
@ -822,6 +827,7 @@ static int p80211wext_giwrts(netdevice_t *dev,
|
|||
int err = 0;
|
||||
|
||||
msg.msgcode = DIDmsg_dot11req_mibget;
|
||||
memset(&mibitem, 0, sizeof(mibitem));
|
||||
mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold;
|
||||
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
|
||||
result = p80211req_dorequest(wlandev, (u8 *) & msg);
|
||||
|
@ -857,6 +863,7 @@ static int p80211wext_siwrts(netdevice_t *dev,
|
|||
}
|
||||
|
||||
msg.msgcode = DIDmsg_dot11req_mibget;
|
||||
memset(&mibitem, 0, sizeof(mibitem));
|
||||
mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11RTSThreshold;
|
||||
if (rts->disabled)
|
||||
mibitem.data = 2347;
|
||||
|
@ -886,6 +893,7 @@ static int p80211wext_giwfrag(netdevice_t *dev,
|
|||
int err = 0;
|
||||
|
||||
msg.msgcode = DIDmsg_dot11req_mibget;
|
||||
memset(&mibitem, 0, sizeof(mibitem));
|
||||
mibitem.did =
|
||||
DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold;
|
||||
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
|
||||
|
@ -922,6 +930,7 @@ static int p80211wext_siwfrag(netdevice_t *dev,
|
|||
}
|
||||
|
||||
msg.msgcode = DIDmsg_dot11req_mibset;
|
||||
memset(&mibitem, 0, sizeof(mibitem));
|
||||
mibitem.did =
|
||||
DIDmib_dot11mac_dot11OperationTable_dot11FragmentationThreshold;
|
||||
|
||||
|
@ -962,6 +971,7 @@ static int p80211wext_giwretry(netdevice_t *dev,
|
|||
u16 shortretry, longretry, lifetime;
|
||||
|
||||
msg.msgcode = DIDmsg_dot11req_mibget;
|
||||
memset(&mibitem, 0, sizeof(mibitem));
|
||||
mibitem.did = DIDmib_dot11mac_dot11OperationTable_dot11ShortRetryLimit;
|
||||
|
||||
memcpy(&msg.mibattribute.data, &mibitem, sizeof(mibitem));
|
||||
|
@ -1037,6 +1047,8 @@ static int p80211wext_siwretry(netdevice_t *dev,
|
|||
int result;
|
||||
int err = 0;
|
||||
|
||||
memset(&mibitem, 0, sizeof(mibitem));
|
||||
|
||||
if (!wlan_wext_write) {
|
||||
err = (-EOPNOTSUPP);
|
||||
goto exit;
|
||||
|
@ -1114,6 +1126,7 @@ static int p80211wext_siwtxpow(netdevice_t *dev,
|
|||
}
|
||||
|
||||
msg.msgcode = DIDmsg_dot11req_mibset;
|
||||
memset(&mibitem, 0, sizeof(mibitem));
|
||||
mibitem.did =
|
||||
DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel;
|
||||
if (rrq->fixed == 0)
|
||||
|
@ -1143,6 +1156,8 @@ static int p80211wext_giwtxpow(netdevice_t *dev,
|
|||
int err = 0;
|
||||
|
||||
msg.msgcode = DIDmsg_dot11req_mibget;
|
||||
|
||||
memset(&mibitem, 0, sizeof(mibitem));
|
||||
mibitem.did =
|
||||
DIDmib_dot11phy_dot11PhyTxPowerTable_dot11CurrentTxPowerLevel;
|
||||
|
||||
|
|
Loading…
Reference in a new issue