diff options
Diffstat (limited to 'drivers/net/wireless/libertas/11d.c')
-rw-r--r-- | drivers/net/wireless/libertas/11d.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/drivers/net/wireless/libertas/11d.c b/drivers/net/wireless/libertas/11d.c index 4bc46a60ae2f..9a5408e7d94a 100644 --- a/drivers/net/wireless/libertas/11d.c +++ b/drivers/net/wireless/libertas/11d.c | |||
@@ -207,7 +207,7 @@ static int generate_domain_info_11d(struct parsed_region_chan_11d | |||
207 | lbs_deb_11d("nr_subband=%x\n", domaininfo->nr_subband); | 207 | lbs_deb_11d("nr_subband=%x\n", domaininfo->nr_subband); |
208 | lbs_deb_hex(LBS_DEB_11D, "domaininfo", (char *)domaininfo, | 208 | lbs_deb_hex(LBS_DEB_11D, "domaininfo", (char *)domaininfo, |
209 | COUNTRY_CODE_LEN + 1 + | 209 | COUNTRY_CODE_LEN + 1 + |
210 | sizeof(struct ieeetypes_subbandset) * nr_subband); | 210 | sizeof(struct ieee_subbandset) * nr_subband); |
211 | return 0; | 211 | return 0; |
212 | } | 212 | } |
213 | 213 | ||
@@ -302,11 +302,9 @@ done: | |||
302 | * @param parsed_region_chan pointer to parsed_region_chan_11d | 302 | * @param parsed_region_chan pointer to parsed_region_chan_11d |
303 | * @return 0 | 303 | * @return 0 |
304 | */ | 304 | */ |
305 | static int parse_domain_info_11d(struct ieeetypes_countryinfofullset* | 305 | static int parse_domain_info_11d(struct ieee_ie_country_info_full_set *countryinfo, |
306 | countryinfo, | ||
307 | u8 band, | 306 | u8 band, |
308 | struct parsed_region_chan_11d * | 307 | struct parsed_region_chan_11d *parsed_region_chan) |
309 | parsed_region_chan) | ||
310 | { | 308 | { |
311 | u8 nr_subband, nrchan; | 309 | u8 nr_subband, nrchan; |
312 | u8 lastchan, firstchan; | 310 | u8 lastchan, firstchan; |
@@ -331,7 +329,7 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset* | |||
331 | lbs_deb_hex(LBS_DEB_11D, "countryinfo", (u8 *) countryinfo, 30); | 329 | lbs_deb_hex(LBS_DEB_11D, "countryinfo", (u8 *) countryinfo, 30); |
332 | 330 | ||
333 | if ((*(countryinfo->countrycode)) == 0 | 331 | if ((*(countryinfo->countrycode)) == 0 |
334 | || (countryinfo->len <= COUNTRY_CODE_LEN)) { | 332 | || (countryinfo->header.len <= COUNTRY_CODE_LEN)) { |
335 | /* No region Info or Wrong region info: treat as No 11D info */ | 333 | /* No region Info or Wrong region info: treat as No 11D info */ |
336 | goto done; | 334 | goto done; |
337 | } | 335 | } |
@@ -349,8 +347,8 @@ static int parse_domain_info_11d(struct ieeetypes_countryinfofullset* | |||
349 | memcpy(parsed_region_chan->countrycode, countryinfo->countrycode, | 347 | memcpy(parsed_region_chan->countrycode, countryinfo->countrycode, |
350 | COUNTRY_CODE_LEN); | 348 | COUNTRY_CODE_LEN); |
351 | 349 | ||
352 | nr_subband = (countryinfo->len - COUNTRY_CODE_LEN) / | 350 | nr_subband = (countryinfo->header.len - COUNTRY_CODE_LEN) / |
353 | sizeof(struct ieeetypes_subbandset); | 351 | sizeof(struct ieee_subbandset); |
354 | 352 | ||
355 | for (j = 0, lastchan = 0; j < nr_subband; j++) { | 353 | for (j = 0, lastchan = 0; j < nr_subband; j++) { |
356 | 354 | ||
@@ -502,7 +500,7 @@ int lbs_cmd_802_11d_domain_info(struct lbs_private *priv, | |||
502 | { | 500 | { |
503 | struct cmd_ds_802_11d_domain_info *pdomaininfo = | 501 | struct cmd_ds_802_11d_domain_info *pdomaininfo = |
504 | &cmd->params.domaininfo; | 502 | &cmd->params.domaininfo; |
505 | struct mrvlietypes_domainparamset *domain = &pdomaininfo->domain; | 503 | struct mrvl_ie_domain_param_set *domain = &pdomaininfo->domain; |
506 | u8 nr_subband = priv->domainreg.nr_subband; | 504 | u8 nr_subband = priv->domainreg.nr_subband; |
507 | 505 | ||
508 | lbs_deb_enter(LBS_DEB_11D); | 506 | lbs_deb_enter(LBS_DEB_11D); |
@@ -524,16 +522,16 @@ int lbs_cmd_802_11d_domain_info(struct lbs_private *priv, | |||
524 | sizeof(domain->countrycode)); | 522 | sizeof(domain->countrycode)); |
525 | 523 | ||
526 | domain->header.len = | 524 | domain->header.len = |
527 | cpu_to_le16(nr_subband * sizeof(struct ieeetypes_subbandset) + | 525 | cpu_to_le16(nr_subband * sizeof(struct ieee_subbandset) + |
528 | sizeof(domain->countrycode)); | 526 | sizeof(domain->countrycode)); |
529 | 527 | ||
530 | if (nr_subband) { | 528 | if (nr_subband) { |
531 | memcpy(domain->subband, priv->domainreg.subband, | 529 | memcpy(domain->subband, priv->domainreg.subband, |
532 | nr_subband * sizeof(struct ieeetypes_subbandset)); | 530 | nr_subband * sizeof(struct ieee_subbandset)); |
533 | 531 | ||
534 | cmd->size = cpu_to_le16(sizeof(pdomaininfo->action) + | 532 | cmd->size = cpu_to_le16(sizeof(pdomaininfo->action) + |
535 | le16_to_cpu(domain->header.len) + | 533 | le16_to_cpu(domain->header.len) + |
536 | sizeof(struct mrvlietypesheader) + | 534 | sizeof(struct mrvl_ie_header) + |
537 | S_DS_GEN); | 535 | S_DS_GEN); |
538 | } else { | 536 | } else { |
539 | cmd->size = | 537 | cmd->size = |
@@ -556,7 +554,7 @@ done: | |||
556 | int lbs_ret_802_11d_domain_info(struct cmd_ds_command *resp) | 554 | int lbs_ret_802_11d_domain_info(struct cmd_ds_command *resp) |
557 | { | 555 | { |
558 | struct cmd_ds_802_11d_domain_info *domaininfo = &resp->params.domaininforesp; | 556 | struct cmd_ds_802_11d_domain_info *domaininfo = &resp->params.domaininforesp; |
559 | struct mrvlietypes_domainparamset *domain = &domaininfo->domain; | 557 | struct mrvl_ie_domain_param_set *domain = &domaininfo->domain; |
560 | u16 action = le16_to_cpu(domaininfo->action); | 558 | u16 action = le16_to_cpu(domaininfo->action); |
561 | s16 ret = 0; | 559 | s16 ret = 0; |
562 | u8 nr_subband = 0; | 560 | u8 nr_subband = 0; |
@@ -567,7 +565,7 @@ int lbs_ret_802_11d_domain_info(struct cmd_ds_command *resp) | |||
567 | (int)le16_to_cpu(resp->size)); | 565 | (int)le16_to_cpu(resp->size)); |
568 | 566 | ||
569 | nr_subband = (le16_to_cpu(domain->header.len) - COUNTRY_CODE_LEN) / | 567 | nr_subband = (le16_to_cpu(domain->header.len) - COUNTRY_CODE_LEN) / |
570 | sizeof(struct ieeetypes_subbandset); | 568 | sizeof(struct ieee_subbandset); |
571 | 569 | ||
572 | lbs_deb_11d("domain info resp: nr_subband %d\n", nr_subband); | 570 | lbs_deb_11d("domain info resp: nr_subband %d\n", nr_subband); |
573 | 571 | ||