From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleksij Rempel Date: Mon, 03 Feb 2014 12:22:19 +0100 Subject: [ath9k-devel] [PATCH 05/13] ath9k_htc: add rx header converter to make it usable by ath9k In-Reply-To: <21230.64089.741.909535@gargle.gargle.HOWL> References: <1391022315-20946-1-git-send-email-linux@rempel-privat.de> <1391022424-21087-1-git-send-email-linux@rempel-privat.de> <1391022424-21087-4-git-send-email-linux@rempel-privat.de> <21230.64089.741.909535@gargle.gargle.HOWL> Message-ID: <52EF7BEB.5080605@rempel-privat.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org Am 03.02.2014 03:09, schrieb Sujith Manoharan: > Oleksij Rempel wrote: >> + rx_stats = kzalloc(sizeof(struct ath_rx_status), GFP_KERNEL); >> + if (unlikely(rx_stats == NULL)) { >> + ath_err(common, "rx_stats allocation filed!\n"); >> + goto err_nofree; >> + } >> + rx_status_htc_to_ath(rx_stats, &rxbuf->rxstatus); >> + > This seems a little expensive, since this would happen for every packet, > and a memcpy is already done earlier, for storing the RX status in > rxbuf->rxstatus. Instead of using 'struct ath_htc_rx_status' in > 'struct ath9k_htc_rxbuf', why can't 'struct ath_rx_status' be used ? > The values can be converted and stored directly, avoiding this alloc. Do you mean kzalloc or converter? then memcpy is removed by patch 12/13. Converter is not effective but it should prevent from confusions. At least until FW use same flags and struct ath_rx_status do. But i'm open for other ideas too. -- Regards, Oleksij -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 278 bytes Desc: OpenPGP digital signature Url : http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20140203/949f35bf/attachment.pgp