aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-06-07 01:33:08 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-06-07 01:33:08 -0400
commiteadc21f5dc0d995a49b472f4a6c2a5c1a0c35964 (patch)
treeb44647786823172c90d2738fd24b1499781b1b5a
parentb334b77351890a137f31a38f1ca2f1de0886a453 (diff)
parent39a6e7376af08b4caabf57ae21335bd31f003073 (diff)
Merge tag 'staging-4.1-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging / IIO fixes from Greg KH: "Here are some IIO driver fixes to resolve reported issues, some ozwpan fixes for some reported CVE problems, and a rtl8712 driver fix for a reported regression. All have been in linux-next successfully" * tag 'staging-4.1-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: rtl8712: fix stack dump ozwpan: unchecked signed subtraction leads to DoS ozwpan: divide-by-zero leading to panic ozwpan: Use unsigned ints to prevent heap overflow ozwpan: Use proper check to prevent heap overflow iio: adc: twl6030-gpadc: Fix modalias iio: adis16400: Fix burst transfer for adis16448 iio: adis16400: Fix burst mode iio: adis16400: Compute the scan mask from channel indices iio: adis16400: Use != channel indices for the two voltage channels iio: adis16400: Report pressure channel scale
-rw-r--r--drivers/iio/adc/twl6030-gpadc.c2
-rw-r--r--drivers/iio/imu/adis16400.h2
-rw-r--r--drivers/iio/imu/adis16400_buffer.c26
-rw-r--r--drivers/iio/imu/adis16400_core.c41
-rw-r--r--drivers/staging/ozwpan/ozhcd.c8
-rw-r--r--drivers/staging/ozwpan/ozusbif.h4
-rw-r--r--drivers/staging/ozwpan/ozusbsvc1.c19
-rw-r--r--drivers/staging/rtl8712/rtl8712_led.c144
-rw-r--r--drivers/staging/rtl8712/rtl871x_cmd.c2
-rw-r--r--drivers/staging/rtl8712/rtl871x_mlme.c6
-rw-r--r--drivers/staging/rtl8712/rtl871x_pwrctrl.c2
-rw-r--r--drivers/staging/rtl8712/rtl871x_sta_mgt.c2
12 files changed, 148 insertions, 110 deletions
diff --git a/drivers/iio/adc/twl6030-gpadc.c b/drivers/iio/adc/twl6030-gpadc.c
index 89d8aa1d2818..df12c57e6ce0 100644
--- a/drivers/iio/adc/twl6030-gpadc.c
+++ b/drivers/iio/adc/twl6030-gpadc.c
@@ -1001,7 +1001,7 @@ static struct platform_driver twl6030_gpadc_driver = {
1001 1001
1002module_platform_driver(twl6030_gpadc_driver); 1002module_platform_driver(twl6030_gpadc_driver);
1003 1003
1004MODULE_ALIAS("platform: " DRIVER_NAME); 1004MODULE_ALIAS("platform:" DRIVER_NAME);
1005MODULE_AUTHOR("Balaji T K <balajitk@ti.com>"); 1005MODULE_AUTHOR("Balaji T K <balajitk@ti.com>");
1006MODULE_AUTHOR("Graeme Gregory <gg@slimlogic.co.uk>"); 1006MODULE_AUTHOR("Graeme Gregory <gg@slimlogic.co.uk>");
1007MODULE_AUTHOR("Oleksandr Kozaruk <oleksandr.kozaruk@ti.com"); 1007MODULE_AUTHOR("Oleksandr Kozaruk <oleksandr.kozaruk@ti.com");
diff --git a/drivers/iio/imu/adis16400.h b/drivers/iio/imu/adis16400.h
index 0916bf6b6c31..73b189c1c0fb 100644
--- a/drivers/iio/imu/adis16400.h
+++ b/drivers/iio/imu/adis16400.h
@@ -139,6 +139,7 @@
139#define ADIS16400_NO_BURST BIT(1) 139#define ADIS16400_NO_BURST BIT(1)
140#define ADIS16400_HAS_SLOW_MODE BIT(2) 140#define ADIS16400_HAS_SLOW_MODE BIT(2)
141#define ADIS16400_HAS_SERIAL_NUMBER BIT(3) 141#define ADIS16400_HAS_SERIAL_NUMBER BIT(3)
142#define ADIS16400_BURST_DIAG_STAT BIT(4)
142 143
143struct adis16400_state; 144struct adis16400_state;
144 145
@@ -165,6 +166,7 @@ struct adis16400_state {
165 int filt_int; 166 int filt_int;
166 167
167 struct adis adis; 168 struct adis adis;
169 unsigned long avail_scan_mask[2];
168}; 170};
169 171
170/* At the moment triggers are only used for ring buffer 172/* At the moment triggers are only used for ring buffer
diff --git a/drivers/iio/imu/adis16400_buffer.c b/drivers/iio/imu/adis16400_buffer.c
index 6e727ffe5262..90c24a23c679 100644
--- a/drivers/iio/imu/adis16400_buffer.c
+++ b/drivers/iio/imu/adis16400_buffer.c
@@ -18,7 +18,8 @@ int adis16400_update_scan_mode(struct iio_dev *indio_dev,
18{ 18{
19 struct adis16400_state *st = iio_priv(indio_dev); 19 struct adis16400_state *st = iio_priv(indio_dev);
20 struct adis *adis = &st->adis; 20 struct adis *adis = &st->adis;
21 uint16_t *tx; 21 unsigned int burst_length;
22 u8 *tx;
22 23
23 if (st->variant->flags & ADIS16400_NO_BURST) 24 if (st->variant->flags & ADIS16400_NO_BURST)
24 return adis_update_scan_mode(indio_dev, scan_mask); 25 return adis_update_scan_mode(indio_dev, scan_mask);
@@ -26,26 +27,29 @@ int adis16400_update_scan_mode(struct iio_dev *indio_dev,
26 kfree(adis->xfer); 27 kfree(adis->xfer);
27 kfree(adis->buffer); 28 kfree(adis->buffer);
28 29
30 /* All but the timestamp channel */
31 burst_length = (indio_dev->num_channels - 1) * sizeof(u16);
32 if (st->variant->flags & ADIS16400_BURST_DIAG_STAT)
33 burst_length += sizeof(u16);
34
29 adis->xfer = kcalloc(2, sizeof(*adis->xfer), GFP_KERNEL); 35 adis->xfer = kcalloc(2, sizeof(*adis->xfer), GFP_KERNEL);
30 if (!adis->xfer) 36 if (!adis->xfer)
31 return -ENOMEM; 37 return -ENOMEM;
32 38
33 adis->buffer = kzalloc(indio_dev->scan_bytes + sizeof(u16), 39 adis->buffer = kzalloc(burst_length + sizeof(u16), GFP_KERNEL);
34 GFP_KERNEL);
35 if (!adis->buffer) 40 if (!adis->buffer)
36 return -ENOMEM; 41 return -ENOMEM;
37 42
38 tx = adis->buffer + indio_dev->scan_bytes; 43 tx = adis->buffer + burst_length;
39
40 tx[0] = ADIS_READ_REG(ADIS16400_GLOB_CMD); 44 tx[0] = ADIS_READ_REG(ADIS16400_GLOB_CMD);
41 tx[1] = 0; 45 tx[1] = 0;
42 46
43 adis->xfer[0].tx_buf = tx; 47 adis->xfer[0].tx_buf = tx;
44 adis->xfer[0].bits_per_word = 8; 48 adis->xfer[0].bits_per_word = 8;
45 adis->xfer[0].len = 2; 49 adis->xfer[0].len = 2;
46 adis->xfer[1].tx_buf = tx; 50 adis->xfer[1].rx_buf = adis->buffer;
47 adis->xfer[1].bits_per_word = 8; 51 adis->xfer[1].bits_per_word = 8;
48 adis->xfer[1].len = indio_dev->scan_bytes; 52 adis->xfer[1].len = burst_length;
49 53
50 spi_message_init(&adis->msg); 54 spi_message_init(&adis->msg);
51 spi_message_add_tail(&adis->xfer[0], &adis->msg); 55 spi_message_add_tail(&adis->xfer[0], &adis->msg);
@@ -61,6 +65,7 @@ irqreturn_t adis16400_trigger_handler(int irq, void *p)
61 struct adis16400_state *st = iio_priv(indio_dev); 65 struct adis16400_state *st = iio_priv(indio_dev);
62 struct adis *adis = &st->adis; 66 struct adis *adis = &st->adis;
63 u32 old_speed_hz = st->adis.spi->max_speed_hz; 67 u32 old_speed_hz = st->adis.spi->max_speed_hz;
68 void *buffer;
64 int ret; 69 int ret;
65 70
66 if (!adis->buffer) 71 if (!adis->buffer)
@@ -81,7 +86,12 @@ irqreturn_t adis16400_trigger_handler(int irq, void *p)
81 spi_setup(st->adis.spi); 86 spi_setup(st->adis.spi);
82 } 87 }
83 88
84 iio_push_to_buffers_with_timestamp(indio_dev, adis->buffer, 89 if (st->variant->flags & ADIS16400_BURST_DIAG_STAT)
90 buffer = adis->buffer + sizeof(u16);
91 else
92 buffer = adis->buffer;
93
94 iio_push_to_buffers_with_timestamp(indio_dev, buffer,
85 pf->timestamp); 95 pf->timestamp);
86 96
87 iio_trigger_notify_done(indio_dev->trig); 97 iio_trigger_notify_done(indio_dev->trig);
diff --git a/drivers/iio/imu/adis16400_core.c b/drivers/iio/imu/adis16400_core.c
index fa795dcd5f75..2fd68f2219a7 100644
--- a/drivers/iio/imu/adis16400_core.c
+++ b/drivers/iio/imu/adis16400_core.c
@@ -405,6 +405,11 @@ static int adis16400_read_raw(struct iio_dev *indio_dev,
405 *val = st->variant->temp_scale_nano / 1000000; 405 *val = st->variant->temp_scale_nano / 1000000;
406 *val2 = (st->variant->temp_scale_nano % 1000000); 406 *val2 = (st->variant->temp_scale_nano % 1000000);
407 return IIO_VAL_INT_PLUS_MICRO; 407 return IIO_VAL_INT_PLUS_MICRO;
408 case IIO_PRESSURE:
409 /* 20 uBar = 0.002kPascal */
410 *val = 0;
411 *val2 = 2000;
412 return IIO_VAL_INT_PLUS_MICRO;
408 default: 413 default:
409 return -EINVAL; 414 return -EINVAL;
410 } 415 }
@@ -454,10 +459,10 @@ static int adis16400_read_raw(struct iio_dev *indio_dev,
454 } 459 }
455} 460}
456 461
457#define ADIS16400_VOLTAGE_CHAN(addr, bits, name, si) { \ 462#define ADIS16400_VOLTAGE_CHAN(addr, bits, name, si, chn) { \
458 .type = IIO_VOLTAGE, \ 463 .type = IIO_VOLTAGE, \
459 .indexed = 1, \ 464 .indexed = 1, \
460 .channel = 0, \ 465 .channel = chn, \
461 .extend_name = name, \ 466 .extend_name = name, \
462 .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \ 467 .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \
463 BIT(IIO_CHAN_INFO_SCALE), \ 468 BIT(IIO_CHAN_INFO_SCALE), \
@@ -474,10 +479,10 @@ static int adis16400_read_raw(struct iio_dev *indio_dev,
474} 479}
475 480
476#define ADIS16400_SUPPLY_CHAN(addr, bits) \ 481#define ADIS16400_SUPPLY_CHAN(addr, bits) \
477 ADIS16400_VOLTAGE_CHAN(addr, bits, "supply", ADIS16400_SCAN_SUPPLY) 482 ADIS16400_VOLTAGE_CHAN(addr, bits, "supply", ADIS16400_SCAN_SUPPLY, 0)
478 483
479#define ADIS16400_AUX_ADC_CHAN(addr, bits) \ 484#define ADIS16400_AUX_ADC_CHAN(addr, bits) \
480 ADIS16400_VOLTAGE_CHAN(addr, bits, NULL, ADIS16400_SCAN_ADC) 485 ADIS16400_VOLTAGE_CHAN(addr, bits, NULL, ADIS16400_SCAN_ADC, 1)
481 486
482#define ADIS16400_GYRO_CHAN(mod, addr, bits) { \ 487#define ADIS16400_GYRO_CHAN(mod, addr, bits) { \
483 .type = IIO_ANGL_VEL, \ 488 .type = IIO_ANGL_VEL, \
@@ -773,7 +778,8 @@ static struct adis16400_chip_info adis16400_chips[] = {
773 .channels = adis16448_channels, 778 .channels = adis16448_channels,
774 .num_channels = ARRAY_SIZE(adis16448_channels), 779 .num_channels = ARRAY_SIZE(adis16448_channels),
775 .flags = ADIS16400_HAS_PROD_ID | 780 .flags = ADIS16400_HAS_PROD_ID |
776 ADIS16400_HAS_SERIAL_NUMBER, 781 ADIS16400_HAS_SERIAL_NUMBER |
782 ADIS16400_BURST_DIAG_STAT,
777 .gyro_scale_micro = IIO_DEGREE_TO_RAD(10000), /* 0.01 deg/s */ 783 .gyro_scale_micro = IIO_DEGREE_TO_RAD(10000), /* 0.01 deg/s */
778 .accel_scale_micro = IIO_G_TO_M_S_2(833), /* 1/1200 g */ 784 .accel_scale_micro = IIO_G_TO_M_S_2(833), /* 1/1200 g */
779 .temp_scale_nano = 73860000, /* 0.07386 C */ 785 .temp_scale_nano = 73860000, /* 0.07386 C */
@@ -791,11 +797,6 @@ static const struct iio_info adis16400_info = {
791 .debugfs_reg_access = adis_debugfs_reg_access, 797 .debugfs_reg_access = adis_debugfs_reg_access,
792}; 798};
793 799
794static const unsigned long adis16400_burst_scan_mask[] = {
795 ~0UL,
796 0,
797};
798
799static const char * const adis16400_status_error_msgs[] = { 800static const char * const adis16400_status_error_msgs[] = {
800 [ADIS16400_DIAG_STAT_ZACCL_FAIL] = "Z-axis accelerometer self-test failure", 801 [ADIS16400_DIAG_STAT_ZACCL_FAIL] = "Z-axis accelerometer self-test failure",
801 [ADIS16400_DIAG_STAT_YACCL_FAIL] = "Y-axis accelerometer self-test failure", 802 [ADIS16400_DIAG_STAT_YACCL_FAIL] = "Y-axis accelerometer self-test failure",
@@ -843,6 +844,20 @@ static const struct adis_data adis16400_data = {
843 BIT(ADIS16400_DIAG_STAT_POWER_LOW), 844 BIT(ADIS16400_DIAG_STAT_POWER_LOW),
844}; 845};
845 846
847static void adis16400_setup_chan_mask(struct adis16400_state *st)
848{
849 const struct adis16400_chip_info *chip_info = st->variant;
850 unsigned i;
851
852 for (i = 0; i < chip_info->num_channels; i++) {
853 const struct iio_chan_spec *ch = &chip_info->channels[i];
854
855 if (ch->scan_index >= 0 &&
856 ch->scan_index != ADIS16400_SCAN_TIMESTAMP)
857 st->avail_scan_mask[0] |= BIT(ch->scan_index);
858 }
859}
860
846static int adis16400_probe(struct spi_device *spi) 861static int adis16400_probe(struct spi_device *spi)
847{ 862{
848 struct adis16400_state *st; 863 struct adis16400_state *st;
@@ -866,8 +881,10 @@ static int adis16400_probe(struct spi_device *spi)
866 indio_dev->info = &adis16400_info; 881 indio_dev->info = &adis16400_info;
867 indio_dev->modes = INDIO_DIRECT_MODE; 882 indio_dev->modes = INDIO_DIRECT_MODE;
868 883
869 if (!(st->variant->flags & ADIS16400_NO_BURST)) 884 if (!(st->variant->flags & ADIS16400_NO_BURST)) {
870 indio_dev->available_scan_masks = adis16400_burst_scan_mask; 885 adis16400_setup_chan_mask(st);
886 indio_dev->available_scan_masks = st->avail_scan_mask;
887 }
871 888
872 ret = adis_init(&st->adis, indio_dev, spi, &adis16400_data); 889 ret = adis_init(&st->adis, indio_dev, spi, &adis16400_data);
873 if (ret) 890 if (ret)
diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c
index 5ff4716b72c3..784b5ecfa849 100644
--- a/drivers/staging/ozwpan/ozhcd.c
+++ b/drivers/staging/ozwpan/ozhcd.c
@@ -746,8 +746,8 @@ void oz_hcd_pd_reset(void *hpd, void *hport)
746/* 746/*
747 * Context: softirq 747 * Context: softirq
748 */ 748 */
749void oz_hcd_get_desc_cnf(void *hport, u8 req_id, int status, const u8 *desc, 749void oz_hcd_get_desc_cnf(void *hport, u8 req_id, u8 status, const u8 *desc,
750 int length, int offset, int total_size) 750 u8 length, u16 offset, u16 total_size)
751{ 751{
752 struct oz_port *port = hport; 752 struct oz_port *port = hport;
753 struct urb *urb; 753 struct urb *urb;
@@ -759,8 +759,8 @@ void oz_hcd_get_desc_cnf(void *hport, u8 req_id, int status, const u8 *desc,
759 if (!urb) 759 if (!urb)
760 return; 760 return;
761 if (status == 0) { 761 if (status == 0) {
762 int copy_len; 762 unsigned int copy_len;
763 int required_size = urb->transfer_buffer_length; 763 unsigned int required_size = urb->transfer_buffer_length;
764 764
765 if (required_size > total_size) 765 if (required_size > total_size)
766 required_size = total_size; 766 required_size = total_size;
diff --git a/drivers/staging/ozwpan/ozusbif.h b/drivers/staging/ozwpan/ozusbif.h
index 4249fa374012..d2a6085345be 100644
--- a/drivers/staging/ozwpan/ozusbif.h
+++ b/drivers/staging/ozwpan/ozusbif.h
@@ -29,8 +29,8 @@ void oz_usb_request_heartbeat(void *hpd);
29 29
30/* Confirmation functions. 30/* Confirmation functions.
31 */ 31 */
32void oz_hcd_get_desc_cnf(void *hport, u8 req_id, int status, 32void oz_hcd_get_desc_cnf(void *hport, u8 req_id, u8 status,
33 const u8 *desc, int length, int offset, int total_size); 33 const u8 *desc, u8 length, u16 offset, u16 total_size);
34void oz_hcd_control_cnf(void *hport, u8 req_id, u8 rcode, 34void oz_hcd_control_cnf(void *hport, u8 req_id, u8 rcode,
35 const u8 *data, int data_len); 35 const u8 *data, int data_len);
36 36
diff --git a/drivers/staging/ozwpan/ozusbsvc1.c b/drivers/staging/ozwpan/ozusbsvc1.c
index d434d8c6fff6..f660bb198c65 100644
--- a/drivers/staging/ozwpan/ozusbsvc1.c
+++ b/drivers/staging/ozwpan/ozusbsvc1.c
@@ -326,7 +326,11 @@ static void oz_usb_handle_ep_data(struct oz_usb_ctx *usb_ctx,
326 struct oz_multiple_fixed *body = 326 struct oz_multiple_fixed *body =
327 (struct oz_multiple_fixed *)data_hdr; 327 (struct oz_multiple_fixed *)data_hdr;
328 u8 *data = body->data; 328 u8 *data = body->data;
329 int n = (len - sizeof(struct oz_multiple_fixed)+1) 329 unsigned int n;
330 if (!body->unit_size ||
331 len < sizeof(struct oz_multiple_fixed) - 1)
332 break;
333 n = (len - (sizeof(struct oz_multiple_fixed) - 1))
330 / body->unit_size; 334 / body->unit_size;
331 while (n--) { 335 while (n--) {
332 oz_hcd_data_ind(usb_ctx->hport, body->endpoint, 336 oz_hcd_data_ind(usb_ctx->hport, body->endpoint,
@@ -390,10 +394,15 @@ void oz_usb_rx(struct oz_pd *pd, struct oz_elt *elt)
390 case OZ_GET_DESC_RSP: { 394 case OZ_GET_DESC_RSP: {
391 struct oz_get_desc_rsp *body = 395 struct oz_get_desc_rsp *body =
392 (struct oz_get_desc_rsp *)usb_hdr; 396 (struct oz_get_desc_rsp *)usb_hdr;
393 int data_len = elt->length - 397 u16 offs, total_size;
394 sizeof(struct oz_get_desc_rsp) + 1; 398 u8 data_len;
395 u16 offs = le16_to_cpu(get_unaligned(&body->offset)); 399
396 u16 total_size = 400 if (elt->length < sizeof(struct oz_get_desc_rsp) - 1)
401 break;
402 data_len = elt->length -
403 (sizeof(struct oz_get_desc_rsp) - 1);
404 offs = le16_to_cpu(get_unaligned(&body->offset));
405 total_size =
397 le16_to_cpu(get_unaligned(&body->total_size)); 406 le16_to_cpu(get_unaligned(&body->total_size));
398 oz_dbg(ON, "USB_REQ_GET_DESCRIPTOR - cnf\n"); 407 oz_dbg(ON, "USB_REQ_GET_DESCRIPTOR - cnf\n");
399 oz_hcd_get_desc_cnf(usb_ctx->hport, body->req_id, 408 oz_hcd_get_desc_cnf(usb_ctx->hport, body->req_id,
diff --git a/drivers/staging/rtl8712/rtl8712_led.c b/drivers/staging/rtl8712/rtl8712_led.c
index f1d47a0676c3..ada8d5dafd49 100644
--- a/drivers/staging/rtl8712/rtl8712_led.c
+++ b/drivers/staging/rtl8712/rtl8712_led.c
@@ -898,11 +898,11 @@ static void SwLedControlMode1(struct _adapter *padapter,
898 IS_LED_WPS_BLINKING(pLed)) 898 IS_LED_WPS_BLINKING(pLed))
899 return; 899 return;
900 if (pLed->bLedLinkBlinkInProgress == true) { 900 if (pLed->bLedLinkBlinkInProgress == true) {
901 del_timer_sync(&pLed->BlinkTimer); 901 del_timer(&pLed->BlinkTimer);
902 pLed->bLedLinkBlinkInProgress = false; 902 pLed->bLedLinkBlinkInProgress = false;
903 } 903 }
904 if (pLed->bLedBlinkInProgress == true) { 904 if (pLed->bLedBlinkInProgress == true) {
905 del_timer_sync(&pLed->BlinkTimer); 905 del_timer(&pLed->BlinkTimer);
906 pLed->bLedBlinkInProgress = false; 906 pLed->bLedBlinkInProgress = false;
907 } 907 }
908 pLed->bLedNoLinkBlinkInProgress = true; 908 pLed->bLedNoLinkBlinkInProgress = true;
@@ -921,11 +921,11 @@ static void SwLedControlMode1(struct _adapter *padapter,
921 IS_LED_WPS_BLINKING(pLed)) 921 IS_LED_WPS_BLINKING(pLed))
922 return; 922 return;
923 if (pLed->bLedNoLinkBlinkInProgress == true) { 923 if (pLed->bLedNoLinkBlinkInProgress == true) {
924 del_timer_sync(&pLed->BlinkTimer); 924 del_timer(&pLed->BlinkTimer);
925 pLed->bLedNoLinkBlinkInProgress = false; 925 pLed->bLedNoLinkBlinkInProgress = false;
926 } 926 }
927 if (pLed->bLedBlinkInProgress == true) { 927 if (pLed->bLedBlinkInProgress == true) {
928 del_timer_sync(&pLed->BlinkTimer); 928 del_timer(&pLed->BlinkTimer);
929 pLed->bLedBlinkInProgress = false; 929 pLed->bLedBlinkInProgress = false;
930 } 930 }
931 pLed->bLedLinkBlinkInProgress = true; 931 pLed->bLedLinkBlinkInProgress = true;
@@ -946,15 +946,15 @@ static void SwLedControlMode1(struct _adapter *padapter,
946 if (IS_LED_WPS_BLINKING(pLed)) 946 if (IS_LED_WPS_BLINKING(pLed))
947 return; 947 return;
948 if (pLed->bLedNoLinkBlinkInProgress == true) { 948 if (pLed->bLedNoLinkBlinkInProgress == true) {
949 del_timer_sync(&pLed->BlinkTimer); 949 del_timer(&pLed->BlinkTimer);
950 pLed->bLedNoLinkBlinkInProgress = false; 950 pLed->bLedNoLinkBlinkInProgress = false;
951 } 951 }
952 if (pLed->bLedLinkBlinkInProgress == true) { 952 if (pLed->bLedLinkBlinkInProgress == true) {
953 del_timer_sync(&pLed->BlinkTimer); 953 del_timer(&pLed->BlinkTimer);
954 pLed->bLedLinkBlinkInProgress = false; 954 pLed->bLedLinkBlinkInProgress = false;
955 } 955 }
956 if (pLed->bLedBlinkInProgress == true) { 956 if (pLed->bLedBlinkInProgress == true) {
957 del_timer_sync(&pLed->BlinkTimer); 957 del_timer(&pLed->BlinkTimer);
958 pLed->bLedBlinkInProgress = false; 958 pLed->bLedBlinkInProgress = false;
959 } 959 }
960 pLed->bLedScanBlinkInProgress = true; 960 pLed->bLedScanBlinkInProgress = true;
@@ -975,11 +975,11 @@ static void SwLedControlMode1(struct _adapter *padapter,
975 IS_LED_WPS_BLINKING(pLed)) 975 IS_LED_WPS_BLINKING(pLed))
976 return; 976 return;
977 if (pLed->bLedNoLinkBlinkInProgress == true) { 977 if (pLed->bLedNoLinkBlinkInProgress == true) {
978 del_timer_sync(&pLed->BlinkTimer); 978 del_timer(&pLed->BlinkTimer);
979 pLed->bLedNoLinkBlinkInProgress = false; 979 pLed->bLedNoLinkBlinkInProgress = false;
980 } 980 }
981 if (pLed->bLedLinkBlinkInProgress == true) { 981 if (pLed->bLedLinkBlinkInProgress == true) {
982 del_timer_sync(&pLed->BlinkTimer); 982 del_timer(&pLed->BlinkTimer);
983 pLed->bLedLinkBlinkInProgress = false; 983 pLed->bLedLinkBlinkInProgress = false;
984 } 984 }
985 pLed->bLedBlinkInProgress = true; 985 pLed->bLedBlinkInProgress = true;
@@ -998,19 +998,19 @@ static void SwLedControlMode1(struct _adapter *padapter,
998 case LED_CTL_START_WPS_BOTTON: 998 case LED_CTL_START_WPS_BOTTON:
999 if (pLed->bLedWPSBlinkInProgress == false) { 999 if (pLed->bLedWPSBlinkInProgress == false) {
1000 if (pLed->bLedNoLinkBlinkInProgress == true) { 1000 if (pLed->bLedNoLinkBlinkInProgress == true) {
1001 del_timer_sync(&pLed->BlinkTimer); 1001 del_timer(&pLed->BlinkTimer);
1002 pLed->bLedNoLinkBlinkInProgress = false; 1002 pLed->bLedNoLinkBlinkInProgress = false;
1003 } 1003 }
1004 if (pLed->bLedLinkBlinkInProgress == true) { 1004 if (pLed->bLedLinkBlinkInProgress == true) {
1005 del_timer_sync(&pLed->BlinkTimer); 1005 del_timer(&pLed->BlinkTimer);
1006 pLed->bLedLinkBlinkInProgress = false; 1006 pLed->bLedLinkBlinkInProgress = false;
1007 } 1007 }
1008 if (pLed->bLedBlinkInProgress == true) { 1008 if (pLed->bLedBlinkInProgress == true) {
1009 del_timer_sync(&pLed->BlinkTimer); 1009 del_timer(&pLed->BlinkTimer);
1010 pLed->bLedBlinkInProgress = false; 1010 pLed->bLedBlinkInProgress = false;
1011 } 1011 }
1012 if (pLed->bLedScanBlinkInProgress == true) { 1012 if (pLed->bLedScanBlinkInProgress == true) {
1013 del_timer_sync(&pLed->BlinkTimer); 1013 del_timer(&pLed->BlinkTimer);
1014 pLed->bLedScanBlinkInProgress = false; 1014 pLed->bLedScanBlinkInProgress = false;
1015 } 1015 }
1016 pLed->bLedWPSBlinkInProgress = true; 1016 pLed->bLedWPSBlinkInProgress = true;
@@ -1025,23 +1025,23 @@ static void SwLedControlMode1(struct _adapter *padapter,
1025 break; 1025 break;
1026 case LED_CTL_STOP_WPS: 1026 case LED_CTL_STOP_WPS:
1027 if (pLed->bLedNoLinkBlinkInProgress == true) { 1027 if (pLed->bLedNoLinkBlinkInProgress == true) {
1028 del_timer_sync(&pLed->BlinkTimer); 1028 del_timer(&pLed->BlinkTimer);
1029 pLed->bLedNoLinkBlinkInProgress = false; 1029 pLed->bLedNoLinkBlinkInProgress = false;
1030 } 1030 }
1031 if (pLed->bLedLinkBlinkInProgress == true) { 1031 if (pLed->bLedLinkBlinkInProgress == true) {
1032 del_timer_sync(&pLed->BlinkTimer); 1032 del_timer(&pLed->BlinkTimer);
1033 pLed->bLedLinkBlinkInProgress = false; 1033 pLed->bLedLinkBlinkInProgress = false;
1034 } 1034 }
1035 if (pLed->bLedBlinkInProgress == true) { 1035 if (pLed->bLedBlinkInProgress == true) {
1036 del_timer_sync(&pLed->BlinkTimer); 1036 del_timer(&pLed->BlinkTimer);
1037 pLed->bLedBlinkInProgress = false; 1037 pLed->bLedBlinkInProgress = false;
1038 } 1038 }
1039 if (pLed->bLedScanBlinkInProgress == true) { 1039 if (pLed->bLedScanBlinkInProgress == true) {
1040 del_timer_sync(&pLed->BlinkTimer); 1040 del_timer(&pLed->BlinkTimer);
1041 pLed->bLedScanBlinkInProgress = false; 1041 pLed->bLedScanBlinkInProgress = false;
1042 } 1042 }
1043 if (pLed->bLedWPSBlinkInProgress) 1043 if (pLed->bLedWPSBlinkInProgress)
1044 del_timer_sync(&pLed->BlinkTimer); 1044 del_timer(&pLed->BlinkTimer);
1045 else 1045 else
1046 pLed->bLedWPSBlinkInProgress = true; 1046 pLed->bLedWPSBlinkInProgress = true;
1047 pLed->CurrLedState = LED_BLINK_WPS_STOP; 1047 pLed->CurrLedState = LED_BLINK_WPS_STOP;
@@ -1057,7 +1057,7 @@ static void SwLedControlMode1(struct _adapter *padapter,
1057 break; 1057 break;
1058 case LED_CTL_STOP_WPS_FAIL: 1058 case LED_CTL_STOP_WPS_FAIL:
1059 if (pLed->bLedWPSBlinkInProgress) { 1059 if (pLed->bLedWPSBlinkInProgress) {
1060 del_timer_sync(&pLed->BlinkTimer); 1060 del_timer(&pLed->BlinkTimer);
1061 pLed->bLedWPSBlinkInProgress = false; 1061 pLed->bLedWPSBlinkInProgress = false;
1062 } 1062 }
1063 pLed->bLedNoLinkBlinkInProgress = true; 1063 pLed->bLedNoLinkBlinkInProgress = true;
@@ -1073,23 +1073,23 @@ static void SwLedControlMode1(struct _adapter *padapter,
1073 pLed->CurrLedState = LED_OFF; 1073 pLed->CurrLedState = LED_OFF;
1074 pLed->BlinkingLedState = LED_OFF; 1074 pLed->BlinkingLedState = LED_OFF;
1075 if (pLed->bLedNoLinkBlinkInProgress) { 1075 if (pLed->bLedNoLinkBlinkInProgress) {
1076 del_timer_sync(&pLed->BlinkTimer); 1076 del_timer(&pLed->BlinkTimer);
1077 pLed->bLedNoLinkBlinkInProgress = false; 1077 pLed->bLedNoLinkBlinkInProgress = false;
1078 } 1078 }
1079 if (pLed->bLedLinkBlinkInProgress) { 1079 if (pLed->bLedLinkBlinkInProgress) {
1080 del_timer_sync(&pLed->BlinkTimer); 1080 del_timer(&pLed->BlinkTimer);
1081 pLed->bLedLinkBlinkInProgress = false; 1081 pLed->bLedLinkBlinkInProgress = false;
1082 } 1082 }
1083 if (pLed->bLedBlinkInProgress) { 1083 if (pLed->bLedBlinkInProgress) {
1084 del_timer_sync(&pLed->BlinkTimer); 1084 del_timer(&pLed->BlinkTimer);
1085 pLed->bLedBlinkInProgress = false; 1085 pLed->bLedBlinkInProgress = false;
1086 } 1086 }
1087 if (pLed->bLedWPSBlinkInProgress) { 1087 if (pLed->bLedWPSBlinkInProgress) {
1088 del_timer_sync(&pLed->BlinkTimer); 1088 del_timer(&pLed->BlinkTimer);
1089 pLed->bLedWPSBlinkInProgress = false; 1089 pLed->bLedWPSBlinkInProgress = false;
1090 } 1090 }
1091 if (pLed->bLedScanBlinkInProgress) { 1091 if (pLed->bLedScanBlinkInProgress) {
1092 del_timer_sync(&pLed->BlinkTimer); 1092 del_timer(&pLed->BlinkTimer);
1093 pLed->bLedScanBlinkInProgress = false; 1093 pLed->bLedScanBlinkInProgress = false;
1094 } 1094 }
1095 mod_timer(&pLed->BlinkTimer, 1095 mod_timer(&pLed->BlinkTimer,
@@ -1116,7 +1116,7 @@ static void SwLedControlMode2(struct _adapter *padapter,
1116 return; 1116 return;
1117 1117
1118 if (pLed->bLedBlinkInProgress == true) { 1118 if (pLed->bLedBlinkInProgress == true) {
1119 del_timer_sync(&pLed->BlinkTimer); 1119 del_timer(&pLed->BlinkTimer);
1120 pLed->bLedBlinkInProgress = false; 1120 pLed->bLedBlinkInProgress = false;
1121 } 1121 }
1122 pLed->bLedScanBlinkInProgress = true; 1122 pLed->bLedScanBlinkInProgress = true;
@@ -1154,11 +1154,11 @@ static void SwLedControlMode2(struct _adapter *padapter,
1154 pLed->CurrLedState = LED_ON; 1154 pLed->CurrLedState = LED_ON;
1155 pLed->BlinkingLedState = LED_ON; 1155 pLed->BlinkingLedState = LED_ON;
1156 if (pLed->bLedBlinkInProgress) { 1156 if (pLed->bLedBlinkInProgress) {
1157 del_timer_sync(&pLed->BlinkTimer); 1157 del_timer(&pLed->BlinkTimer);
1158 pLed->bLedBlinkInProgress = false; 1158 pLed->bLedBlinkInProgress = false;
1159 } 1159 }
1160 if (pLed->bLedScanBlinkInProgress) { 1160 if (pLed->bLedScanBlinkInProgress) {
1161 del_timer_sync(&pLed->BlinkTimer); 1161 del_timer(&pLed->BlinkTimer);
1162 pLed->bLedScanBlinkInProgress = false; 1162 pLed->bLedScanBlinkInProgress = false;
1163 } 1163 }
1164 1164
@@ -1170,11 +1170,11 @@ static void SwLedControlMode2(struct _adapter *padapter,
1170 case LED_CTL_START_WPS_BOTTON: 1170 case LED_CTL_START_WPS_BOTTON:
1171 if (pLed->bLedWPSBlinkInProgress == false) { 1171 if (pLed->bLedWPSBlinkInProgress == false) {
1172 if (pLed->bLedBlinkInProgress == true) { 1172 if (pLed->bLedBlinkInProgress == true) {
1173 del_timer_sync(&pLed->BlinkTimer); 1173 del_timer(&pLed->BlinkTimer);
1174 pLed->bLedBlinkInProgress = false; 1174 pLed->bLedBlinkInProgress = false;
1175 } 1175 }
1176 if (pLed->bLedScanBlinkInProgress == true) { 1176 if (pLed->bLedScanBlinkInProgress == true) {
1177 del_timer_sync(&pLed->BlinkTimer); 1177 del_timer(&pLed->BlinkTimer);
1178 pLed->bLedScanBlinkInProgress = false; 1178 pLed->bLedScanBlinkInProgress = false;
1179 } 1179 }
1180 pLed->bLedWPSBlinkInProgress = true; 1180 pLed->bLedWPSBlinkInProgress = true;
@@ -1214,15 +1214,15 @@ static void SwLedControlMode2(struct _adapter *padapter,
1214 pLed->CurrLedState = LED_OFF; 1214 pLed->CurrLedState = LED_OFF;
1215 pLed->BlinkingLedState = LED_OFF; 1215 pLed->BlinkingLedState = LED_OFF;
1216 if (pLed->bLedBlinkInProgress) { 1216 if (pLed->bLedBlinkInProgress) {
1217 del_timer_sync(&pLed->BlinkTimer); 1217 del_timer(&pLed->BlinkTimer);
1218 pLed->bLedBlinkInProgress = false; 1218 pLed->bLedBlinkInProgress = false;
1219 } 1219 }
1220 if (pLed->bLedScanBlinkInProgress) { 1220 if (pLed->bLedScanBlinkInProgress) {
1221 del_timer_sync(&pLed->BlinkTimer); 1221 del_timer(&pLed->BlinkTimer);
1222 pLed->bLedScanBlinkInProgress = false; 1222 pLed->bLedScanBlinkInProgress = false;
1223 } 1223 }
1224 if (pLed->bLedWPSBlinkInProgress) { 1224 if (pLed->bLedWPSBlinkInProgress) {
1225 del_timer_sync(&pLed->BlinkTimer); 1225 del_timer(&pLed->BlinkTimer);
1226 pLed->bLedWPSBlinkInProgress = false; 1226 pLed->bLedWPSBlinkInProgress = false;
1227 } 1227 }
1228 mod_timer(&pLed->BlinkTimer, 1228 mod_timer(&pLed->BlinkTimer,
@@ -1248,7 +1248,7 @@ static void SwLedControlMode3(struct _adapter *padapter,
1248 if (IS_LED_WPS_BLINKING(pLed)) 1248 if (IS_LED_WPS_BLINKING(pLed))
1249 return; 1249 return;
1250 if (pLed->bLedBlinkInProgress == true) { 1250 if (pLed->bLedBlinkInProgress == true) {
1251 del_timer_sync(&pLed->BlinkTimer); 1251 del_timer(&pLed->BlinkTimer);
1252 pLed->bLedBlinkInProgress = false; 1252 pLed->bLedBlinkInProgress = false;
1253 } 1253 }
1254 pLed->bLedScanBlinkInProgress = true; 1254 pLed->bLedScanBlinkInProgress = true;
@@ -1286,11 +1286,11 @@ static void SwLedControlMode3(struct _adapter *padapter,
1286 pLed->CurrLedState = LED_ON; 1286 pLed->CurrLedState = LED_ON;
1287 pLed->BlinkingLedState = LED_ON; 1287 pLed->BlinkingLedState = LED_ON;
1288 if (pLed->bLedBlinkInProgress) { 1288 if (pLed->bLedBlinkInProgress) {
1289 del_timer_sync(&pLed->BlinkTimer); 1289 del_timer(&pLed->BlinkTimer);
1290 pLed->bLedBlinkInProgress = false; 1290 pLed->bLedBlinkInProgress = false;
1291 } 1291 }
1292 if (pLed->bLedScanBlinkInProgress) { 1292 if (pLed->bLedScanBlinkInProgress) {
1293 del_timer_sync(&pLed->BlinkTimer); 1293 del_timer(&pLed->BlinkTimer);
1294 pLed->bLedScanBlinkInProgress = false; 1294 pLed->bLedScanBlinkInProgress = false;
1295 } 1295 }
1296 mod_timer(&pLed->BlinkTimer, 1296 mod_timer(&pLed->BlinkTimer,
@@ -1300,11 +1300,11 @@ static void SwLedControlMode3(struct _adapter *padapter,
1300 case LED_CTL_START_WPS_BOTTON: 1300 case LED_CTL_START_WPS_BOTTON:
1301 if (pLed->bLedWPSBlinkInProgress == false) { 1301 if (pLed->bLedWPSBlinkInProgress == false) {
1302 if (pLed->bLedBlinkInProgress == true) { 1302 if (pLed->bLedBlinkInProgress == true) {
1303 del_timer_sync(&pLed->BlinkTimer); 1303 del_timer(&pLed->BlinkTimer);
1304 pLed->bLedBlinkInProgress = false; 1304 pLed->bLedBlinkInProgress = false;
1305 } 1305 }
1306 if (pLed->bLedScanBlinkInProgress == true) { 1306 if (pLed->bLedScanBlinkInProgress == true) {
1307 del_timer_sync(&pLed->BlinkTimer); 1307 del_timer(&pLed->BlinkTimer);
1308 pLed->bLedScanBlinkInProgress = false; 1308 pLed->bLedScanBlinkInProgress = false;
1309 } 1309 }
1310 pLed->bLedWPSBlinkInProgress = true; 1310 pLed->bLedWPSBlinkInProgress = true;
@@ -1319,7 +1319,7 @@ static void SwLedControlMode3(struct _adapter *padapter,
1319 break; 1319 break;
1320 case LED_CTL_STOP_WPS: 1320 case LED_CTL_STOP_WPS:
1321 if (pLed->bLedWPSBlinkInProgress) { 1321 if (pLed->bLedWPSBlinkInProgress) {
1322 del_timer_sync(&(pLed->BlinkTimer)); 1322 del_timer(&pLed->BlinkTimer);
1323 pLed->bLedWPSBlinkInProgress = false; 1323 pLed->bLedWPSBlinkInProgress = false;
1324 } else 1324 } else
1325 pLed->bLedWPSBlinkInProgress = true; 1325 pLed->bLedWPSBlinkInProgress = true;
@@ -1336,7 +1336,7 @@ static void SwLedControlMode3(struct _adapter *padapter,
1336 break; 1336 break;
1337 case LED_CTL_STOP_WPS_FAIL: 1337 case LED_CTL_STOP_WPS_FAIL:
1338 if (pLed->bLedWPSBlinkInProgress) { 1338 if (pLed->bLedWPSBlinkInProgress) {
1339 del_timer_sync(&pLed->BlinkTimer); 1339 del_timer(&pLed->BlinkTimer);
1340 pLed->bLedWPSBlinkInProgress = false; 1340 pLed->bLedWPSBlinkInProgress = false;
1341 } 1341 }
1342 pLed->CurrLedState = LED_OFF; 1342 pLed->CurrLedState = LED_OFF;
@@ -1357,15 +1357,15 @@ static void SwLedControlMode3(struct _adapter *padapter,
1357 pLed->CurrLedState = LED_OFF; 1357 pLed->CurrLedState = LED_OFF;
1358 pLed->BlinkingLedState = LED_OFF; 1358 pLed->BlinkingLedState = LED_OFF;
1359 if (pLed->bLedBlinkInProgress) { 1359 if (pLed->bLedBlinkInProgress) {
1360 del_timer_sync(&pLed->BlinkTimer); 1360 del_timer(&pLed->BlinkTimer);
1361 pLed->bLedBlinkInProgress = false; 1361 pLed->bLedBlinkInProgress = false;
1362 } 1362 }
1363 if (pLed->bLedScanBlinkInProgress) { 1363 if (pLed->bLedScanBlinkInProgress) {
1364 del_timer_sync(&pLed->BlinkTimer); 1364 del_timer(&pLed->BlinkTimer);
1365 pLed->bLedScanBlinkInProgress = false; 1365 pLed->bLedScanBlinkInProgress = false;
1366 } 1366 }
1367 if (pLed->bLedWPSBlinkInProgress) { 1367 if (pLed->bLedWPSBlinkInProgress) {
1368 del_timer_sync(&pLed->BlinkTimer); 1368 del_timer(&pLed->BlinkTimer);
1369 pLed->bLedWPSBlinkInProgress = false; 1369 pLed->bLedWPSBlinkInProgress = false;
1370 } 1370 }
1371 mod_timer(&pLed->BlinkTimer, 1371 mod_timer(&pLed->BlinkTimer,
@@ -1388,7 +1388,7 @@ static void SwLedControlMode4(struct _adapter *padapter,
1388 case LED_CTL_START_TO_LINK: 1388 case LED_CTL_START_TO_LINK:
1389 if (pLed1->bLedWPSBlinkInProgress) { 1389 if (pLed1->bLedWPSBlinkInProgress) {
1390 pLed1->bLedWPSBlinkInProgress = false; 1390 pLed1->bLedWPSBlinkInProgress = false;
1391 del_timer_sync(&pLed1->BlinkTimer); 1391 del_timer(&pLed1->BlinkTimer);
1392 pLed1->BlinkingLedState = LED_OFF; 1392 pLed1->BlinkingLedState = LED_OFF;
1393 pLed1->CurrLedState = LED_OFF; 1393 pLed1->CurrLedState = LED_OFF;
1394 if (pLed1->bLedOn) 1394 if (pLed1->bLedOn)
@@ -1400,11 +1400,11 @@ static void SwLedControlMode4(struct _adapter *padapter,
1400 IS_LED_WPS_BLINKING(pLed)) 1400 IS_LED_WPS_BLINKING(pLed))
1401 return; 1401 return;
1402 if (pLed->bLedBlinkInProgress == true) { 1402 if (pLed->bLedBlinkInProgress == true) {
1403 del_timer_sync(&pLed->BlinkTimer); 1403 del_timer(&pLed->BlinkTimer);
1404 pLed->bLedBlinkInProgress = false; 1404 pLed->bLedBlinkInProgress = false;
1405 } 1405 }
1406 if (pLed->bLedNoLinkBlinkInProgress == true) { 1406 if (pLed->bLedNoLinkBlinkInProgress == true) {
1407 del_timer_sync(&pLed->BlinkTimer); 1407 del_timer(&pLed->BlinkTimer);
1408 pLed->bLedNoLinkBlinkInProgress = false; 1408 pLed->bLedNoLinkBlinkInProgress = false;
1409 } 1409 }
1410 pLed->bLedStartToLinkBlinkInProgress = true; 1410 pLed->bLedStartToLinkBlinkInProgress = true;
@@ -1426,7 +1426,7 @@ static void SwLedControlMode4(struct _adapter *padapter,
1426 if (LedAction == LED_CTL_LINK) { 1426 if (LedAction == LED_CTL_LINK) {
1427 if (pLed1->bLedWPSBlinkInProgress) { 1427 if (pLed1->bLedWPSBlinkInProgress) {
1428 pLed1->bLedWPSBlinkInProgress = false; 1428 pLed1->bLedWPSBlinkInProgress = false;
1429 del_timer_sync(&pLed1->BlinkTimer); 1429 del_timer(&pLed1->BlinkTimer);
1430 pLed1->BlinkingLedState = LED_OFF; 1430 pLed1->BlinkingLedState = LED_OFF;
1431 pLed1->CurrLedState = LED_OFF; 1431 pLed1->CurrLedState = LED_OFF;
1432 if (pLed1->bLedOn) 1432 if (pLed1->bLedOn)
@@ -1439,7 +1439,7 @@ static void SwLedControlMode4(struct _adapter *padapter,
1439 IS_LED_WPS_BLINKING(pLed)) 1439 IS_LED_WPS_BLINKING(pLed))
1440 return; 1440 return;
1441 if (pLed->bLedBlinkInProgress == true) { 1441 if (pLed->bLedBlinkInProgress == true) {
1442 del_timer_sync(&pLed->BlinkTimer); 1442 del_timer(&pLed->BlinkTimer);
1443 pLed->bLedBlinkInProgress = false; 1443 pLed->bLedBlinkInProgress = false;
1444 } 1444 }
1445 pLed->bLedNoLinkBlinkInProgress = true; 1445 pLed->bLedNoLinkBlinkInProgress = true;
@@ -1460,11 +1460,11 @@ static void SwLedControlMode4(struct _adapter *padapter,
1460 if (IS_LED_WPS_BLINKING(pLed)) 1460 if (IS_LED_WPS_BLINKING(pLed))
1461 return; 1461 return;
1462 if (pLed->bLedNoLinkBlinkInProgress == true) { 1462 if (pLed->bLedNoLinkBlinkInProgress == true) {
1463 del_timer_sync(&pLed->BlinkTimer); 1463 del_timer(&pLed->BlinkTimer);
1464 pLed->bLedNoLinkBlinkInProgress = false; 1464 pLed->bLedNoLinkBlinkInProgress = false;
1465 } 1465 }
1466 if (pLed->bLedBlinkInProgress == true) { 1466 if (pLed->bLedBlinkInProgress == true) {
1467 del_timer_sync(&pLed->BlinkTimer); 1467 del_timer(&pLed->BlinkTimer);
1468 pLed->bLedBlinkInProgress = false; 1468 pLed->bLedBlinkInProgress = false;
1469 } 1469 }
1470 pLed->bLedScanBlinkInProgress = true; 1470 pLed->bLedScanBlinkInProgress = true;
@@ -1485,7 +1485,7 @@ static void SwLedControlMode4(struct _adapter *padapter,
1485 IS_LED_WPS_BLINKING(pLed)) 1485 IS_LED_WPS_BLINKING(pLed))
1486 return; 1486 return;
1487 if (pLed->bLedNoLinkBlinkInProgress == true) { 1487 if (pLed->bLedNoLinkBlinkInProgress == true) {
1488 del_timer_sync(&pLed->BlinkTimer); 1488 del_timer(&pLed->BlinkTimer);
1489 pLed->bLedNoLinkBlinkInProgress = false; 1489 pLed->bLedNoLinkBlinkInProgress = false;
1490 } 1490 }
1491 pLed->bLedBlinkInProgress = true; 1491 pLed->bLedBlinkInProgress = true;
@@ -1503,7 +1503,7 @@ static void SwLedControlMode4(struct _adapter *padapter,
1503 case LED_CTL_START_WPS_BOTTON: 1503 case LED_CTL_START_WPS_BOTTON:
1504 if (pLed1->bLedWPSBlinkInProgress) { 1504 if (pLed1->bLedWPSBlinkInProgress) {
1505 pLed1->bLedWPSBlinkInProgress = false; 1505 pLed1->bLedWPSBlinkInProgress = false;
1506 del_timer_sync(&(pLed1->BlinkTimer)); 1506 del_timer(&pLed1->BlinkTimer);
1507 pLed1->BlinkingLedState = LED_OFF; 1507 pLed1->BlinkingLedState = LED_OFF;
1508 pLed1->CurrLedState = LED_OFF; 1508 pLed1->CurrLedState = LED_OFF;
1509 if (pLed1->bLedOn) 1509 if (pLed1->bLedOn)
@@ -1512,15 +1512,15 @@ static void SwLedControlMode4(struct _adapter *padapter,
1512 } 1512 }
1513 if (pLed->bLedWPSBlinkInProgress == false) { 1513 if (pLed->bLedWPSBlinkInProgress == false) {
1514 if (pLed->bLedNoLinkBlinkInProgress == true) { 1514 if (pLed->bLedNoLinkBlinkInProgress == true) {
1515 del_timer_sync(&pLed->BlinkTimer); 1515 del_timer(&pLed->BlinkTimer);
1516 pLed->bLedNoLinkBlinkInProgress = false; 1516 pLed->bLedNoLinkBlinkInProgress = false;
1517 } 1517 }
1518 if (pLed->bLedBlinkInProgress == true) { 1518 if (pLed->bLedBlinkInProgress == true) {
1519 del_timer_sync(&pLed->BlinkTimer); 1519 del_timer(&pLed->BlinkTimer);
1520 pLed->bLedBlinkInProgress = false; 1520 pLed->bLedBlinkInProgress = false;
1521 } 1521 }
1522 if (pLed->bLedScanBlinkInProgress == true) { 1522 if (pLed->bLedScanBlinkInProgress == true) {
1523 del_timer_sync(&pLed->BlinkTimer); 1523 del_timer(&pLed->BlinkTimer);
1524 pLed->bLedScanBlinkInProgress = false; 1524 pLed->bLedScanBlinkInProgress = false;
1525 } 1525 }
1526 pLed->bLedWPSBlinkInProgress = true; 1526 pLed->bLedWPSBlinkInProgress = true;
@@ -1538,7 +1538,7 @@ static void SwLedControlMode4(struct _adapter *padapter,
1538 break; 1538 break;
1539 case LED_CTL_STOP_WPS: /*WPS connect success*/ 1539 case LED_CTL_STOP_WPS: /*WPS connect success*/
1540 if (pLed->bLedWPSBlinkInProgress) { 1540 if (pLed->bLedWPSBlinkInProgress) {
1541 del_timer_sync(&pLed->BlinkTimer); 1541 del_timer(&pLed->BlinkTimer);
1542 pLed->bLedWPSBlinkInProgress = false; 1542 pLed->bLedWPSBlinkInProgress = false;
1543 } 1543 }
1544 pLed->bLedNoLinkBlinkInProgress = true; 1544 pLed->bLedNoLinkBlinkInProgress = true;
@@ -1552,7 +1552,7 @@ static void SwLedControlMode4(struct _adapter *padapter,
1552 break; 1552 break;
1553 case LED_CTL_STOP_WPS_FAIL: /*WPS authentication fail*/ 1553 case LED_CTL_STOP_WPS_FAIL: /*WPS authentication fail*/
1554 if (pLed->bLedWPSBlinkInProgress) { 1554 if (pLed->bLedWPSBlinkInProgress) {
1555 del_timer_sync(&pLed->BlinkTimer); 1555 del_timer(&pLed->BlinkTimer);
1556 pLed->bLedWPSBlinkInProgress = false; 1556 pLed->bLedWPSBlinkInProgress = false;
1557 } 1557 }
1558 pLed->bLedNoLinkBlinkInProgress = true; 1558 pLed->bLedNoLinkBlinkInProgress = true;
@@ -1565,7 +1565,7 @@ static void SwLedControlMode4(struct _adapter *padapter,
1565 msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA)); 1565 msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA));
1566 /*LED1 settings*/ 1566 /*LED1 settings*/
1567 if (pLed1->bLedWPSBlinkInProgress) 1567 if (pLed1->bLedWPSBlinkInProgress)
1568 del_timer_sync(&pLed1->BlinkTimer); 1568 del_timer(&pLed1->BlinkTimer);
1569 else 1569 else
1570 pLed1->bLedWPSBlinkInProgress = true; 1570 pLed1->bLedWPSBlinkInProgress = true;
1571 pLed1->CurrLedState = LED_BLINK_WPS_STOP; 1571 pLed1->CurrLedState = LED_BLINK_WPS_STOP;
@@ -1578,7 +1578,7 @@ static void SwLedControlMode4(struct _adapter *padapter,
1578 break; 1578 break;
1579 case LED_CTL_STOP_WPS_FAIL_OVERLAP: /*WPS session overlap*/ 1579 case LED_CTL_STOP_WPS_FAIL_OVERLAP: /*WPS session overlap*/
1580 if (pLed->bLedWPSBlinkInProgress) { 1580 if (pLed->bLedWPSBlinkInProgress) {
1581 del_timer_sync(&pLed->BlinkTimer); 1581 del_timer(&pLed->BlinkTimer);
1582 pLed->bLedWPSBlinkInProgress = false; 1582 pLed->bLedWPSBlinkInProgress = false;
1583 } 1583 }
1584 pLed->bLedNoLinkBlinkInProgress = true; 1584 pLed->bLedNoLinkBlinkInProgress = true;
@@ -1591,7 +1591,7 @@ static void SwLedControlMode4(struct _adapter *padapter,
1591 msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA)); 1591 msecs_to_jiffies(LED_BLINK_NO_LINK_INTERVAL_ALPHA));
1592 /*LED1 settings*/ 1592 /*LED1 settings*/
1593 if (pLed1->bLedWPSBlinkInProgress) 1593 if (pLed1->bLedWPSBlinkInProgress)
1594 del_timer_sync(&pLed1->BlinkTimer); 1594 del_timer(&pLed1->BlinkTimer);
1595 else 1595 else
1596 pLed1->bLedWPSBlinkInProgress = true; 1596 pLed1->bLedWPSBlinkInProgress = true;
1597 pLed1->CurrLedState = LED_BLINK_WPS_STOP_OVERLAP; 1597 pLed1->CurrLedState = LED_BLINK_WPS_STOP_OVERLAP;
@@ -1607,31 +1607,31 @@ static void SwLedControlMode4(struct _adapter *padapter,
1607 pLed->CurrLedState = LED_OFF; 1607 pLed->CurrLedState = LED_OFF;
1608 pLed->BlinkingLedState = LED_OFF; 1608 pLed->BlinkingLedState = LED_OFF;
1609 if (pLed->bLedNoLinkBlinkInProgress) { 1609 if (pLed->bLedNoLinkBlinkInProgress) {
1610 del_timer_sync(&pLed->BlinkTimer); 1610 del_timer(&pLed->BlinkTimer);
1611 pLed->bLedNoLinkBlinkInProgress = false; 1611 pLed->bLedNoLinkBlinkInProgress = false;
1612 } 1612 }
1613 if (pLed->bLedLinkBlinkInProgress) { 1613 if (pLed->bLedLinkBlinkInProgress) {
1614 del_timer_sync(&pLed->BlinkTimer); 1614 del_timer(&pLed->BlinkTimer);
1615 pLed->bLedLinkBlinkInProgress = false; 1615 pLed->bLedLinkBlinkInProgress = false;
1616 } 1616 }
1617 if (pLed->bLedBlinkInProgress) { 1617 if (pLed->bLedBlinkInProgress) {
1618 del_timer_sync(&pLed->BlinkTimer); 1618 del_timer(&pLed->BlinkTimer);
1619 pLed->bLedBlinkInProgress = false; 1619 pLed->bLedBlinkInProgress = false;
1620 } 1620 }
1621 if (pLed->bLedWPSBlinkInProgress) { 1621 if (pLed->bLedWPSBlinkInProgress) {
1622 del_timer_sync(&pLed->BlinkTimer); 1622 del_timer(&pLed->BlinkTimer);
1623 pLed->bLedWPSBlinkInProgress = false; 1623 pLed->bLedWPSBlinkInProgress = false;
1624 } 1624 }
1625 if (pLed->bLedScanBlinkInProgress) { 1625 if (pLed->bLedScanBlinkInProgress) {
1626 del_timer_sync(&pLed->BlinkTimer); 1626 del_timer(&pLed->BlinkTimer);
1627 pLed->bLedScanBlinkInProgress = false; 1627 pLed->bLedScanBlinkInProgress = false;
1628 } 1628 }
1629 if (pLed->bLedStartToLinkBlinkInProgress) { 1629 if (pLed->bLedStartToLinkBlinkInProgress) {
1630 del_timer_sync(&pLed->BlinkTimer); 1630 del_timer(&pLed->BlinkTimer);
1631 pLed->bLedStartToLinkBlinkInProgress = false; 1631 pLed->bLedStartToLinkBlinkInProgress = false;
1632 } 1632 }
1633 if (pLed1->bLedWPSBlinkInProgress) { 1633 if (pLed1->bLedWPSBlinkInProgress) {
1634 del_timer_sync(&pLed1->BlinkTimer); 1634 del_timer(&pLed1->BlinkTimer);
1635 pLed1->bLedWPSBlinkInProgress = false; 1635 pLed1->bLedWPSBlinkInProgress = false;
1636 } 1636 }
1637 pLed1->BlinkingLedState = LED_UNKNOWN; 1637 pLed1->BlinkingLedState = LED_UNKNOWN;
@@ -1671,7 +1671,7 @@ static void SwLedControlMode5(struct _adapter *padapter,
1671 ; /* dummy branch */ 1671 ; /* dummy branch */
1672 else if (pLed->bLedScanBlinkInProgress == false) { 1672 else if (pLed->bLedScanBlinkInProgress == false) {
1673 if (pLed->bLedBlinkInProgress == true) { 1673 if (pLed->bLedBlinkInProgress == true) {
1674 del_timer_sync(&pLed->BlinkTimer); 1674 del_timer(&pLed->BlinkTimer);
1675 pLed->bLedBlinkInProgress = false; 1675 pLed->bLedBlinkInProgress = false;
1676 } 1676 }
1677 pLed->bLedScanBlinkInProgress = true; 1677 pLed->bLedScanBlinkInProgress = true;
@@ -1705,7 +1705,7 @@ static void SwLedControlMode5(struct _adapter *padapter,
1705 pLed->CurrLedState = LED_OFF; 1705 pLed->CurrLedState = LED_OFF;
1706 pLed->BlinkingLedState = LED_OFF; 1706 pLed->BlinkingLedState = LED_OFF;
1707 if (pLed->bLedBlinkInProgress) { 1707 if (pLed->bLedBlinkInProgress) {
1708 del_timer_sync(&pLed->BlinkTimer); 1708 del_timer(&pLed->BlinkTimer);
1709 pLed->bLedBlinkInProgress = false; 1709 pLed->bLedBlinkInProgress = false;
1710 } 1710 }
1711 SwLedOff(padapter, pLed); 1711 SwLedOff(padapter, pLed);
@@ -1756,7 +1756,7 @@ static void SwLedControlMode6(struct _adapter *padapter,
1756 case LED_CTL_START_WPS_BOTTON: 1756 case LED_CTL_START_WPS_BOTTON:
1757 if (pLed->bLedWPSBlinkInProgress == false) { 1757 if (pLed->bLedWPSBlinkInProgress == false) {
1758 if (pLed->bLedBlinkInProgress == true) { 1758 if (pLed->bLedBlinkInProgress == true) {
1759 del_timer_sync(&pLed->BlinkTimer); 1759 del_timer(&pLed->BlinkTimer);
1760 pLed->bLedBlinkInProgress = false; 1760 pLed->bLedBlinkInProgress = false;
1761 } 1761 }
1762 pLed->bLedWPSBlinkInProgress = true; 1762 pLed->bLedWPSBlinkInProgress = true;
@@ -1772,7 +1772,7 @@ static void SwLedControlMode6(struct _adapter *padapter,
1772 case LED_CTL_STOP_WPS_FAIL: 1772 case LED_CTL_STOP_WPS_FAIL:
1773 case LED_CTL_STOP_WPS: 1773 case LED_CTL_STOP_WPS:
1774 if (pLed->bLedWPSBlinkInProgress) { 1774 if (pLed->bLedWPSBlinkInProgress) {
1775 del_timer_sync(&pLed->BlinkTimer); 1775 del_timer(&pLed->BlinkTimer);
1776 pLed->bLedWPSBlinkInProgress = false; 1776 pLed->bLedWPSBlinkInProgress = false;
1777 } 1777 }
1778 pLed->CurrLedState = LED_ON; 1778 pLed->CurrLedState = LED_ON;
@@ -1784,11 +1784,11 @@ static void SwLedControlMode6(struct _adapter *padapter,
1784 pLed->CurrLedState = LED_OFF; 1784 pLed->CurrLedState = LED_OFF;
1785 pLed->BlinkingLedState = LED_OFF; 1785 pLed->BlinkingLedState = LED_OFF;
1786 if (pLed->bLedBlinkInProgress) { 1786 if (pLed->bLedBlinkInProgress) {
1787 del_timer_sync(&pLed->BlinkTimer); 1787 del_timer(&pLed->BlinkTimer);
1788 pLed->bLedBlinkInProgress = false; 1788 pLed->bLedBlinkInProgress = false;
1789 } 1789 }
1790 if (pLed->bLedWPSBlinkInProgress) { 1790 if (pLed->bLedWPSBlinkInProgress) {
1791 del_timer_sync(&pLed->BlinkTimer); 1791 del_timer(&pLed->BlinkTimer);
1792 pLed->bLedWPSBlinkInProgress = false; 1792 pLed->bLedWPSBlinkInProgress = false;
1793 } 1793 }
1794 SwLedOff(padapter, pLed); 1794 SwLedOff(padapter, pLed);
diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c b/drivers/staging/rtl8712/rtl871x_cmd.c
index 1a1c38f885d6..e35854d28f90 100644
--- a/drivers/staging/rtl8712/rtl871x_cmd.c
+++ b/drivers/staging/rtl8712/rtl871x_cmd.c
@@ -910,7 +910,7 @@ void r8712_createbss_cmd_callback(struct _adapter *padapter,
910 if (pcmd->res != H2C_SUCCESS) 910 if (pcmd->res != H2C_SUCCESS)
911 mod_timer(&pmlmepriv->assoc_timer, 911 mod_timer(&pmlmepriv->assoc_timer,
912 jiffies + msecs_to_jiffies(1)); 912 jiffies + msecs_to_jiffies(1));
913 del_timer_sync(&pmlmepriv->assoc_timer); 913 del_timer(&pmlmepriv->assoc_timer);
914#ifdef __BIG_ENDIAN 914#ifdef __BIG_ENDIAN
915 /* endian_convert */ 915 /* endian_convert */
916 pnetwork->Length = le32_to_cpu(pnetwork->Length); 916 pnetwork->Length = le32_to_cpu(pnetwork->Length);
diff --git a/drivers/staging/rtl8712/rtl871x_mlme.c b/drivers/staging/rtl8712/rtl871x_mlme.c
index fb2b195b90af..c044b0e55ba9 100644
--- a/drivers/staging/rtl8712/rtl871x_mlme.c
+++ b/drivers/staging/rtl8712/rtl871x_mlme.c
@@ -582,7 +582,7 @@ void r8712_surveydone_event_callback(struct _adapter *adapter, u8 *pbuf)
582 spin_lock_irqsave(&pmlmepriv->lock, irqL); 582 spin_lock_irqsave(&pmlmepriv->lock, irqL);
583 583
584 if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) { 584 if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) {
585 del_timer_sync(&pmlmepriv->scan_to_timer); 585 del_timer(&pmlmepriv->scan_to_timer);
586 586
587 _clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY); 587 _clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY);
588 } 588 }
@@ -696,7 +696,7 @@ void r8712_ind_disconnect(struct _adapter *padapter)
696 } 696 }
697 if (padapter->pwrctrlpriv.pwr_mode != 697 if (padapter->pwrctrlpriv.pwr_mode !=
698 padapter->registrypriv.power_mgnt) { 698 padapter->registrypriv.power_mgnt) {
699 del_timer_sync(&pmlmepriv->dhcp_timer); 699 del_timer(&pmlmepriv->dhcp_timer);
700 r8712_set_ps_mode(padapter, padapter->registrypriv.power_mgnt, 700 r8712_set_ps_mode(padapter, padapter->registrypriv.power_mgnt,
701 padapter->registrypriv.smart_ps); 701 padapter->registrypriv.smart_ps);
702 } 702 }
@@ -910,7 +910,7 @@ void r8712_joinbss_event_callback(struct _adapter *adapter, u8 *pbuf)
910 if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) 910 if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)
911 == true) 911 == true)
912 r8712_indicate_connect(adapter); 912 r8712_indicate_connect(adapter);
913 del_timer_sync(&pmlmepriv->assoc_timer); 913 del_timer(&pmlmepriv->assoc_timer);
914 } else 914 } else
915 goto ignore_joinbss_callback; 915 goto ignore_joinbss_callback;
916 } else { 916 } else {
diff --git a/drivers/staging/rtl8712/rtl871x_pwrctrl.c b/drivers/staging/rtl8712/rtl871x_pwrctrl.c
index aaa584435c87..9bc04f474d18 100644
--- a/drivers/staging/rtl8712/rtl871x_pwrctrl.c
+++ b/drivers/staging/rtl8712/rtl871x_pwrctrl.c
@@ -103,7 +103,7 @@ void r8712_cpwm_int_hdl(struct _adapter *padapter,
103 103
104 if (pwrpriv->cpwm_tog == ((preportpwrstate->state) & 0x80)) 104 if (pwrpriv->cpwm_tog == ((preportpwrstate->state) & 0x80))
105 return; 105 return;
106 del_timer_sync(&padapter->pwrctrlpriv.rpwm_check_timer); 106 del_timer(&padapter->pwrctrlpriv.rpwm_check_timer);
107 _enter_pwrlock(&pwrpriv->lock); 107 _enter_pwrlock(&pwrpriv->lock);
108 pwrpriv->cpwm = (preportpwrstate->state) & 0xf; 108 pwrpriv->cpwm = (preportpwrstate->state) & 0xf;
109 if (pwrpriv->cpwm >= PS_STATE_S2) { 109 if (pwrpriv->cpwm >= PS_STATE_S2) {
diff --git a/drivers/staging/rtl8712/rtl871x_sta_mgt.c b/drivers/staging/rtl8712/rtl871x_sta_mgt.c
index 7bb96c47f188..a9b93d0f6f56 100644
--- a/drivers/staging/rtl8712/rtl871x_sta_mgt.c
+++ b/drivers/staging/rtl8712/rtl871x_sta_mgt.c
@@ -198,7 +198,7 @@ void r8712_free_stainfo(struct _adapter *padapter, struct sta_info *psta)
198 * cancel reordering_ctrl_timer */ 198 * cancel reordering_ctrl_timer */
199 for (i = 0; i < 16; i++) { 199 for (i = 0; i < 16; i++) {
200 preorder_ctrl = &psta->recvreorder_ctrl[i]; 200 preorder_ctrl = &psta->recvreorder_ctrl[i];
201 del_timer_sync(&preorder_ctrl->reordering_ctrl_timer); 201 del_timer(&preorder_ctrl->reordering_ctrl_timer);
202 } 202 }
203 spin_lock(&(pfree_sta_queue->lock)); 203 spin_lock(&(pfree_sta_queue->lock));
204 /* insert into free_sta_queue; 20061114 */ 204 /* insert into free_sta_queue; 20061114 */