Amitkumar Karwar <[email protected]> writes:

> From: Xinming Hu <[email protected]>
>
> Firmware may filter and drop packets under certain condition, for
> example, ARP SA=DA packet. this event will be used to synchronize
> the Rx Block Acknowledgment (BA) window bitmap and to fill any holes
> in driver side.
>
> Signed-off-by: Xinming Hu <[email protected]>
> Signed-off-by: Amitkumar Karwar <[email protected]>

[...]

> --- a/drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c
> +++ b/drivers/net/wireless/marvell/mwifiex/11n_rxreorder.c
> @@ -78,8 +78,15 @@ static int mwifiex_11n_dispatch_amsdu_pkt(struct 
> mwifiex_private *priv,
>   */
>  static int mwifiex_11n_dispatch_pkt(struct mwifiex_private *priv, void 
> *payload)
>  {
> -     int ret = mwifiex_11n_dispatch_amsdu_pkt(priv, payload);
>  
> +     int ret;
> +
> +     if (payload == (void *)MWIFIEX_RX_PKT_DROPPED_IN_FW) {
> +             mwifiex_dbg(priv->adapter, INFO, "info: fw drop data\n");
> +             return 0;
> +     }

[...]

> +                                     mwifiex_dbg(priv->adapter, ERROR,
> +                                                 "drop packet,seq=%d\n",
> +                                                 seq_num);
> +
> +                                     ret = mwifiex_11n_rx_reorder_pkt
> +                                     (priv, seq_num, tlv_rxba->tid,
> +                                      tlv_rxba->mac, 0,
> +                                      (void *)MWIFIEX_RX_PKT_DROPPED_IN_FW);

[...]

> +/* Indicate packet has been dropped in FW */
> +#define MWIFIEX_RX_PKT_DROPPED_IN_FW             0xffffffff

That pointer magic is rather ugly, why not use a proper boolean?

-- 
Kalle Valo
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to