Fixed some bugs in mibset_mibget and added support for AuthenticationAlgorithms
This commit is contained in:
parent
135b26d373
commit
261f794b5e
|
@ -416,7 +416,7 @@ Information RID Lengths: MAC Information
|
|||
#define HFA384x_RID_MAXTXLIFETIME_LEN (0)
|
||||
#define HFA384x_RID_MAXRXLIFETIME_LEN (0)
|
||||
#define HFA384x_RID_CFPOLLABLE_LEN (0)
|
||||
#define HFA384x_RID_AUTHALGORITHMS_LEN (0)
|
||||
#define HFA384x_RID_AUTHALGORITHMS_LEN (4)
|
||||
#define HFA384x_RID_PRIVACYOPTIMP_LEN (0)
|
||||
#define HFA384x_RID_CURRENTTXRATE1_LEN (0)
|
||||
#define HFA384x_RID_CURRENTTXRATE2_LEN (0)
|
||||
|
@ -1177,6 +1177,14 @@ typedef struct hfa384x_AuthenticationAlgorithms
|
|||
UINT16 TypeEnabled __WLAN_ATTRIB_PACK__;
|
||||
} hfa384x_AuthenticationAlgorithms_t;
|
||||
|
||||
/*-- Information Record: AuthenticationAlgorithms
|
||||
(data only --*/
|
||||
typedef struct hfa384x_AuthenticationAlgorithms_data
|
||||
{
|
||||
UINT16 AuthenticationType __WLAN_ATTRIB_PACK__;
|
||||
UINT16 TypeEnabled __WLAN_ATTRIB_PACK__;
|
||||
} hfa384x_AuthenticationAlgorithms_data_t;
|
||||
|
||||
/*-- Information Record: PrivacyOptionImplemented --*/
|
||||
typedef struct hfa384x_PrivacyOptionImplemented
|
||||
{
|
||||
|
|
|
@ -302,9 +302,9 @@ int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp)
|
|||
wordbuf);
|
||||
prism2mgmt_prism2int2p80211int(wordbuf, uint32);
|
||||
} else {
|
||||
/* this is read only established by the MAC */
|
||||
msg->resultcode.data =
|
||||
P80211ENUM_resultcode_cant_set_readonly_mib;
|
||||
prism2mgmt_p80211int2prism2int(wordbuf, uint32);
|
||||
result = hfa384x_drvr_setconfig16( hw, HFA384x_RID_CURRENTBCNINT,
|
||||
wordbuf);
|
||||
}
|
||||
break;
|
||||
case DIDmib_dot11smt_dot11StationConfigTable_dot11DTIMPeriod:
|
||||
|
@ -333,7 +333,9 @@ int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp)
|
|||
if ( isget ) {
|
||||
*uint32 = priv->DisassociateReason;
|
||||
} else {
|
||||
priv->DisassociateReason = *uint32;
|
||||
/* this is read only established by the MAC */
|
||||
msg->resultcode.data =
|
||||
P80211ENUM_resultcode_cant_set_readonly_mib;
|
||||
}
|
||||
break;
|
||||
case DIDmib_dot11smt_dot11StationConfigTable_dot11DisassociateStation:
|
||||
|
@ -352,7 +354,9 @@ int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp)
|
|||
if ( isget ) {
|
||||
*uint32 = priv->DeauthenticateReason;
|
||||
} else {
|
||||
priv->DeauthenticateReason = *uint32;
|
||||
/* this is read only established by the MAC */
|
||||
msg->resultcode.data =
|
||||
P80211ENUM_resultcode_cant_set_readonly_mib;
|
||||
}
|
||||
break;
|
||||
case DIDmib_dot11smt_dot11StationConfigTable_dot11DeauthenticateStation:
|
||||
|
@ -371,7 +375,9 @@ int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp)
|
|||
if ( isget ) {
|
||||
*uint32 = priv->AuthenticateFailStatus;
|
||||
} else {
|
||||
priv->AuthenticateFailStatus = *uint32;
|
||||
/* this is read only established by the MAC */
|
||||
msg->resultcode.data =
|
||||
P80211ENUM_resultcode_cant_set_readonly_mib;
|
||||
}
|
||||
break;
|
||||
case DIDmib_dot11smt_dot11StationConfigTable_dot11AuthenticateFailStation:
|
||||
|
@ -387,63 +393,52 @@ int prism2mgmt_mibset_mibget(wlandevice_t *wlandev, void *msgp)
|
|||
}
|
||||
break;
|
||||
case DIDmib_dot11smt_dot11AuthenticationAlgorithmsTable_dot11AuthenticationAlgorithm1:
|
||||
/* TODO: I'm confused as to what to do with this data item */
|
||||
/* for now, set resultcode.data to "not supported" */
|
||||
msg->resultcode.data = P80211ENUM_resultcode_not_supported;
|
||||
result = hfa384x_drvr_getconfig( hw,
|
||||
HFA384x_RID_AUTHALGORITHMS,
|
||||
bytebuf,
|
||||
HFA384x_RID_AUTHALGORITHMS_LEN);
|
||||
if ( isget ) {
|
||||
*uint32 =
|
||||
hfa384x2host_32(((hfa384x_AuthenticationAlgorithms_data_t *)bytebuf)->AuthenticationType);
|
||||
} else {
|
||||
((hfa384x_AuthenticationAlgorithms_data_t *)bytebuf)->
|
||||
AuthenticationType = host2hfa384x_16((UINT16)(*uint32));
|
||||
result = hfa384x_drvr_setconfig( hw,
|
||||
HFA384x_RID_AUTHALGORITHMS,
|
||||
bytebuf,
|
||||
HFA384x_RID_AUTHALGORITHMS_LEN);
|
||||
}
|
||||
break;
|
||||
case DIDmib_dot11smt_dot11AuthenticationAlgorithmsTable_dot11AuthenticationAlgorithmsEnable1:
|
||||
/* TODO: I'm confused as to what to do with this data item */
|
||||
/* for now, set resultcode.data to "not supported" */
|
||||
msg->resultcode.data = P80211ENUM_resultcode_not_supported;
|
||||
result = hfa384x_drvr_getconfig( hw,
|
||||
HFA384x_RID_AUTHALGORITHMS,
|
||||
bytebuf,
|
||||
HFA384x_RID_AUTHALGORITHMS_LEN);
|
||||
if ( isget ) {
|
||||
*uint32 =
|
||||
hfa384x2host_32(((hfa384x_AuthenticationAlgorithms_data_t *)bytebuf)->TypeEnabled);
|
||||
} else {
|
||||
((hfa384x_AuthenticationAlgorithms_data_t *)bytebuf)->
|
||||
TypeEnabled = host2hfa384x_16((UINT16)(*uint32));
|
||||
result = hfa384x_drvr_setconfig( hw,
|
||||
HFA384x_RID_AUTHALGORITHMS,
|
||||
bytebuf,
|
||||
HFA384x_RID_AUTHALGORITHMS_LEN);
|
||||
}
|
||||
break;
|
||||
|
||||
/* The Prism2 hardware only supports one authentication
|
||||
/* algorithm and its associated enable */
|
||||
case DIDmib_dot11smt_dot11AuthenticationAlgorithmsTable_dot11AuthenticationAlgorithm2:
|
||||
/* TODO: I'm confused as to what to do with this data item */
|
||||
/* for now, set resultcode.data to "not supported" */
|
||||
msg->resultcode.data = P80211ENUM_resultcode_not_supported;
|
||||
break;
|
||||
case DIDmib_dot11smt_dot11AuthenticationAlgorithmsTable_dot11AuthenticationAlgorithmsEnable2:
|
||||
/* TODO: I'm confused as to what to do with this data item */
|
||||
/* for now, set resultcode.data to "not supported" */
|
||||
msg->resultcode.data = P80211ENUM_resultcode_not_supported;
|
||||
break;
|
||||
case DIDmib_dot11smt_dot11AuthenticationAlgorithmsTable_dot11AuthenticationAlgorithm3:
|
||||
/* TODO: I'm confused as to what to do with this data item */
|
||||
/* for now, set resultcode.data to "not supported" */
|
||||
msg->resultcode.data = P80211ENUM_resultcode_not_supported;
|
||||
break;
|
||||
case DIDmib_dot11smt_dot11AuthenticationAlgorithmsTable_dot11AuthenticationAlgorithmsEnable3:
|
||||
/* TODO: I'm confused as to what to do with this data item */
|
||||
/* for now, set resultcode.data to "not supported" */
|
||||
msg->resultcode.data = P80211ENUM_resultcode_not_supported;
|
||||
break;
|
||||
case DIDmib_dot11smt_dot11AuthenticationAlgorithmsTable_dot11AuthenticationAlgorithm4:
|
||||
/* TODO: I'm confused as to what to do with this data item */
|
||||
/* for now, set resultcode.data to "not supported" */
|
||||
msg->resultcode.data = P80211ENUM_resultcode_not_supported;
|
||||
break;
|
||||
case DIDmib_dot11smt_dot11AuthenticationAlgorithmsTable_dot11AuthenticationAlgorithmsEnable4:
|
||||
/* TODO: I'm confused as to what to do with this data item */
|
||||
/* for now, set resultcode.data to "not supported" */
|
||||
msg->resultcode.data = P80211ENUM_resultcode_not_supported;
|
||||
break;
|
||||
case DIDmib_dot11smt_dot11AuthenticationAlgorithmsTable_dot11AuthenticationAlgorithm5:
|
||||
/* TODO: I'm confused as to what to do with this data item */
|
||||
/* for now, set resultcode.data to "not supported" */
|
||||
msg->resultcode.data = P80211ENUM_resultcode_not_supported;
|
||||
break;
|
||||
case DIDmib_dot11smt_dot11AuthenticationAlgorithmsTable_dot11AuthenticationAlgorithmsEnable5:
|
||||
/* TODO: I'm confused as to what to do with this data item */
|
||||
/* for now, set resultcode.data to "not supported" */
|
||||
msg->resultcode.data = P80211ENUM_resultcode_not_supported;
|
||||
break;
|
||||
case DIDmib_dot11smt_dot11AuthenticationAlgorithmsTable_dot11AuthenticationAlgorithm6:
|
||||
/* TODO: I'm confused as to what to do with this data item */
|
||||
/* for now, set resultcode.data to "not supported" */
|
||||
msg->resultcode.data = P80211ENUM_resultcode_not_supported;
|
||||
break;
|
||||
case DIDmib_dot11smt_dot11AuthenticationAlgorithmsTable_dot11AuthenticationAlgorithmsEnable6:
|
||||
/* TODO: I'm confused as to what to do with this data item */
|
||||
/* for now, set resultcode.data to "not supported" */
|
||||
msg->resultcode.data = P80211ENUM_resultcode_not_supported;
|
||||
break;
|
||||
case DIDmib_dot11mac_dot11OperationTable_dot11MACAddress:
|
||||
|
|
Loading…
Reference in a new issue