From: Jim C. <jim...@gm...> - 2012-05-12 21:34:51
|
Signed-off-by: Jim Cromie <jim...@gm...> --- acx_func.h | 6 ------ mem.c | 27 ++++----------------------- merge.c | 7 +++---- merge.h | 7 ++++++- pci.c | 25 +++---------------------- pci.h | 3 --- 6 files changed, 16 insertions(+), 59 deletions(-) diff --git a/acx_func.h b/acx_func.h index ae00a46..1247f52 100644 --- a/acx_func.h +++ b/acx_func.h @@ -588,9 +588,6 @@ int acx_issue_cmd_timeo_debug(acx_device_t * adev, unsigned cmd, * - * Mac80211 Ops * - - * Helpers - * - void acxpci_power_led(acx_device_t * adev, int enable); - * - * Ioctls * - int acx111pci_ioctl_info(struct net_device *ndev, struct iw_request_info * - *info, struct iw_param *vwrq, char *extra); * - int acx100pci_ioctl_set_phy_amp_bias(struct net_device *ndev, struct * - iw_request_info *info, struct iw_param *vwrq, char *extra); @@ -638,9 +635,6 @@ int acxmem_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd, * Irq Handling, Timer * - void acxmem_set_interrupt_mask(acx_device_t *adev); * - - * Helpers - * - void acxmem_power_led(acx_device_t *adev, int enable); - * - * Ioctls * int acx111pci_ioctl_info(struct ieee80211_hw *hw, struct iw_request_info *info, struct iw_param *vwrq, char *extra); * int acx100mem_ioctl_set_phy_amp_bias(struct ieee80211_hw *hw, struct iw_request_info *info, struct iw_param *vwrq, char *extra); diff --git a/mem.c b/mem.c index dbabcfd..86dc79c 100644 --- a/mem.c +++ b/mem.c @@ -1760,29 +1760,10 @@ static const struct ieee80211_ops acxmem_hw_ops = { * ================================================== */ -void acxmem_power_led(acx_device_t *adev, int enable) -{ - u16 gpio_pled = IS_ACX111(adev) ? 0x0040 : 0x0800; - - /* A hack. Not moving message rate limiting to adev->xxx - * (it's only a debug message after all) */ - static int rate_limit = 0; - - if (rate_limit++ < 3) - log(L_IOCTL, "Please report in case toggling the power " - "LED doesn't work for your card!\n"); - if (enable) - write_reg16(adev, IO_ACX_GPIO_OUT, read_reg16(adev, IO_ACX_GPIO_OUT) - & ~gpio_pled); - else - write_reg16(adev, IO_ACX_GPIO_OUT, read_reg16(adev, IO_ACX_GPIO_OUT) - | gpio_pled); -} - INLINE_IO int acxmem_adev_present(acx_device_t *adev) { - /* fast version (accesses the first register, IO_ACX_SOFT_RESET, - * which should be safe): */ + /* fast version (accesses the first register, + * IO_ACX_SOFT_RESET, which should be safe): */ return acx_readl(adev->iobase) != 0xffffffff; } @@ -1804,7 +1785,7 @@ STATick void update_link_quality_led(acx_device_t *adev) if (time_after(jiffies, adev->brange_time_last_state_change + (HZ/2 - HZ/2 * (unsigned long)qual / adev->brange_max_quality ) )) { - acxmem_power_led(adev, (adev->brange_last_state == 0)); + acx_power_led(adev, (adev->brange_last_state == 0)); adev->brange_last_state ^= 1; /* toggle */ adev->brange_time_last_state_change = jiffies; } @@ -2484,7 +2465,7 @@ STATick int __devexit acxmem_remove(struct platform_device *pdev) /* disable power LED to save power :-) */ log(L_INIT, "switching off power LED to save power\n"); - acxmem_power_led(adev, 0); + acx_power_led(adev, 0); /* stop our eCPU */ if (IS_ACX111(adev)) { diff --git a/merge.c b/merge.c index 21fca06..3f07da7 100644 --- a/merge.c +++ b/merge.c @@ -4125,8 +4125,8 @@ void acx_op_stop(struct ieee80211_hw *hw) * BOM Helpers * ================================================== */ -# if 0 // defer -void acxmem_power_led(acx_device_t *adev, int enable) { +void acx_power_led(acx_device_t * adev, int enable) +{ u16 gpio_pled = IS_ACX111(adev) ? 0x0040 : 0x0800; /* A hack. Not moving message rate limiting to adev->xxx (it's @@ -4137,13 +4137,12 @@ void acxmem_power_led(acx_device_t *adev, int enable) { log(L_IOCTL, "Please report in case toggling the power " "LED doesn't work for your card!\n"); if (enable) - write_reg16(adev, IO_ACX_GPIO_OUT, + write_reg16(adev, IO_ACX_GPIO_OUT, read_reg16(adev, IO_ACX_GPIO_OUT) & ~gpio_pled); else write_reg16(adev, IO_ACX_GPIO_OUT, read_reg16(adev, IO_ACX_GPIO_OUT) | gpio_pled); } -#endif /* identical */ INLINE_IO int acxmem_adev_present(acx_device_t *adev) diff --git a/merge.h b/merge.h index 1f4bd11..fcac272 100644 --- a/merge.h +++ b/merge.h @@ -63,7 +63,12 @@ int acxmem_upload_fw(acx_device_t *adev); int acxmem_upload_radio(acx_device_t *adev); int acxpci_upload_radio(acx_device_t *adev); -#if defined(CONFIG_ACX_MAC80211_PCI) || defined(CONFIG_ACX_MAC80211_MEM) +void acx_power_led(acx_device_t * adev, int enable); + + +#if defined(CONFIG_ACX_MAC80211_PCI) \ + || defined(CONFIG_ACX_MAC80211_MEM) + void acxmem_update_queue_indicator(acx_device_t *adev, int txqueue); diff --git a/pci.c b/pci.c index 8d0cc49..95b9468 100644 --- a/pci.c +++ b/pci.c @@ -517,7 +517,7 @@ static void update_link_quality_led(acx_device_t * adev) (HZ / 2 - HZ / 2 * (unsigned long)qual / adev->brange_max_quality))) { - acxpci_l_power_led(adev, (adev->brange_last_state == 0)); + acx_power_led(adev, (adev->brange_last_state == 0)); adev->brange_last_state ^= 1; // toggle adev->brange_time_last_state_change = jiffies; } @@ -726,25 +726,6 @@ static const struct ieee80211_ops acxpci_hw_ops = { * ================================================== */ -void acxpci_power_led(acx_device_t * adev, int enable) -{ - u16 gpio_pled = IS_ACX111(adev) ? 0x0040 : 0x0800; - - /* A hack. Not moving message rate limiting to adev->xxx (it's - * only a debug message after all) */ - static int rate_limit = 0; - - if (rate_limit++ < 3) - log(L_IOCTL, "Please report in case toggling the power " - "LED doesn't work for your card\n"); - if (enable) - write_reg16(adev, IO_ACX_GPIO_OUT, - read_reg16(adev, IO_ACX_GPIO_OUT) & ~gpio_pled); - else - write_reg16(adev, IO_ACX_GPIO_OUT, - read_reg16(adev, IO_ACX_GPIO_OUT) | gpio_pled); -} - INLINE_IO int acxpci_adev_present(acx_device_t *adev) { /* fast version (accesses the first register, @@ -1505,7 +1486,7 @@ void __devexit acxpci_remove(struct pci_dev *pdev) #endif /* disable power LED to save power :-) */ log(L_INIT, "switching off power LED to save power\n"); - acxpci_power_led(adev, 0); + acx_power_led(adev, 0); /* stop our eCPU */ if (IS_ACX111(adev)) { /* FIXME: does this actually keep halting the @@ -2063,7 +2044,7 @@ static void vlynq_remove(struct vlynq_device *vdev) } /* disable power LED to save power :-) */ log(L_INIT, "switching off power LED to save power\n"); - acxpci_power_led(adev, 0); + acx_power_led(adev, 0); /* stop our eCPU */ /* OW PCI still does something here (although also need to be reviewed). */ diff --git a/pci.h b/pci.h index d7478c0..306f53b 100644 --- a/pci.h +++ b/pci.h @@ -39,9 +39,6 @@ tx_t *acxpci_alloc_tx(acx_device_t *adev); /* Irq Handling, Timer */ -/* Helpers */ -void acxpci_power_led(acx_device_t *adev, int enable); - /* Ioctls * Driver, Module */ -- 1.7.10.1.487.ga3935e6 |