o wl3501: use iw_mgmt_info_element for phy_pset (now ds_parameter_set)

Clarifying stuff is good: with this I have fixed a bug in join, where
the element id and size were not being set... longstanding one, since
original driver times...
parent 626d7e98
...@@ -276,7 +276,7 @@ struct wl3501_start_req { ...@@ -276,7 +276,7 @@ struct wl3501_start_req {
u8 bss_basic_rate_set[10]; u8 bss_basic_rate_set[10];
u8 operational_rate_set[10]; u8 operational_rate_set[10];
u8 cf_pset[8]; u8 cf_pset[8];
u8 phy_pset[3]; struct iw_mgmt_info_element ds_parameter_set;
u8 ibss_pset[4]; u8 ibss_pset[4];
}; };
...@@ -353,7 +353,7 @@ struct wl3501_join_req { ...@@ -353,7 +353,7 @@ struct wl3501_join_req {
u8 bss_type; u8 bss_type;
u8 bssid[ETH_ALEN]; u8 bssid[ETH_ALEN];
struct iw_mgmt_info_element ssid; struct iw_mgmt_info_element ssid;
u8 phy_pset[3]; struct iw_mgmt_info_element ds_parameter_set;
u8 cf_pset[8]; u8 cf_pset[8];
u8 ibss_pset[4]; u8 ibss_pset[4];
u8 bss_basic_rate_set[10]; u8 bss_basic_rate_set[10];
...@@ -407,7 +407,7 @@ struct wl3501_scan_confirm { ...@@ -407,7 +407,7 @@ struct wl3501_scan_confirm {
u8 bss_type; u8 bss_type;
u8 bssid[ETH_ALEN]; u8 bssid[ETH_ALEN];
struct iw_mgmt_info_element ssid; struct iw_mgmt_info_element ssid;
u8 phy_pset[3]; struct iw_mgmt_info_element ds_parameter_set;
u8 cf_pset[8]; u8 cf_pset[8];
u8 ibss_pset[4]; u8 ibss_pset[4];
u8 bss_basic_rate_set[10]; u8 bss_basic_rate_set[10];
......
...@@ -638,10 +638,12 @@ static int wl3501_mgmt_scan(struct wl3501_card *this, u16 chan_time) ...@@ -638,10 +638,12 @@ static int wl3501_mgmt_scan(struct wl3501_card *this, u16 chan_time)
static int wl3501_mgmt_join(struct wl3501_card *this, u16 stas) static int wl3501_mgmt_join(struct wl3501_card *this, u16 stas)
{ {
struct wl3501_join_req sig = { struct wl3501_join_req sig = {
.sig_id = WL3501_SIG_JOIN_REQ, .sig_id = WL3501_SIG_JOIN_REQ,
.timeout = 10, .timeout = 10,
.phy_pset = { .ds_parameter_set = {
[2] = this->chan, .id = IW_MGMT_INFO_ELEMENT_DS_PARAMETER_SET,
.len = 1,
.data[0] = this->chan,
}, },
}; };
...@@ -655,8 +657,10 @@ static int wl3501_mgmt_start(struct wl3501_card *this) ...@@ -655,8 +657,10 @@ static int wl3501_mgmt_start(struct wl3501_card *this)
.sig_id = WL3501_SIG_START_REQ, .sig_id = WL3501_SIG_START_REQ,
.beacon_period = 400, .beacon_period = 400,
.dtim_period = 1, .dtim_period = 1,
.phy_pset = { .ds_parameter_set = {
[0] = 3, [1] = 1, [2] = this->chan, .id = IW_MGMT_INFO_ELEMENT_DS_PARAMETER_SET,
.len = 1,
.data = { [0] = this->chan, },
}, },
.bss_basic_rate_set = { .bss_basic_rate_set = {
[0] = 0x01, [1] = 0x02, [2] = 0x82, [3] = 0x84, [0] = 0x01, [1] = 0x02, [2] = 0x82, [3] = 0x84,
...@@ -694,7 +698,7 @@ static void wl3501_mgmt_scan_confirm(struct wl3501_card *this, u16 addr) ...@@ -694,7 +698,7 @@ static void wl3501_mgmt_scan_confirm(struct wl3501_card *this, u16 addr)
if (!this->essid.len) if (!this->essid.len)
matchflag = 1; matchflag = 1;
else if (this->essid.len == 3 && else if (this->essid.len == 3 &&
!strncmp(this->essid.data, "ANY", 3)) !memcmp(this->essid.data, "ANY", 3))
matchflag = 1; matchflag = 1;
else if (this->essid.len != sig.ssid.len) else if (this->essid.len != sig.ssid.len)
matchflag = 0; matchflag = 0;
...@@ -911,7 +915,8 @@ static void wl3501_mgmt_join_confirm(struct net_device *dev, u16 addr) ...@@ -911,7 +915,8 @@ static void wl3501_mgmt_join_confirm(struct net_device *dev, u16 addr)
const int i = this->join_sta_bss; const int i = this->join_sta_bss;
memcpy(this->bssid, memcpy(this->bssid,
this->bss_set[i].bssid, ETH_ALEN); this->bss_set[i].bssid, ETH_ALEN);
this->chan = this->bss_set[i].phy_pset[2]; this->chan =
this->bss_set[i].ds_parameter_set.data[0];
iw_copy_mgmt_info_element(&this->keep_essid, iw_copy_mgmt_info_element(&this->keep_essid,
&this->bss_set[i].ssid); &this->bss_set[i].ssid);
wl3501_mgmt_auth(this); wl3501_mgmt_auth(this);
...@@ -920,7 +925,7 @@ static void wl3501_mgmt_join_confirm(struct net_device *dev, u16 addr) ...@@ -920,7 +925,7 @@ static void wl3501_mgmt_join_confirm(struct net_device *dev, u16 addr)
const int i = this->join_sta_bss; const int i = this->join_sta_bss;
memcpy(&this->bssid, &this->bss_set[i].bssid, ETH_ALEN); memcpy(&this->bssid, &this->bss_set[i].bssid, ETH_ALEN);
this->chan = this->bss_set[i].phy_pset[2]; this->chan = this->bss_set[i].ds_parameter_set.data[0];
iw_copy_mgmt_info_element(&this->keep_essid, iw_copy_mgmt_info_element(&this->keep_essid,
&this->bss_set[i].ssid); &this->bss_set[i].ssid);
wl3501_online(dev); wl3501_online(dev);
......
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