On Friday 03 February 2006 12:58, Andreas Mohr wrote:
> this patch does:
> - implement much more flexible firmware statistics parsing
> (for /proc/driver/acx_wlanX_diag)
> This has the nice effect that we now get output for both the older
> TNETW1100 USB and TNETW1450.
> Since firmware statistics information has non-stable layout depending on
> firmware version, please report if you suspect any parsing mismatch!
> This improved version now uses 2kB more driver space, unfortunately.
> - use "% 8" modulo instead of more complicated "% 5" calculation
Why? There will be HZ=100 and HZ=250 boxes, 8ms doesn't fit well.
10ms is ok, 5ms or 2.5ms is more or less ok too, but 8ms?
But I'll apply this anyway.
> - use
> if (++idx >= count)
> idx = 0;
> instead of more bloaty
> idx = (idx + 1) % count;
> We might want to add a kernel macro for this *very* common and
> performance-critical driver operation, say ring_advance_next or so,
> in order to have the most optimized version for each architecture;
> Or ($1 million question): Is there already such a beast somewhere!?
As discussed, just use unsigned variable and compile with -Os.
Patch applied to acx and acxsm with following edits:
if (
(IS_PCI(adev) && IS_ACX100(adev))
|| (IS_USB(adev) && IS_ACX100(adev))
) {
Replaced this with "if (IS_ACX100(adev)) {"
typedef struct fw_stats {
u16 type;
u16 len;
fw_stats_tx_t tx;
fw_stats_rx_t rx;
fw_stats_dma_t dma;
fw_stats_irq_t irq;
fw_stats_wep_t wep;
fw_stats_pwr_t pwr;
fw_stats_mic_t mic;
fw_stats_aes_t aes;
fw_stats_event_t evt;
+ u8 _padding[FW_STATS_FUTURE_EXTENSION];
} fw_stats_t;
and removed "+FW_STATS_FUTURE_EXTENSION" elsewhere.
--
vda
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html