Commit 6a7aadabb552f0f51078a565774b6fb7bc380f8e

Original mac80211-20070621 tarball

Commit diff

acx-mac80211.mod.c

 
0#include <linux/module.h>
1#include <linux/vermagic.h>
2#include <linux/compiler.h>
3
4MODULE_INFO(vermagic, VERMAGIC_STRING);
5
6struct module __this_module
7__attribute__((section(".gnu.linkonce.this_module"))) = {
8 .name = KBUILD_MODNAME,
9 .init = init_module,
10#ifdef CONFIG_MODULE_UNLOAD
11 .exit = cleanup_module,
12#endif
13};
14
15static const char __module_depends[]
16__attribute_used__
17__attribute__((section(".modinfo"))) =
18"depends=";
19
20MODULE_ALIAS("pci:v0000104Cd00008400sv*sd*bc*sc*i*");
21MODULE_ALIAS("pci:v0000104Cd00008401sv*sd*bc*sc*i*");
22MODULE_ALIAS("pci:v0000104Cd00009066sv*sd*bc*sc*i*");
toggle raw diff

acx.h

 
11#include <net/mac80211.h>
22#include <net/ieee80211.h>
33#include "acx_config.h"
4#include "wlan_hdr.h"
5#include "wlan_mgmt.h"
64#include "acx_mac80211.h"
75#include "acx_struct.h"
86#include "acx_func.h"
toggle raw diff

acx_func.h

 
334334acx_queue_stopped(struct ieee80211_hw *ieee)
335335{
336336 return netif_queue_stopped(ieee);
337}*/
337}
338338
339339
340340static inline void
369369 log(L_BUFT, "tx: carrier on %s\n", msg);
370370}
371371
372*/
372373
373374
374375/***********************************************************************
430430/***********************************************************************
431431** Ioctls
432432*/
433int
433/*int
434434acx111pci_ioctl_info(
435435 struct net_device *ndev,
436436 struct iw_request_info *info,
442442 struct iw_request_info *info,
443443 struct iw_param *vwrq,
444444 char *extra);
445
445*/
446446
447447/***********************************************************************
448448** /proc
452452int acx_proc_unregister_entries(struct ieee80211_hw *ieee);
453453#else
454454static inline int
455acx_proc_register_entries(const struct net_device *ndev) { return OK; }
455acx_proc_register_entries(const struct ieee80211_hw *ieee) { return OK; }
456456static inline int
457acx_proc_unregister_entries(const struct net_device *ndev) { return OK; }
457acx_proc_unregister_entries(const struct ieee80211_hw *ieee) { return OK; }
458458#endif
459459
460460
624624//static void acx_netdev_init(struct net_device *ndev);
625625int acxpci_s_reset_dev(acx_device_t *adev);
626626void acx_e_after_interrupt_task(struct work_struct* work);
627void acx_i_set_multicast_list(struct ieee80211_hw *hw,
628 unsigned short netflags, int mc_count);
629
627630/*** End DeviceScape Functions **/
628631
629632void great_inquisitor(acx_device_t *adev);
toggle raw diff

acx_mac80211.h

 
4949 __FUNCTION__, __FILE__, __LINE__); \
5050 } while (0)
5151
52#define ACX_MACFMT "%02x:%02x:%02x:%02x:%02x:%02x"
53#define ACX_MACARG(x) ((u8*)(x))[0], ((u8*)(x))[1], \
54 ((u8*)(x))[2], ((u8*)(x))[3], \
55 ((u8*)(x))[4], ((u8*)(x))[5]
5652
5753
5854#define ACX_MODE_NOTADHOC 0xFFFF
toggle raw diff

acx_struct.h

 
536536** phy_hdr_t phy */
537537 struct ieee80211_hdr hdr_a3;
538538 /* maximally sized data part of wlan packet */
539 u8 data_a3[WLAN_A4FR_MAXLEN_WEP_FCS - WLAN_HDR_A3_LEN];
539 u8 data_a3[30 + 2312 + 4 - 24]; /*WLAN_A4FR_MAXLEN_WEP_FCS - WLAN_HDR_A3_LEN]*/
540540 /* can add hdr/data_a4 if needed */
541541} ACX_PACKED rxbuffer_t;
542542
728728 u8 stepup_count;
729729 char essid[IW_ESSID_MAX_SIZE + 1]; /* ESSID and trailing '\0' */
730730/* FIXME: this one is too damn big */
731 char challenge_text[WLAN_CHALLENGE_LEN];
731 char challenge_text[128]; /*WLAN_CHALLENGE_LEN*/
732732};
733733
734734
10261026 u8 ctrl2;
10271027 u16 data_len;
10281028 /* wlan packet content is placed here: */
1029 u8 data[WLAN_A4FR_MAXLEN_WEP_FCS];
1029 u8 data[30 + 2312 + 4]; /*WLAN_A4FR_MAXLEN_WEP_FCS]*/
10301030} ACX_PACKED usb_txbuffer_t;
10311031
10321032/* USB returns either rx packets (see rxbuffer) or
11911191 struct net_device_stats stats; /* net device statistics */
11921192
11931193#ifdef WIRELESS_EXT
1194 struct iw_statistics wstats; /* wireless statistics */
1194// struct iw_statistics wstats; /* wireless statistics */
11951195#endif
11961196 struct acx_stats acx_stats;
11971197 struct ieee80211_hw *ieee;
11981198 struct ieee80211_hw_mode *modes;
1199 struct ieee80211_rx_status rx_status;
11991200 /*** Power managment ***/
12001201 struct pm_dev *pm; /* PM crap */
12011202
12601260 u16 scan_duration;
12611261 u16 scan_probe_delay;
12621262#if WIRELESS_EXT > 15
1263 struct iw_spy_data spy_data; /* FIXME: needs to be implemented! */
1263// struct iw_spy_data spy_data; /* FIXME: needs to be implemented! */
12641264#endif
12651265
12661266 /*** Virtual interface struct ***/
12941294 u16 scan_retries;
12951295 unsigned long scan_start; /* YES, jiffies is defined as "unsigned long" */
12961296
1297
1298 /* MAC80211 Template Reference */
1299 struct sk_buff *beacon_cache;
12971300 /* stations known to us (if we're an ap) */
12981301// client_t sta_list[32]; /* tab is larger than list, so that */
12991302// client_t *sta_hash_tab[64]; /* hash collisions are not likely */
toggle raw diff

common.c

 
2424#include <linux/pm.h>
2525#include <linux/vmalloc.h>
2626#include <linux/firmware.h>
27#include <net/iw_handler.h>
27//#include <net/iw_handler.h>
2828#include <linux/ethtool.h>
29#include <linux/utsrelease.h>
29//#include <linux/utsrelease.h>
3030
3131#include "acx.h"
3232
9999static unsigned max_lock_time;
100100static unsigned max_sem_time;
101101
102/* Obvious or linux kernel specific derived code follows: */
103
102104void acx_lock_unhold()
103105{
104106 max_lock_time = 0;
242242}
243243
244244
245/***********************************************************************
246** acx_get_status_name
247*/
248static const char *acx_get_status_name(u16 status)
249{
250 static const char *const str[] = {
251 "STOPPED", "SCANNING", "WAIT_AUTH",
252 "AUTHENTICATED", "ASSOCIATED", "INVALID??"
253 };
254 if (status > ARRAY_SIZE(str) - 1)
255 status = ARRAY_SIZE(str) - 1;
256
257 return str[status];
258}
259
260
261/***********************************************************************
262** acx_get_packet_type_string
263*/
264#if ACX_DEBUG
265const char *acx_get_packet_type_string(u16 fc)
266{
267 static const char *const mgmt_arr[] = {
268 "MGMT/AssocReq", "MGMT/AssocResp", "MGMT/ReassocReq",
269 "MGMT/ReassocResp", "MGMT/ProbeReq", "MGMT/ProbeResp",
270 "MGMT/UNKNOWN", "MGMT/UNKNOWN", "MGMT/Beacon", "MGMT/ATIM",
271 "MGMT/Disassoc", "MGMT/Authen", "MGMT/Deauthen"
272 };
273 static const char *const ctl_arr[] = {
274 "CTL/PSPoll", "CTL/RTS", "CTL/CTS", "CTL/Ack", "CTL/CFEnd",
275 "CTL/CFEndCFAck"
276 };
277 static const char *const data_arr[] = {
278 "DATA/DataOnly", "DATA/Data CFAck", "DATA/Data CFPoll",
279 "DATA/Data CFAck/CFPoll", "DATA/Null", "DATA/CFAck",
280 "DATA/CFPoll", "DATA/CFAck/CFPoll"
281 };
282 const char *str;
283 u8 fstype = (WF_FC_FSTYPE & fc) >> 4;
284 u8 ctl;
285
286 switch (WF_FC_FTYPE & fc) {
287 case WF_FTYPE_MGMT:
288 if (fstype < ARRAY_SIZE(mgmt_arr))
289 str = mgmt_arr[fstype];
290 else
291 str = "MGMT/UNKNOWN";
292 break;
293 case WF_FTYPE_CTL:
294 ctl = fstype - 0x0a;
295 if (ctl < ARRAY_SIZE(ctl_arr))
296 str = ctl_arr[ctl];
297 else
298 str = "CTL/UNKNOWN";
299 break;
300 case WF_FTYPE_DATA:
301 if (fstype < ARRAY_SIZE(data_arr))
302 str = data_arr[fstype];
303 else
304 str = "DATA/UNKNOWN";
305 break;
306 default:
307 str = "UNKNOWN";
308 break;
309 }
310 return str;
311}
312#endif
313
314
315/***********************************************************************
316** acx_wlan_reason_str
317*/
318static inline const char *acx_wlan_reason_str(u16 reason)
319{
320 static const char *const reason_str[] = {
321 /* 0 */ "?",
322 /* 1 */ "unspecified",
323 /* 2 */ "prev auth is not valid",
324 /* 3 */ "leaving BBS",
325 /* 4 */ "due to inactivity",
326 /* 5 */ "AP is busy",
327 /* 6 */ "got class 2 frame from non-auth'ed STA",
328 /* 7 */ "got class 3 frame from non-assoc'ed STA",
329 /* 8 */ "STA has left BSS",
330 /* 9 */ "assoc without auth is not allowed",
331 /* 10 */ "bad power setting (802.11h)",
332 /* 11 */ "bad channel (802.11i)",
333 /* 12 */ "?",
334 /* 13 */ "invalid IE",
335 /* 14 */ "MIC failure",
336 /* 15 */ "four-way handshake timeout",
337 /* 16 */ "group key handshake timeout",
338 /* 17 */ "IE is different",
339 /* 18 */ "invalid group cipher",
340 /* 19 */ "invalid pairwise cipher",
341 /* 20 */ "invalid AKMP",
342 /* 21 */ "unsupported RSN version",
343 /* 22 */ "invalid RSN IE cap",
344 /* 23 */ "802.1x failed",
345 /* 24 */ "cipher suite rejected"
346 };
347 return reason < ARRAY_SIZE(reason_str) ? reason_str[reason] : "?";
348}
349245
350246
351247/***********************************************************************
272272 cmd_error_strings[state] : "?";
273273}
274274
275
276/***********************************************************************
277** get_status_string
278*/
279static inline const char *get_status_string(unsigned int status)
280{
281 /* A bit shortened, but hopefully still understandable */
282 static const char *const status_str[] = {
283 /* 0 */ "Successful",
284 /* 1 */ "Unspecified failure",
285 /* 2 */ "reserved",
286 /* 3 */ "reserved",
287 /* 4 */ "reserved",
288 /* 5 */ "reserved",
289 /* 6 */ "reserved",
290 /* 7 */ "reserved",
291 /* 8 */ "reserved",
292 /* 9 */ "reserved",
293 /*10 */
294 "Cannot support all requested capabilities in Capability Information field",
295 /*11 */ "Reassoc denied (reason outside of 802.11b scope)",
296 /*12 */
297 "Assoc denied (reason outside of 802.11b scope) -- maybe MAC filtering by peer?",
298 /*13 */
299 "Responding station doesnt support specified auth algorithm -- maybe WRP auth Open vs. Restricted",
300 /*14 */ "Auth rejected: wrong transaction sequence number",
301 /*15 */ "Auth rejected: challenge failure",
302 /*16 */ "Auth rejected: timeout for next frame in sequence",
303 /*17 */ "Assoc denied: too many STAs on this AP",
304 /*18 */
305 "Assoc denied: requesting STA doesnt support all data rates in basic set",
306 /*19 */
307 "Assoc denied: requesting STA doesnt support Short Preamble",
308 /*20 */
309 "Assoc denied: requesting STA doesnt support PBCC Modulation",
310 /*21 */
311 "Assoc denied: requesting STA doesnt support Channel Agility"
312 /*22 */ "reserved",
313 /*23 */ "reserved",
314 /*24 */ "reserved",
315 /*25 */
316 "Assoc denied: requesting STA doesnt support Short Slot Time",
317 /*26 */ "Assoc denied: requesting STA doesnt support DSSS-OFDM"
318 };
319
320 return status_str[status < ARRAY_SIZE(status_str) ? status : 2];
321}
322
323275/***********************************************************************
324276*/
325277#if ACX_DEBUG
305305
306306/***********************************************************************
307307** acx_s_get_firmware_version
308**
309** Obvious
308310*/
309311void acx_s_get_firmware_version(acx_device_t * adev)
310312{
393393** acx_display_hardware_details
394394**
395395** Displays hw/fw version, radio type etc...
396**
397** Obvious
396398*/
397399void acx_display_hardware_details(acx_device_t * adev)
398400{
461461
462462
463463/***********************************************************************
464*/
465int acx_e_change_mtu(struct ieee80211_hw *hw, int mtu)
466{
467 enum {
468 MIN_MTU = 256,
469 MAX_MTU = WLAN_DATA_MAXLEN - (ETH_HLEN)
470 };
471
472 if (mtu < MIN_MTU || mtu > MAX_MTU)
473 return -EINVAL;
474
475// hw->mtu = mtu;
476 return 1;
477}
478
479/***********************************************************************
480464** acx_e_get_stats, acx_e_get_wireless_stats
481465*/
482466int
475475 return 0;
476476}
477477
478struct iw_statistics *acx_e_get_wireless_stats(struct ieee80211_hw *hw)
479{
480 acx_device_t *adev = ieee2adev(hw);
481 return &adev->wstats;
482}
483
484478
485479/***********************************************************************
486480** maps acx111 tx descr rate field to acx100 one
829829 adev->form_factor,
830830 adev->eeprom_version,
831831 adev->firmware_version, adev->firmware_numver);
832/*
833 for (i = 0; i < VEC_SIZE(adev->sta_list); i++) {
834 struct client *bss = &adev->sta_list[i];
835 if (!bss->used) continue;
836 p += sprintf(p, "BSS %u BSSID "MACSTR" ESSID %s channel %u "
837 "Cap 0x%X SIR %u SNR %u\n",
838 i, MAC(bss->bssid), (char*)bss->essid, bss->channel,
839 bss->cap_info, bss->sir, bss->snr);
840 }
841*/
842 p += sprintf(p, "status:\t\t\t%u (%s)\n",
843 adev->status, acx_get_status_name(adev->status));
844832
845833 FN_EXIT1(p - buf);
846834 return p - buf;
870870 "\n"
871871 "** network status **\n"
872872 "dev_state_mask 0x%04X\n"
873 "status %u (%s), "
874873 "mode %u, channel %u, "
875874 "reg_dom_id 0x%02X, reg_dom_chanmask 0x%04X, ",
876875 adev->dev_state_mask,
877 adev->status, acx_get_status_name(adev->status),
878876 adev->mode, adev->channel,
879877 adev->reg_dom_id, adev->reg_dom_chanmask);
880878 p += sprintf(p,
14141414 return manage_proc_entries(ieee, 1);
14151415}
14161416#endif /* CONFIG_PROC_FS */
1417/*
1418void acx_get_drvinfo(struct ieee80211_hw *hw,
1419 struct ethtool_drvinfo *info)
1420{
1421 acx_device_t *adev = ieee2adev(hw);
1422
1423 strncpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
1424 strncpy(info->version, UTS_RELEASE, sizeof(info->version));
1425 acx_put_devname(adev,info);
1426}
14271417
1428struct ethtool_ops acx_ethtool_ops = {
1429 .get_drvinfo = acx_get_drvinfo,
1430 .get_link = ethtool_op_get_link,
1431};
1432*/
1418/****
1419** Gathered From rt2x00 and bcm43xx_mac80211 projects
1420**/
14331421void acx_free_modes(acx_device_t * adev)
14341422{
14351423
1436/* for (i = 0; i < ieee->num_modes; i++) {
1437 kfree(ieee->modes[i].channels);
1438 kfree(ieee->modes[i].rates);
1439 }*/
14401424 kfree(adev->modes);
14411425 adev->modes = NULL;
14421426}
1443/*
1444int acx_append_mode(struct ieee80211_hw *ieee,
1445 int mode_id,
1446 int nr_channels,
1447 const struct ieee80211_channel *channels,
1448 int nr_rates, const struct ieee80211_rate *rates)
1449{
1450 struct ieee80211_hw_modes *mode;
1451 int err = -ENOMEM;
1452
1453 mode = &(ieee->modes[ieee->num_modes]);
1454
1455 mode->mode = mode_id;
1456 mode->num_channels = nr_channels;
1457 mode->channels = kzalloc(sizeof(*channels) * nr_channels, GFP_KERNEL);
1458 if (!mode->channels)
1459 goto out;
1460 memcpy(mode->channels, channels, sizeof(*channels) * nr_channels);
1461
1462 mode->num_rates = nr_rates;
1463 mode->rates = kzalloc(sizeof(*rates) * nr_rates, GFP_KERNEL);
1464 if (!mode->rates)
1465 goto err_free_channels;
1466 memcpy(mode->rates, rates, sizeof(*rates) * nr_rates);
14671427
1468 err = 0;
1469 out:
1470 return err;
1471
1472 err_free_channels:
1473 kfree(mode->channels);
1474 goto out;
1475
1476}
1477*/
14781428#define RATETAB_ENT(_rateid, _flags) \
14791429 { \
14801430 .rate = (_rateid), \
14621462 .flag = IEEE80211_CHAN_W_SCAN | \
14631463 IEEE80211_CHAN_W_ACTIVE_SCAN | \
14641464 IEEE80211_CHAN_W_IBSS, \
1465 .power_level = 0xFF, \
1465 .power_level = 0xf, \
14661466 .antenna_max = 0xFF, \
14671467 }
14681468static struct ieee80211_channel channels[] = {
15381538/***********************************************************************
15391539** acx_fill_beacon_or_proberesp_template
15401540**
1541** For frame format info, please see 802.11-1999.pdf item 7.2.3.9 and below!!
1542**
1543** NB: we use the fact that
1544** struct acx_template_proberesp and struct acx_template_beacon are the same
1545** (well, almost...)
1546**
1547** [802.11] Beacon's body consist of these IEs:
1548** 1 Timestamp
1549** 2 Beacon interval
1550** 3 Capability information
1551** 4 SSID
1552** 5 Supported rates (up to 8 rates)
1553** 6 FH Parameter Set (frequency-hopping PHYs only)
1554** 7 DS Parameter Set (direct sequence PHYs only)
1555** 8 CF Parameter Set (only if PCF is supported)
1556** 9 IBSS Parameter Set (ad-hoc only)
1557**
1558** Beacon only:
1559** 10 TIM (AP only) (see 802.11 7.3.2.6)
1560** 11 Country Information (802.11d)
1561** 12 FH Parameters (802.11d)
1562** 13 FH Pattern Table (802.11d)
1563** ... (?!! did not yet find relevant PDF file... --vda)
1564** 19 ERP Information (extended rate PHYs)
1565** 20 Extended Supported Rates (if more than 8 rates)
1566**
1567** Proberesp only:
1568** 10 Country information (802.11d)
1569** 11 FH Parameters (802.11d)
1570** 12 FH Pattern Table (802.11d)
1571** 13-n Requested information elements (802.11d)
1572** ????
1573** 18 ERP Information (extended rate PHYs)
1574** 19 Extended Supported Rates (if more than 8 rates)
1541** Origin: derived from rt2x00 project
15751542*/
15761543static int
15771544acx_fill_beacon_or_proberesp_template(acx_device_t *adev,
15781545 struct acx_template_beacon *templ,
1579 u16 fc /* in host order! */)
1546 struct sk_buff* skb /* in host order! */)
15801547{
1581 int len;
1582 u8 *p;
1583
15841548 FN_ENTER;
15851549
1586 memset(templ, 0, sizeof(*templ));
1587 MAC_BCAST(templ->da);
1588 MAC_COPY(templ->sa, adev->dev_addr);
1589 MAC_COPY(templ->bssid, adev->bssid);
1590
1591 templ->beacon_interval = cpu_to_le16(adev->beacon_interval);
1592 acx_update_capabilities(adev);
1593 templ->cap = cpu_to_le16(adev->capabilities);
1594
1595 p = templ->variable;
1596 p = wlan_fill_ie_ssid(p, adev->essid_len, adev->essid);
1597 p = wlan_fill_ie_rates(p, adev->rate_supported_len, adev->rate_supported);
1598 p = wlan_fill_ie_ds_parms(p, adev->channel);
1599 /* NB: should go AFTER tim, but acx seem to keep tim last always */
1600 p = wlan_fill_ie_rates_ext(p, adev->rate_supported_len, adev->rate_supported);
1601
1602 switch (adev->mode) {
1603 case ACX_MODE_0_ADHOC:
1604 /* ATIM window */
1605 p = wlan_fill_ie_ibss_parms(p, 0); break;
1606 case ACX_MODE_3_AP:
1607 /* TIM IE is set up as separate template */
1608 break;
1609 }
1610
1611 len = p - (u8*)templ;
1612 templ->fc = cpu_to_le16(WF_FTYPE_MGMT | fc);
1613 /* - 2: do not count 'u16 size' field */
1614 templ->size = cpu_to_le16(len - 2);
1615
1616 FN_EXIT1(len);
1617 return len;
1550 memcpy(templ,skb->data, skb->len);
1551 FN_EXIT1(skb->len);
1552 return skb->len;
16181553}
16191554
16201555/***********************************************************************
16211556** acx_s_set_beacon_template
1557**
1558**
16221559*/
16231560static int
1624acx_s_set_beacon_template(acx_device_t *adev)
1561acx_s_set_beacon_template(acx_device_t *adev, struct sk_buff *skb)
16251562{
16261563 struct acx_template_beacon bcn;
16271564 int len, result;
16281565
16291566 FN_ENTER;
1630
1631 len = acx_fill_beacon_or_proberesp_template(adev, &bcn, WF_FSTYPE_BEACON);
1567 printk("Size of template: %08X, Size of beacon: %08X\n",sizeof(struct acx_template_beacon),skb->len);
1568 len = acx_fill_beacon_or_proberesp_template(adev, &bcn, skb);
16321569 result = acx_s_issue_cmd(adev, ACX1xx_CMD_CONFIG_BEACON, &bcn, len);
16331570
16341571 FN_EXIT1(result);
16081608}
16091609
16101610
1611static void
1612acx_s_cmd_join_bssid(acx_device_t *adev, const u8 *bssid)
1611void acx_s_cmd_join_bssid(acx_device_t *adev, const u8 *bssid)
16131612{
16141613 acx_joinbss_t tmp;
16151614 int dtim_interval;
16661666 tmp.macmode = (adev->mode != ACX_MODE_MONITOR ? adev->mode : ACX_MODE_2_STA);
16671667 tmp.channel = adev->channel;
16681668 tmp.essid_len = adev->essid_len;
1669 /* NOTE: the code memcpy'd essid_len + 1 before, which is WRONG! */
1669
16701670 memcpy(tmp.essid, adev->essid, tmp.essid_len);
16711671 acx_s_issue_cmd(adev, ACX1xx_CMD_JOIN, &tmp, tmp.essid_len + 0x11);
16721672
16731673 log(L_ASSOC|L_DEBUG, "BSS_Type = %u\n", tmp.macmode);
16741674 acxlog_mac(L_ASSOC|L_DEBUG, "JoinBSSID MAC:", adev->bssid, "\n");
16751675
1676 acx_update_capabilities(adev);
1676/* acx_update_capabilities(adev); */
16771677 FN_EXIT0;
16781678}
16791679
1680
1681
16821680/***********************************************************************
1683** acx_s_cmd_start_scan
1684**
1685** Issue scan command to the hardware
1686**
1687** unified function for both ACX111 and ACX100
1688*/
1689/*
1690int acx_passive_scan(struct net_device *net_dev, int state,
1691 struct ieee80211_scan_conf *conf)
1692{
1693 union {
1694 acx111_scan_t acx111;
1695 acx100_scan_t acx100;
1696 } s;
1697 unsigned long flags;
1698 acx_device_t *adev = ieee2adev(hw);
1699 FN_ENTER;
1700 acx_lock(adev, flags);
1701 memset(&s, 0, sizeof(s));
1702*/
1703 /* first common positions... */
1704/*
1705 s.acx111.count = cpu_to_le16(adev->scan_count);
1706 s.acx111.rate = adev->scan_rate;
1707 s.acx111.options = ACX_SCAN_OPT_PASSIVE;
1708 s.acx111.chan_duration = cpu_to_le16(adev->scan_duration);
1709 s.acx111.max_probe_delay = cpu_to_le16(adev->scan_probe_delay);
1681** acxpci_i_set_multicast_list
1682** FIXME: most likely needs refinement
17101683*/
1711 /* ...then differences */
1712
1713// if (IS_ACX111(adev)) {
1714 /*s.acx111.channel_list_select = 0; *//* scan every allowed channel */
1715// s.acx111.channel_list_select = 1; /* scan given channels */
1716 /*s.acx111.modulation = 0x40; *//* long preamble? OFDM? -> only for active scan */
1717// s.acx111.modulation = 0;
1718// s.acx111.channel_list[0] = conf->scan_channel;
1719 /*s.acx111.channel_list[1] = 4; */
1720/* } else {
1721 s.acx100.start_chan = cpu_to_le16(conf->scan_channel);
1722 s.acx100.flags = cpu_to_le16(conf->scan_channel);
1723 }
1724
1725 acx_s_issue_cmd(adev, ACX1xx_CMD_SCAN, &s, sizeof(s));
1726 acx_unlock(adev, flags);
1727 FN_EXIT0;
1728 return 0;
1729}*/
1730static void acx_s_scan_chan(acx_device_t * adev)
1684void
1685acx_i_set_multicast_list(struct ieee80211_hw *hw,
1686 unsigned short netflags, int mc_count)
17311687{
1732 union {
1733 acx111_scan_t acx111;
1734 acx100_scan_t acx100;
1735 } s;
1736
1737 FN_ENTER;
1738
1739 memset(&s, 0, sizeof(s));
1740
1741 /* first common positions... */
1742
1743 s.acx111.count = cpu_to_le16(adev->scan_count);
1744 s.acx111.rate = adev->scan_rate;
1745 s.acx111.options = adev->scan_mode;
1746 s.acx111.chan_duration = cpu_to_le16(adev->scan_duration);
1747 s.acx111.max_probe_delay = cpu_to_le16(adev->scan_probe_delay);
1688