aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/scan.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2009-05-22 20:01:21 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-06-03 14:05:09 -0400
commit5fd164e96cb9dc111f75468378de38c67b0fd161 (patch)
treeeeb4ec9dd3b2f1b034c1fc1c80b469de0c9275f7 /drivers/net/wireless/libertas/scan.c
parentd77b034f62d4b8c6c39450d99de224b9b2c5debb (diff)
libertas: simplify and clean up association/start/join setup
Some of the parameters for association/join/start commands aren't used (like the FH and CF IEs for IBSS, and the FH IE for BSS), so get rid of their unions to reduce indirection. Also clean up structure names for kernel style. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/scan.c')
-rw-r--r--drivers/net/wireless/libertas/scan.c32
1 files changed, 14 insertions, 18 deletions
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c
index 8124db36aaf..38b056066e1 100644
--- a/drivers/net/wireless/libertas/scan.c
+++ b/drivers/net/wireless/libertas/scan.c
@@ -513,10 +513,10 @@ void lbs_scan_worker(struct work_struct *work)
513static int lbs_process_bss(struct bss_descriptor *bss, 513static int lbs_process_bss(struct bss_descriptor *bss,
514 uint8_t **pbeaconinfo, int *bytesleft) 514 uint8_t **pbeaconinfo, int *bytesleft)
515{ 515{
516 struct ieeetypes_fhparamset *pFH; 516 struct ieee_ie_fh_param_set *fh;
517 struct ieeetypes_dsparamset *pDS; 517 struct ieee_ie_ds_param_set *ds;
518 struct ieeetypes_cfparamset *pCF; 518 struct ieee_ie_cf_param_set *cf;
519 struct ieeetypes_ibssparamset *pibss; 519 struct ieee_ie_ibss_param_set *ibss;
520 DECLARE_SSID_BUF(ssid); 520 DECLARE_SSID_BUF(ssid);
521 struct ieeetypes_countryinfoset *pcountryinfo; 521 struct ieeetypes_countryinfoset *pcountryinfo;
522 uint8_t *pos, *end, *p; 522 uint8_t *pos, *end, *p;
@@ -616,32 +616,28 @@ static int lbs_process_bss(struct bss_descriptor *bss,
616 break; 616 break;
617 617
618 case WLAN_EID_FH_PARAMS: 618 case WLAN_EID_FH_PARAMS:
619 pFH = (struct ieeetypes_fhparamset *) pos; 619 fh = (struct ieee_ie_fh_param_set *) pos;
620 memmove(&bss->phyparamset.fhparamset, pFH, 620 memcpy(&bss->phy.fh, fh, sizeof(*fh));
621 sizeof(struct ieeetypes_fhparamset));
622 lbs_deb_scan("got FH IE\n"); 621 lbs_deb_scan("got FH IE\n");
623 break; 622 break;
624 623
625 case WLAN_EID_DS_PARAMS: 624 case WLAN_EID_DS_PARAMS:
626 pDS = (struct ieeetypes_dsparamset *) pos; 625 ds = (struct ieee_ie_ds_param_set *) pos;
627 bss->channel = pDS->currentchan; 626 bss->channel = ds->channel;
628 memcpy(&bss->phyparamset.dsparamset, pDS, 627 memcpy(&bss->phy.ds, ds, sizeof(*ds));
629 sizeof(struct ieeetypes_dsparamset));
630 lbs_deb_scan("got DS IE, channel %d\n", bss->channel); 628 lbs_deb_scan("got DS IE, channel %d\n", bss->channel);
631 break; 629 break;
632 630
633 case WLAN_EID_CF_PARAMS: 631 case WLAN_EID_CF_PARAMS:
634 pCF = (struct ieeetypes_cfparamset *) pos; 632 cf = (struct ieee_ie_cf_param_set *) pos;
635 memcpy(&bss->ssparamset.cfparamset, pCF, 633 memcpy(&bss->ss.cf, cf, sizeof(*cf));
636 sizeof(struct ieeetypes_cfparamset));
637 lbs_deb_scan("got CF IE\n"); 634 lbs_deb_scan("got CF IE\n");
638 break; 635 break;
639 636
640 case WLAN_EID_IBSS_PARAMS: 637 case WLAN_EID_IBSS_PARAMS:
641 pibss = (struct ieeetypes_ibssparamset *) pos; 638 ibss = (struct ieee_ie_ibss_param_set *) pos;
642 bss->atimwindow = le16_to_cpu(pibss->atimwindow); 639 bss->atimwindow = ibss->atimwindow;
643 memmove(&bss->ssparamset.ibssparamset, pibss, 640 memcpy(&bss->ss.ibss, ibss, sizeof(*ibss));
644 sizeof(struct ieeetypes_ibssparamset));
645 lbs_deb_scan("got IBSS IE\n"); 641 lbs_deb_scan("got IBSS IE\n");
646 break; 642 break;
647 643