|
@@ -1978,6 +1978,20 @@ void il_wr_prph(struct il_priv *il, u32 addr, u32 val);
|
|
|
u32 il_read_targ_mem(struct il_priv *il, u32 addr);
|
|
u32 il_read_targ_mem(struct il_priv *il, u32 addr);
|
|
|
void il_write_targ_mem(struct il_priv *il, u32 addr, u32 val);
|
|
void il_write_targ_mem(struct il_priv *il, u32 addr, u32 val);
|
|
|
|
|
|
|
|
|
|
+static inline bool il_need_reclaim(struct il_priv *il, struct il_rx_pkt *pkt)
|
|
|
|
|
+{
|
|
|
|
|
+ /* Reclaim a command buffer only if this packet is a response
|
|
|
|
|
+ * to a (driver-originated) command. If the packet (e.g. Rx frame)
|
|
|
|
|
+ * originated from uCode, there is no command buffer to reclaim.
|
|
|
|
|
+ * Ucode should set SEQ_RX_FRAME bit if ucode-originated, but
|
|
|
|
|
+ * apparently a few don't get set; catch them here.
|
|
|
|
|
+ */
|
|
|
|
|
+ return !(pkt->hdr.sequence & SEQ_RX_FRAME) &&
|
|
|
|
|
+ pkt->hdr.cmd != N_STATS && pkt->hdr.cmd != C_TX &&
|
|
|
|
|
+ pkt->hdr.cmd != N_RX_PHY && pkt->hdr.cmd != N_RX &&
|
|
|
|
|
+ pkt->hdr.cmd != N_RX_MPDU && pkt->hdr.cmd != N_COMPRESSED_BA;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
static inline void
|
|
static inline void
|
|
|
_il_write8(struct il_priv *il, u32 ofs, u8 val)
|
|
_il_write8(struct il_priv *il, u32 ofs, u8 val)
|
|
|
{
|
|
{
|