aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2009-10-13 05:47:42 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-27 16:48:08 -0400
commit51f2be24328957f9e2acf116b1b1d2dfd10bf41f (patch)
tree495c00ecd36cb7e84aeff4b9fd837d8e184cb8e0
parent45b531a86f93c82d8e390e19a6258111b3627bb0 (diff)
wl1271: Add config structure for connection management parameters
Add a configuration structure for connection management parameters, and set default configuration values there. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/wl12xx/wl1271.h1
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_acx.c63
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_acx.h24
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_cmd.c3
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_conf.h251
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_main.c50
6 files changed, 348 insertions, 44 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271.h b/drivers/net/wireless/wl12xx/wl1271.h
index 985e8964c2f7..648223f67b54 100644
--- a/drivers/net/wireless/wl12xx/wl1271.h
+++ b/drivers/net/wireless/wl12xx/wl1271.h
@@ -323,7 +323,6 @@ struct wl1271 {
323 u8 bss_type; 323 u8 bss_type;
324 u8 ssid[IW_ESSID_MAX_SIZE + 1]; 324 u8 ssid[IW_ESSID_MAX_SIZE + 1];
325 u8 ssid_len; 325 u8 ssid_len;
326 u8 listen_int;
327 int channel; 326 int channel;
328 327
329 struct wl1271_acx_mem_map *target_mem_map; 328 struct wl1271_acx_mem_map *target_mem_map;
diff --git a/drivers/net/wireless/wl12xx/wl1271_acx.c b/drivers/net/wireless/wl12xx/wl1271_acx.c
index 038203bcf447..d0036860ab60 100644
--- a/drivers/net/wireless/wl12xx/wl1271_acx.c
+++ b/drivers/net/wireless/wl12xx/wl1271_acx.c
@@ -34,8 +34,7 @@
34#include "wl1271_spi.h" 34#include "wl1271_spi.h"
35#include "wl1271_ps.h" 35#include "wl1271_ps.h"
36 36
37int wl1271_acx_wake_up_conditions(struct wl1271 *wl, u8 wake_up_event, 37int wl1271_acx_wake_up_conditions(struct wl1271 *wl)
38 u8 listen_interval)
39{ 38{
40 struct acx_wake_up_condition *wake_up; 39 struct acx_wake_up_condition *wake_up;
41 int ret; 40 int ret;
@@ -48,8 +47,8 @@ int wl1271_acx_wake_up_conditions(struct wl1271 *wl, u8 wake_up_event,
48 goto out; 47 goto out;
49 } 48 }
50 49
51 wake_up->wake_up_event = wake_up_event; 50 wake_up->wake_up_event = wl->conf.conn.wake_up_event;
52 wake_up->listen_interval = listen_interval; 51 wake_up->listen_interval = wl->conf.conn.listen_interval;
53 52
54 ret = wl1271_cmd_configure(wl, ACX_WAKE_UP_CONDITIONS, 53 ret = wl1271_cmd_configure(wl, ACX_WAKE_UP_CONDITIONS,
55 wake_up, sizeof(*wake_up)); 54 wake_up, sizeof(*wake_up));
@@ -393,11 +392,15 @@ out:
393 392
394int wl1271_acx_beacon_filter_opt(struct wl1271 *wl, bool enable_filter) 393int wl1271_acx_beacon_filter_opt(struct wl1271 *wl, bool enable_filter)
395{ 394{
396 struct acx_beacon_filter_option *beacon_filter; 395 struct acx_beacon_filter_option *beacon_filter = NULL;
397 int ret; 396 int ret = 0;
398 397
399 wl1271_debug(DEBUG_ACX, "acx beacon filter opt"); 398 wl1271_debug(DEBUG_ACX, "acx beacon filter opt");
400 399
400 if (enable_filter &&
401 wl->conf.conn.bcn_filt_mode == CONF_BCN_FILT_MODE_DISABLED)
402 goto out;
403
401 beacon_filter = kzalloc(sizeof(*beacon_filter), GFP_KERNEL); 404 beacon_filter = kzalloc(sizeof(*beacon_filter), GFP_KERNEL);
402 if (!beacon_filter) { 405 if (!beacon_filter) {
403 ret = -ENOMEM; 406 ret = -ENOMEM;
@@ -405,6 +408,11 @@ int wl1271_acx_beacon_filter_opt(struct wl1271 *wl, bool enable_filter)
405 } 408 }
406 409
407 beacon_filter->enable = enable_filter; 410 beacon_filter->enable = enable_filter;
411
412 /*
413 * When set to zero, and the filter is enabled, beacons
414 * without the unicast TIM bit set are dropped.
415 */
408 beacon_filter->max_num_beacons = 0; 416 beacon_filter->max_num_beacons = 0;
409 417
410 ret = wl1271_cmd_configure(wl, ACX_BEACON_FILTER_OPT, 418 ret = wl1271_cmd_configure(wl, ACX_BEACON_FILTER_OPT,
@@ -422,8 +430,9 @@ out:
422int wl1271_acx_beacon_filter_table(struct wl1271 *wl) 430int wl1271_acx_beacon_filter_table(struct wl1271 *wl)
423{ 431{
424 struct acx_beacon_filter_ie_table *ie_table; 432 struct acx_beacon_filter_ie_table *ie_table;
425 int idx = 0; 433 int i, idx = 0;
426 int ret; 434 int ret;
435 bool vendor_spec = false;
427 436
428 wl1271_debug(DEBUG_ACX, "acx beacon filter table"); 437 wl1271_debug(DEBUG_ACX, "acx beacon filter table");
429 438
@@ -434,9 +443,31 @@ int wl1271_acx_beacon_filter_table(struct wl1271 *wl)
434 } 443 }
435 444
436 /* configure default beacon pass-through rules */ 445 /* configure default beacon pass-through rules */
437 ie_table->num_ie = 1; 446 ie_table->num_ie = 0;
438 ie_table->table[idx++] = BEACON_FILTER_IE_ID_CHANNEL_SWITCH_ANN; 447 for (i = 0; i < wl->conf.conn.bcn_filt_ie_count; i++) {
439 ie_table->table[idx++] = BEACON_RULE_PASS_ON_APPEARANCE; 448 struct conf_bcn_filt_rule *r = &(wl->conf.conn.bcn_filt_ie[i]);
449 ie_table->table[idx++] = r->ie;
450 ie_table->table[idx++] = r->rule;
451
452 if (r->ie == WLAN_EID_VENDOR_SPECIFIC) {
453 /* only one vendor specific ie allowed */
454 if (vendor_spec)
455 continue;
456
457 /* for vendor specific rules configure the
458 additional fields */
459 memcpy(&(ie_table->table[idx]), r->oui,
460 CONF_BCN_IE_OUI_LEN);
461 idx += CONF_BCN_IE_OUI_LEN;
462 ie_table->table[idx++] = r->type;
463 memcpy(&(ie_table->table[idx]), r->version,
464 CONF_BCN_IE_VER_LEN);
465 idx += CONF_BCN_IE_VER_LEN;
466 vendor_spec = true;
467 }
468
469 ie_table->num_ie++;
470 }
440 471
441 ret = wl1271_cmd_configure(wl, ACX_BEACON_FILTER_TABLE, 472 ret = wl1271_cmd_configure(wl, ACX_BEACON_FILTER_TABLE,
442 ie_table, sizeof(*ie_table)); 473 ie_table, sizeof(*ie_table));
@@ -463,8 +494,8 @@ int wl1271_acx_conn_monit_params(struct wl1271 *wl)
463 goto out; 494 goto out;
464 } 495 }
465 496
466 acx->synch_fail_thold = SYNCH_FAIL_DEFAULT_THRESHOLD; 497 acx->synch_fail_thold = wl->conf.conn.synch_fail_thold;
467 acx->bss_lose_timeout = NO_BEACON_DEFAULT_TIMEOUT; 498 acx->bss_lose_timeout = wl->conf.conn.bss_lose_timeout;
468 499
469 ret = wl1271_cmd_configure(wl, ACX_CONN_MONIT_PARAMS, 500 ret = wl1271_cmd_configure(wl, ACX_CONN_MONIT_PARAMS,
470 acx, sizeof(*acx)); 501 acx, sizeof(*acx));
@@ -585,10 +616,10 @@ int wl1271_acx_bcn_dtim_options(struct wl1271 *wl)
585 goto out; 616 goto out;
586 } 617 }
587 618
588 bb->beacon_rx_timeout = BCN_RX_TIMEOUT_DEF_VALUE; 619 bb->beacon_rx_timeout = wl->conf.conn.beacon_rx_timeout;
589 bb->broadcast_timeout = BROADCAST_RX_TIMEOUT_DEF_VALUE; 620 bb->broadcast_timeout = wl->conf.conn.broadcast_timeout;
590 bb->rx_broadcast_in_ps = RX_BROADCAST_IN_PS_DEF_VALUE; 621 bb->rx_broadcast_in_ps = wl->conf.conn.rx_broadcast_in_ps;
591 bb->ps_poll_threshold = CONSECUTIVE_PS_POLL_FAILURE_DEF; 622 bb->ps_poll_threshold = wl->conf.conn.ps_poll_threshold;
592 623
593 ret = wl1271_cmd_configure(wl, ACX_BCN_DTIM_OPTIONS, bb, sizeof(*bb)); 624 ret = wl1271_cmd_configure(wl, ACX_BCN_DTIM_OPTIONS, bb, sizeof(*bb));
594 if (ret < 0) { 625 if (ret < 0) {
diff --git a/drivers/net/wireless/wl12xx/wl1271_acx.h b/drivers/net/wireless/wl12xx/wl1271_acx.h
index 63cddceb39a4..73ef2bdf3b74 100644
--- a/drivers/net/wireless/wl12xx/wl1271_acx.h
+++ b/drivers/net/wireless/wl12xx/wl1271_acx.h
@@ -377,11 +377,6 @@ struct acx_beacon_filter_option {
377 (BEACON_FILTER_TABLE_MAX_VENDOR_SPECIFIC_IE_NUM * \ 377 (BEACON_FILTER_TABLE_MAX_VENDOR_SPECIFIC_IE_NUM * \
378 BEACON_FILTER_TABLE_EXTRA_VENDOR_SPECIFIC_IE_SIZE)) 378 BEACON_FILTER_TABLE_EXTRA_VENDOR_SPECIFIC_IE_SIZE))
379 379
380#define BEACON_RULE_PASS_ON_CHANGE BIT(0)
381#define BEACON_RULE_PASS_ON_APPEARANCE BIT(1)
382
383#define BEACON_FILTER_IE_ID_CHANNEL_SWITCH_ANN (37)
384
385struct acx_beacon_filter_ie_table { 380struct acx_beacon_filter_ie_table {
386 struct acx_header header; 381 struct acx_header header;
387 382
@@ -390,9 +385,6 @@ struct acx_beacon_filter_ie_table {
390 u8 pad[3]; 385 u8 pad[3];
391} __attribute__ ((packed)); 386} __attribute__ ((packed));
392 387
393#define SYNCH_FAIL_DEFAULT_THRESHOLD 5 /* number of beacons */
394#define NO_BEACON_DEFAULT_TIMEOUT (100) /* TU */
395
396struct acx_conn_monit_params { 388struct acx_conn_monit_params {
397 struct acx_header header; 389 struct acx_header header;
398 390
@@ -497,11 +489,6 @@ struct acx_energy_detection {
497 u8 pad; 489 u8 pad;
498} __attribute__ ((packed)); 490} __attribute__ ((packed));
499 491
500#define BCN_RX_TIMEOUT_DEF_VALUE 10000
501#define BROADCAST_RX_TIMEOUT_DEF_VALUE 20000
502#define RX_BROADCAST_IN_PS_DEF_VALUE 1
503#define CONSECUTIVE_PS_POLL_FAILURE_DEF 4
504
505struct acx_beacon_broadcast { 492struct acx_beacon_broadcast {
506 struct acx_header header; 493 struct acx_header header;
507 494
@@ -575,14 +562,6 @@ struct acx_current_tx_power {
575 u8 padding[3]; 562 u8 padding[3];
576} __attribute__ ((packed)); 563} __attribute__ ((packed));
577 564
578enum acx_wake_up_event {
579 WAKE_UP_EVENT_BEACON_BITMAP = 0x01, /* Wake on every Beacon*/
580 WAKE_UP_EVENT_DTIM_BITMAP = 0x02, /* Wake on every DTIM*/
581 WAKE_UP_EVENT_N_DTIM_BITMAP = 0x04, /* Wake on every Nth DTIM */
582 WAKE_UP_EVENT_N_BEACONS_BITMAP = 0x08, /* Wake on every Nth Beacon */
583 WAKE_UP_EVENT_BITS_MASK = 0x0F
584};
585
586struct acx_wake_up_condition { 565struct acx_wake_up_condition {
587 struct acx_header header; 566 struct acx_header header;
588 567
@@ -1038,8 +1017,7 @@ enum {
1038}; 1017};
1039 1018
1040 1019
1041int wl1271_acx_wake_up_conditions(struct wl1271 *wl, u8 wake_up_event, 1020int wl1271_acx_wake_up_conditions(struct wl1271 *wl);
1042 u8 listen_interval);
1043int wl1271_acx_sleep_auth(struct wl1271 *wl, u8 sleep_auth); 1021int wl1271_acx_sleep_auth(struct wl1271 *wl, u8 sleep_auth);
1044int wl1271_acx_fw_version(struct wl1271 *wl, char *buf, size_t len); 1022int wl1271_acx_fw_version(struct wl1271 *wl, char *buf, size_t len);
1045int wl1271_acx_tx_power(struct wl1271 *wl, int power); 1023int wl1271_acx_tx_power(struct wl1271 *wl, int power);
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c
index f05bd7797fb7..f38e3e0e2d66 100644
--- a/drivers/net/wireless/wl12xx/wl1271_cmd.c
+++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c
@@ -436,8 +436,7 @@ int wl1271_cmd_ps_mode(struct wl1271 *wl, u8 ps_mode)
436 int ret = 0; 436 int ret = 0;
437 437
438 /* FIXME: this should be in ps.c */ 438 /* FIXME: this should be in ps.c */
439 ret = wl1271_acx_wake_up_conditions(wl, WAKE_UP_EVENT_DTIM_BITMAP, 439 ret = wl1271_acx_wake_up_conditions(wl);
440 wl->listen_int);
441 if (ret < 0) { 440 if (ret < 0) {
442 wl1271_error("couldn't set wake up conditions"); 441 wl1271_error("couldn't set wake up conditions");
443 goto out; 442 goto out;
diff --git a/drivers/net/wireless/wl12xx/wl1271_conf.h b/drivers/net/wireless/wl12xx/wl1271_conf.h
index 3c5ce3100e6e..f08e509bd69f 100644
--- a/drivers/net/wireless/wl12xx/wl1271_conf.h
+++ b/drivers/net/wireless/wl12xx/wl1271_conf.h
@@ -441,10 +441,261 @@ struct conf_tx_settings {
441 441
442}; 442};
443 443
444enum {
445 CONF_WAKE_UP_EVENT_BEACON = 0x01, /* Wake on every Beacon*/
446 CONF_WAKE_UP_EVENT_DTIM = 0x02, /* Wake on every DTIM*/
447 CONF_WAKE_UP_EVENT_N_DTIM = 0x04, /* Wake every Nth DTIM */
448 CONF_WAKE_UP_EVENT_N_BEACONS = 0x08, /* Wake every Nth beacon */
449 CONF_WAKE_UP_EVENT_BITS_MASK = 0x0F
450};
451
452#define CONF_MAX_BCN_FILT_IE_COUNT 32
453
454#define CONF_BCN_RULE_PASS_ON_CHANGE BIT(0)
455#define CONF_BCN_RULE_PASS_ON_APPEARANCE BIT(1)
456
457#define CONF_BCN_IE_OUI_LEN 3
458#define CONF_BCN_IE_VER_LEN 2
459
460struct conf_bcn_filt_rule {
461 /*
462 * IE number to which to associate a rule.
463 *
464 * Range: u8
465 */
466 u8 ie;
467
468 /*
469 * Rule to associate with the specific ie.
470 *
471 * Range: CONF_BCN_RULE_PASS_ON_*
472 */
473 u8 rule;
474
475 /*
476 * OUI for the vendor specifie IE (221)
477 */
478 u8 oui[CONF_BCN_IE_OUI_LEN];
479
480 /*
481 * Type for the vendor specifie IE (221)
482 */
483 u8 type;
484
485 /*
486 * Version for the vendor specifie IE (221)
487 */
488 u8 version[CONF_BCN_IE_VER_LEN];
489};
490
491#define CONF_MAX_RSSI_SNR_TRIGGERS 8
492
493enum {
494 CONF_TRIG_METRIC_RSSI_BEACON = 0,
495 CONF_TRIG_METRIC_RSSI_DATA,
496 CONF_TRIG_METRIC_SNR_BEACON,
497 CONF_TRIG_METRIC_SNR_DATA
498};
499
500enum {
501 CONF_TRIG_EVENT_TYPE_LEVEL = 0,
502 CONF_TRIG_EVENT_TYPE_EDGE
503};
504
505enum {
506 CONF_TRIG_EVENT_DIR_LOW = 0,
507 CONF_TRIG_EVENT_DIR_HIGH,
508 CONF_TRIG_EVENT_DIR_BIDIR
509};
510
511
512struct conf_sig_trigger {
513 /*
514 * The RSSI / SNR threshold value.
515 *
516 * FIXME: what is the range?
517 */
518 s16 threshold;
519
520 /*
521 * Minimum delay between two trigger events for this trigger in ms.
522 *
523 * Range: 0 - 60000
524 */
525 u16 pacing;
526
527 /*
528 * The measurement data source for this trigger.
529 *
530 * Range: CONF_TRIG_METRIC_*
531 */
532 u8 metric;
533
534 /*
535 * The trigger type of this trigger.
536 *
537 * Range: CONF_TRIG_EVENT_TYPE_*
538 */
539 u8 type;
540
541 /*
542 * The direction of the trigger.
543 *
544 * Range: CONF_TRIG_EVENT_DIR_*
545 */
546 u8 direction;
547
548 /*
549 * Hysteresis range of the trigger around the threshold (in dB)
550 *
551 * Range: u8
552 */
553 u8 hysteresis;
554
555 /*
556 * Index of the trigger rule.
557 *
558 * Range: 0 - CONF_MAX_RSSI_SNR_TRIGGERS-1
559 */
560 u8 index;
561
562 /*
563 * Enable / disable this rule (to use for clearing rules.)
564 *
565 * Range: 1 - Enabled, 2 - Not enabled
566 */
567 u8 enable;
568};
569
570struct conf_sig_weights {
571
572 /*
573 * RSSI from beacons average weight.
574 *
575 * Range: u8
576 */
577 u8 rssi_bcn_avg_weight;
578
579 /*
580 * RSSI from data average weight.
581 *
582 * Range: u8
583 */
584 u8 rssi_pkt_avg_weight;
585
586 /*
587 * SNR from beacons average weight.
588 *
589 * Range: u8
590 */
591 u8 snr_bcn_avg_weight;
592
593 /*
594 * SNR from data average weight.
595 *
596 * Range: u8
597 */
598 u8 snr_pkt_avg_weight;
599};
600
601enum conf_bcn_filt_mode {
602 CONF_BCN_FILT_MODE_DISABLED = 0,
603 CONF_BCN_FILT_MODE_ENABLED = 1
604};
605
606struct conf_conn_settings {
607 /*
608 * Firmware wakeup conditions configuration. The host may set only
609 * one bit.
610 *
611 * Range: CONF_WAKE_UP_EVENT_*
612 */
613 u8 wake_up_event;
614
615 /*
616 * Listen interval for beacons or Dtims.
617 *
618 * Range: 0 for beacon and Dtim wakeup
619 * 1-10 for x Dtims
620 * 1-255 for x beacons
621 */
622 u8 listen_interval;
623
624 /*
625 * Enable or disable the beacon filtering.
626 *
627 * Range: CONF_BCN_FILT_MODE_*
628 */
629 enum conf_bcn_filt_mode bcn_filt_mode;
630
631 /*
632 * Configure Beacon filter pass-thru rules.
633 */
634 u8 bcn_filt_ie_count;
635 struct conf_bcn_filt_rule bcn_filt_ie[CONF_MAX_BCN_FILT_IE_COUNT];
636
637 /*
638 * The number of consequtive beacons to lose, before the firmware
639 * becomes out of synch.
640 *
641 * Range: u32
642 */
643 u32 synch_fail_thold;
644
645 /*
646 * After out-of-synch, the number of TU's to wait without a further
647 * received beacon (or probe response) before issuing the BSS_EVENT_LOSE
648 * event.
649 *
650 * Range: u32
651 */
652 u32 bss_lose_timeout;
653
654 /*
655 * Beacon receive timeout.
656 *
657 * Range: u32
658 */
659 u32 beacon_rx_timeout;
660
661 /*
662 * Broadcast receive timeout.
663 *
664 * Range: u32
665 */
666 u32 broadcast_timeout;
667
668 /*
669 * Enable/disable reception of broadcast packets in power save mode
670 *
671 * Range: 1 - enable, 0 - disable
672 */
673 u8 rx_broadcast_in_ps;
674
675 /*
676 * Consequtive PS Poll failures before sending event to driver
677 *
678 * Range: u8
679 */
680 u8 ps_poll_threshold;
681
682 /*
683 * Configuration of signal (rssi/snr) triggers.
684 */
685 u8 sig_trigger_count;
686 struct conf_sig_trigger sig_trigger[CONF_MAX_RSSI_SNR_TRIGGERS];
687
688 /*
689 * Configuration of signal average weights.
690 */
691 struct conf_sig_weights sig_weights;
692};
693
444struct conf_drv_settings { 694struct conf_drv_settings {
445 struct conf_sg_settings sg; 695 struct conf_sg_settings sg;
446 struct conf_rx_settings rx; 696 struct conf_rx_settings rx;
447 struct conf_tx_settings tx; 697 struct conf_tx_settings tx;
698 struct conf_conn_settings conn;
448}; 699};
449 700
450#endif 701#endif
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 35d0b7efb680..a559a1536534 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -176,6 +176,54 @@ static void wl1271_conf_init(struct wl1271 *wl)
176 .frag_threshold = IEEE80211_MAX_FRAG_THRESHOLD, 176 .frag_threshold = IEEE80211_MAX_FRAG_THRESHOLD,
177 .tx_compl_timeout = 5, 177 .tx_compl_timeout = 5,
178 .tx_compl_threshold = 5 178 .tx_compl_threshold = 5
179 },
180 .conn = {
181 .wake_up_event = CONF_WAKE_UP_EVENT_DTIM,
182 .listen_interval = 0,
183 .bcn_filt_mode = CONF_BCN_FILT_MODE_ENABLED,
184 .bcn_filt_ie_count = 1,
185 .bcn_filt_ie = {
186 [0] = {
187 .ie = WLAN_EID_CHANNEL_SWITCH,
188 .rule =
189 CONF_BCN_RULE_PASS_ON_APPEARANCE,
190 }
191 },
192 .synch_fail_thold = 5,
193 .bss_lose_timeout = 100,
194 .beacon_rx_timeout = 10000,
195 .broadcast_timeout = 20000,
196 .rx_broadcast_in_ps = 1,
197 .ps_poll_threshold = 4,
198 .sig_trigger_count = 2,
199 .sig_trigger = {
200 [0] = {
201 .threshold = -75,
202 .pacing = 500,
203 .metric = CONF_TRIG_METRIC_RSSI_BEACON,
204 .type = CONF_TRIG_EVENT_TYPE_EDGE,
205 .direction = CONF_TRIG_EVENT_DIR_LOW,
206 .hysteresis = 2,
207 .index = 0,
208 .enable = 1
209 },
210 [1] = {
211 .threshold = -75,
212 .pacing = 500,
213 .metric = CONF_TRIG_METRIC_RSSI_BEACON,
214 .type = CONF_TRIG_EVENT_TYPE_EDGE,
215 .direction = CONF_TRIG_EVENT_DIR_HIGH,
216 .hysteresis = 2,
217 .index = 1,
218 .enable = 1
219 }
220 },
221 .sig_weights = {
222 .rssi_bcn_avg_weight = 10,
223 .rssi_pkt_avg_weight = 10,
224 .snr_bcn_avg_weight = 10,
225 .snr_pkt_avg_weight = 10
226 }
179 } 227 }
180 }; 228 };
181 229
@@ -765,7 +813,6 @@ static void wl1271_op_stop(struct ieee80211_hw *hw)
765 memset(wl->bssid, 0, ETH_ALEN); 813 memset(wl->bssid, 0, ETH_ALEN);
766 memset(wl->ssid, 0, IW_ESSID_MAX_SIZE + 1); 814 memset(wl->ssid, 0, IW_ESSID_MAX_SIZE + 1);
767 wl->ssid_len = 0; 815 wl->ssid_len = 0;
768 wl->listen_int = 1;
769 wl->bss_type = MAX_BSS_TYPE; 816 wl->bss_type = MAX_BSS_TYPE;
770 wl->band = IEEE80211_BAND_2GHZ; 817 wl->band = IEEE80211_BAND_2GHZ;
771 818
@@ -1504,7 +1551,6 @@ static int __devinit wl1271_probe(struct spi_device *spi)
1504 wl->channel = WL1271_DEFAULT_CHANNEL; 1551 wl->channel = WL1271_DEFAULT_CHANNEL;
1505 wl->scanning = false; 1552 wl->scanning = false;
1506 wl->default_key = 0; 1553 wl->default_key = 0;
1507 wl->listen_int = 1;
1508 wl->rx_counter = 0; 1554 wl->rx_counter = 0;
1509 wl->rx_config = WL1271_DEFAULT_RX_CONFIG; 1555 wl->rx_config = WL1271_DEFAULT_RX_CONFIG;
1510 wl->rx_filter = WL1271_DEFAULT_RX_FILTER; 1556 wl->rx_filter = WL1271_DEFAULT_RX_FILTER;