add the new auto-unknown mode.
This commit is contained in:
parent
771e817a59
commit
4d1f3e53bc
3
CHANGES
3
CHANGES
|
@ -41,6 +41,9 @@
|
|||
* Intersil Corporation as part of PRISM(R) chipset product development.
|
||||
*
|
||||
* --------------------------------------------------------------------
|
||||
- Support the new auto-unknown mode present in firmware >1.3.3
|
||||
When issuing an autojoin, we try to join a BSS, then an IBSS, and if
|
||||
all fails, we create a new IBSS with the given parameters.
|
||||
- Updates to hfa384x.h to reflect latest documentation
|
||||
- Build system mini-enema. Automagically detect kernel version,
|
||||
pcmcia status, and modversions. Pick up the kernel compile flags.
|
||||
|
|
|
@ -979,11 +979,10 @@ int prism2mgmt_start(wlandevice_t *wlandev, void *msgp)
|
|||
if (!priv->ap) {
|
||||
/*** ADHOC IBSS ***/
|
||||
/* see if current f/w is less than 8c3 */
|
||||
if ( (priv->ident_sta_fw.major == 0 &&
|
||||
priv->ident_sta_fw.minor < 8) || // < 0.8
|
||||
(priv->ident_sta_fw.major == 0 &&
|
||||
priv->ident_sta_fw.minor == 8 &&
|
||||
priv->ident_sta_fw.variant < 3) ) { // < 0.83
|
||||
if (KERNEL_VERSION(priv->ident_sta_fw.major,
|
||||
priv->ident_sta_fw.minor,
|
||||
priv->ident_sta_fw.variant) <
|
||||
KERNEL_VERSION(0,8,3)) {
|
||||
/* Ad-Hoc not quite supported on Prism2 */
|
||||
msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
|
||||
msg->resultcode.data = P80211ENUM_resultcode_not_supported;
|
||||
|
@ -2479,9 +2478,25 @@ int prism2mgmt_autojoin(wlandevice_t *wlandev, void *msgp)
|
|||
result = hfa384x_drvr_setconfig(
|
||||
hw, HFA384x_RID_CNFDESIREDSSID,
|
||||
bytebuf, HFA384x_RID_CNFDESIREDSSID_LEN);
|
||||
|
||||
|
||||
/* we can use the new-fangled auto-unknown mode if the firmware
|
||||
is 1.3.3 or newer */
|
||||
if (KERNEL_VERSION(priv->ident_sta_fw.major,
|
||||
priv->ident_sta_fw.minor,
|
||||
priv->ident_sta_fw.variant) >=
|
||||
KERNEL_VERSION(1,3,3)) {
|
||||
|
||||
/* Set up the IBSS options */
|
||||
reg = HFA384x_CREATEIBSS_JOINESS_JOINCREATEIBSS;
|
||||
hfa384x_drvr_setconfig16(hw, HFA384x_RID_CREATEIBSS, ®);
|
||||
|
||||
/* Set the PortType */
|
||||
port_type = HFA384x_PORTTYPE_IBSS;
|
||||
} else {
|
||||
port_type = HFA384x_PORTTYPE_BSS;
|
||||
}
|
||||
|
||||
/* Set the PortType */
|
||||
port_type = 1; /* ess port */
|
||||
hfa384x_drvr_setconfig16(hw, HFA384x_RID_CNFPORTTYPE, &port_type);
|
||||
|
||||
#if (WLAN_HOSTIF != WLAN_USB)
|
||||
|
|
|
@ -1045,6 +1045,11 @@ typedef struct hfa384x_CreateIBSS
|
|||
UINT16 CreateIBSS __WLAN_ATTRIB_PACK__;
|
||||
} __WLAN_ATTRIB_PACK__ hfa384x_CreateIBSS_t;
|
||||
|
||||
#define HFA384x_CREATEIBSS_JOINCREATEIBSS 0
|
||||
#define HFA384x_CREATEIBSS_JOINESS_JOINCREATEIBSS 1
|
||||
#define HFA384x_CREATEIBSS_JOINIBSS 2
|
||||
#define HFA384x_CREATEIBSS_JOINESS_JOINIBSS 3
|
||||
|
||||
/*-- Configuration Record: FragmentationThreshold --*/
|
||||
typedef struct hfa384x_FragmentationThreshold
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue