Search Linux Wireless

Re: hardware/firmware powersave help, Broadcom scheme

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2008-02-20 at 16:18 +0100, Johannes Berg wrote:
> 
> Broadcom hardware, on the other hand, has a slightly more complicated
> scheme. All powersave transitions are registered by the firmware (!)
> in
> a hardware FIFO (really a ring buffer I think), the "power management
> queue". I'm not entirely sure how entries are deleted again, but IIUC
> they can only be deleted once there are no frames "in flight" for any
> powersave station any more.
> 
> The atheros scheme seems to be implemented in mac80211, but I think we
> might also want to implement the Broadcom scheme. This could be done
> fully in the driver but that has a chance that the PS flags get out of
> sync between the firmware, driver and mac80211. To fix this, we'd have
> to export a new function to set/clear the PS flag (i.e. invoke
> ap_sta_ps_start/ap_sta_ps_end) on driver request rather than on
> received
> frames.
> 
> Thoughts?

Hey, and there is also ipw firmware!

As broadcom, the iwl4965AGN firmware is also aware of the powersave
state for the station/stations (consider about the master mode). In
stead of having a special "power management queue", the 4965 firmware
still use the normal 4 QoS queues for frames destined to powersaved
STAs. But these frames will be dropped by firmware eventually. In this
case, mac80211 ieee80211_tx_status() will get these SKBs with a tx error
state DST_STA_IN_POWERSAVE so that it can requeue them (to send them
later when STA wakes up). Note, this scheme is to resolve the race
condition you mentioned that in the small window the STA powersave state
mismatches between mac80211 and firmware. After mac80211 receives the PS
frame, it stops to Tx more frames to hardware.

This scheme works well but we have one requirement for mac80211. That
is, in the master mode, when the destined STA wakes up from powersave
mode, mac80211 should not begin to Tx frames to hardware until the
current h/w Tx queues are drained. Otherwise we can expect frames out of
order issue happens (for example, some frames in h/w queues are requeued
but others are left when mac80211 begins to Tx).

It's good that you look into mac80211 powersave now. We also have code
that enables master mode PS poll and uAPSD based on an early version of
mac80211. We will merge it to the latest mac80211 and submit but it
takes some time. I can point you the patch if you are interested.

Thanks,
-yi

-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux