Re: [PATCH] b43: Leds spinlock SMP compilefix

2007-10-03 Thread Michael Buesch
On Tuesday 02 October 2007 22:20:53 John W. Linville wrote:
> I'll just roll this into the "b43: LED triggers support" patch.

Yep, thanks a lot.

-- 
Greetings Michael.
___
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev


Re: [PATCH] b43: Leds spinlock SMP compilefix

2007-10-03 Thread John W. Linville
I'll just roll this into the "b43: LED triggers support" patch.

Thanks,

John

On Sun, Sep 30, 2007 at 12:04:36AM +0200, Michael Buesch wrote:
> This was missing an address operator.
> 
> Signed-off-by: Michael Buesch <[EMAIL PROTECTED]>
> 
> Index: wireless-2.6/drivers/net/wireless/b43/leds.c
> ===
> --- wireless-2.6.orig/drivers/net/wireless/b43/leds.c 2007-09-29 
> 12:44:08.0 +0200
> +++ wireless-2.6/drivers/net/wireless/b43/leds.c  2007-09-30 
> 00:02:18.0 +0200
> @@ -37,14 +37,14 @@ static void b43_led_turn_on(struct b43_w
>   unsigned long flags;
>   u16 ctl;
>  
> - spin_lock_irqsave(wl->leds_lock, flags);
> + spin_lock_irqsave(&wl->leds_lock, flags);
>   ctl = b43_read16(dev, B43_MMIO_GPIO_CONTROL);
>   if (activelow)
>   ctl &= ~(1 << led_index);
>   else
>   ctl |= (1 << led_index);
>   b43_write16(dev, B43_MMIO_GPIO_CONTROL, ctl);
> - spin_unlock_irqrestore(wl->leds_lock, flags);
> + spin_unlock_irqrestore(&wl->leds_lock, flags);
>  }
>  
>  static void b43_led_turn_off(struct b43_wldev *dev, u8 led_index,
> @@ -54,14 +54,14 @@ static void b43_led_turn_off(struct b43_
>   unsigned long flags;
>   u16 ctl;
>  
> - spin_lock_irqsave(wl->leds_lock, flags);
> + spin_lock_irqsave(&wl->leds_lock, flags);
>   ctl = b43_read16(dev, B43_MMIO_GPIO_CONTROL);
>   if (activelow)
>   ctl |= (1 << led_index);
>   else
>   ctl &= ~(1 << led_index);
>   b43_write16(dev, B43_MMIO_GPIO_CONTROL, ctl);
> - spin_unlock_irqrestore(wl->leds_lock, flags);
> + spin_unlock_irqrestore(&wl->leds_lock, flags);
>  }
>  
>  /* Callback from the LED subsystem. */

-- 
John W. Linville
[EMAIL PROTECTED]
___
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev


[PATCH] b43: Leds spinlock SMP compilefix

2007-10-03 Thread Michael Buesch
This was missing an address operator.

Signed-off-by: Michael Buesch <[EMAIL PROTECTED]>

Index: wireless-2.6/drivers/net/wireless/b43/leds.c
===
--- wireless-2.6.orig/drivers/net/wireless/b43/leds.c   2007-09-29 
12:44:08.0 +0200
+++ wireless-2.6/drivers/net/wireless/b43/leds.c2007-09-30 
00:02:18.0 +0200
@@ -37,14 +37,14 @@ static void b43_led_turn_on(struct b43_w
unsigned long flags;
u16 ctl;
 
-   spin_lock_irqsave(wl->leds_lock, flags);
+   spin_lock_irqsave(&wl->leds_lock, flags);
ctl = b43_read16(dev, B43_MMIO_GPIO_CONTROL);
if (activelow)
ctl &= ~(1 << led_index);
else
ctl |= (1 << led_index);
b43_write16(dev, B43_MMIO_GPIO_CONTROL, ctl);
-   spin_unlock_irqrestore(wl->leds_lock, flags);
+   spin_unlock_irqrestore(&wl->leds_lock, flags);
 }
 
 static void b43_led_turn_off(struct b43_wldev *dev, u8 led_index,
@@ -54,14 +54,14 @@ static void b43_led_turn_off(struct b43_
unsigned long flags;
u16 ctl;
 
-   spin_lock_irqsave(wl->leds_lock, flags);
+   spin_lock_irqsave(&wl->leds_lock, flags);
ctl = b43_read16(dev, B43_MMIO_GPIO_CONTROL);
if (activelow)
ctl |= (1 << led_index);
else
ctl &= ~(1 << led_index);
b43_write16(dev, B43_MMIO_GPIO_CONTROL, ctl);
-   spin_unlock_irqrestore(wl->leds_lock, flags);
+   spin_unlock_irqrestore(&wl->leds_lock, flags);
 }
 
 /* Callback from the LED subsystem. */
___
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev


Re: [PATCH] b43: Use input-polldev for the rfkill switch

2007-10-03 Thread David Woodhouse
On Sat, 2007-09-29 at 19:32 +0200, Michael Buesch wrote:
> The patch is correct as-is. RF-kill was polled by the periodic work.

OK, cool. Just checking.

-- 
dwmw2

___
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev


Re: [PATCH] b43: Use input-polldev for the rfkill switch

2007-10-03 Thread Michael Buesch
On Saturday 29 September 2007 19:14:34 David Woodhouse wrote:
> On Sat, 2007-09-29 at 19:08 +0200, Michael Buesch wrote:
> > I'm not sure what you are trying to ask.
> 
> The hunks I quoted don't seem relevant to the rfkill switch. They seem
> to be related to periodic work, which was the subject of the other patch
> you posted at about the same time. Did you get them mixed up?

The patch is correct as-is. RF-kill was polled by the periodic work.

-- 
Greetings Michael.
___
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev


Re: [PATCH] b43: Use input-polldev for the rfkill switch

2007-10-03 Thread David Woodhouse
On Sat, 2007-09-29 at 19:08 +0200, Michael Buesch wrote:
> I'm not sure what you are trying to ask.

The hunks I quoted don't seem relevant to the rfkill switch. They seem
to be related to periodic work, which was the subject of the other patch
you posted at about the same time. Did you get them mixed up?
-- 
dwmw2

___
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev


Re: [PATCH] b43: Use input-polldev for the rfkill switch

2007-10-03 Thread Michael Buesch
On Saturday 29 September 2007 18:52:48 David Woodhouse wrote:
> Does this bit belong to your other patch?

I'm not sure what you are trying to ask.

-- 
Greetings Michael.
___
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev


Re: [PATCH] b43: Use input-polldev for the rfkill switch

2007-10-03 Thread David Woodhouse
On Fri, 2007-09-28 at 14:22 +0200, Michael Buesch wrote:
> This removes the direct call to rfkill on an rfkill event
> and replaces it with an input device. This way userspace is also
> notified about the event.
> 
> Signed-off-by: Michael Buesch <[EMAIL PROTECTED]>

...

>  static void do_periodic_work(struct b43_wldev *dev)
>  {
>   unsigned int state;
>  
>   state = dev->periodic_state;
> - if (state % 120 == 0)
> + if (state % 8 == 0)
>   b43_periodic_every120sec(dev);
> - if (state % 60 == 0)
> + if (state % 4 == 0)
>   b43_periodic_every60sec(dev);
> - if (state % 30 == 0)
> + if (state % 2 == 0)
>   b43_periodic_every30sec(dev);
> - if (state % 15 == 0)
> - b43_periodic_every15sec(dev);
> - b43_periodic_every1sec(dev);
> + b43_periodic_every15sec(dev);
>  }
>  
>  /* Estimate a "Badness" value based on the periodic work
> @@ -2429,13 +2400,11 @@ static int estimate_periodic_work_badnes
>  {
>   int badness = 0;
>  
> - if (state % 120 == 0)   /* every 120 sec */
> + if (state % 8 == 0) /* every 120 sec */
>   badness += 10;
> - if (state % 60 == 0)/* every 60 sec */
> + if (state % 4 == 0) /* every 60 sec */
>   badness += 5;
> - if (state % 30 == 0)/* every 30 sec */
> - badness += 1;
> - if (state % 15 == 0)/* every 15 sec */
> + if (state % 2 == 0) /* every 30 sec */
>   badness += 1;
>  
>  #define BADNESS_LIMIT4
> @@ -2486,13 +2455,13 @@ static void b43_periodic_work_handler(st
>   spin_unlock_irqrestore(&dev->wl->irq_lock, flags);
>   }
>   dev->periodic_state++;
> -  out_requeue:
> +out_requeue:
>   if (b43_debug(dev, B43_DBG_PWORK_FAST))
>   delay = msecs_to_jiffies(50);
>   else
> - delay = round_jiffies(HZ);
> + delay = round_jiffies(HZ * 15);
>   queue_delayed_work(dev->wl->hw->workqueue, &dev->periodic_work, delay);
> -  out:
> +out:
>   mutex_unlock(&dev->wl->mutex);
>  }

Does this bit belong to your other patch?


-- 
dwmw2

___
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev