aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/11d.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-05-25 23:36:54 -0400
committerJohn W. Linville <linville@tuxdriver.com>2007-06-11 14:28:45 -0400
commit981f187b7c4b237011d4175cae0120d5d203c0fd (patch)
treeb4508fc33a9aed0177c18c3a4db5c4e500fdb646 /drivers/net/wireless/libertas/11d.c
parent123e0e044091ca35a4766b38ae15032f2d41bcd6 (diff)
[PATCH] libertas: first pass at fixing up endianness issues
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/11d.c')
-rw-r--r--drivers/net/wireless/libertas/11d.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/wireless/libertas/11d.c b/drivers/net/wireless/libertas/11d.c
index 261bbd55e94f..4cf0ff7b833d 100644
--- a/drivers/net/wireless/libertas/11d.c
+++ b/drivers/net/wireless/libertas/11d.c
@@ -570,7 +570,7 @@ int libertas_cmd_802_11d_domain_info(wlan_private * priv,
570 cpu_to_le16(sizeof(pdomaininfo->action) + S_DS_GEN); 570 cpu_to_le16(sizeof(pdomaininfo->action) + S_DS_GEN);
571 } 571 }
572 572
573 lbs_dbg_hex("11D:802_11D_DOMAIN_INFO:", (u8 *) cmd, (int)(cmd->size)); 573 lbs_dbg_hex("11D:802_11D_DOMAIN_INFO:", (u8 *) cmd, le16_to_cpu(cmd->size));
574 574
575done: 575done:
576 lbs_deb_enter(LBS_DEB_11D); 576 lbs_deb_enter(LBS_DEB_11D);
@@ -611,8 +611,7 @@ int libertas_cmd_enable_11d(wlan_private * priv, struct iwreq *wrq)
611int libertas_ret_802_11d_domain_info(wlan_private * priv, 611int libertas_ret_802_11d_domain_info(wlan_private * priv,
612 struct cmd_ds_command *resp) 612 struct cmd_ds_command *resp)
613{ 613{
614 struct cmd_ds_802_11d_domain_info 614 struct cmd_ds_802_11d_domain_info *domaininfo = &resp->params.domaininforesp;
615 *domaininfo = &resp->params.domaininforesp;
616 struct mrvlietypes_domainparamset *domain = &domaininfo->domain; 615 struct mrvlietypes_domainparamset *domain = &domaininfo->domain;
617 u16 action = le16_to_cpu(domaininfo->action); 616 u16 action = le16_to_cpu(domaininfo->action);
618 s16 ret = 0; 617 s16 ret = 0;
@@ -623,8 +622,8 @@ int libertas_ret_802_11d_domain_info(wlan_private * priv,
623 lbs_dbg_hex("11D DOMAIN Info Rsp Data:", (u8 *) resp, 622 lbs_dbg_hex("11D DOMAIN Info Rsp Data:", (u8 *) resp,
624 (int)le16_to_cpu(resp->size)); 623 (int)le16_to_cpu(resp->size));
625 624
626 nr_subband = (domain->header.len - 3) / sizeof(struct ieeetypes_subbandset); 625 nr_subband = (le16_to_cpu(domain->header.len) - COUNTRY_CODE_LEN) /
627 /* countrycode 3 bytes */ 626 sizeof(struct ieeetypes_subbandset);
628 627
629 lbs_deb_11d("11D Domain Info Resp: nr_subband=%d\n", nr_subband); 628 lbs_deb_11d("11D Domain Info Resp: nr_subband=%d\n", nr_subband);
630 629