From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753687AbdCaEr4 (ORCPT ); Fri, 31 Mar 2017 00:47:56 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:38115 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751144AbdCaErz (ORCPT ); Fri, 31 Mar 2017 00:47:55 -0400 X-ME-Sender: X-Sasl-enc: Lv1Oyoy9ldF8c/gN1su5GtVBHn8khYenn+ZgGIK6XWeV 1490935672 From: "Tobin C. Harding" To: linux-kernel@vger.kernel.org Cc: "Tobin C. Harding" , Greg Kroah-Hartman , Wolfram Sang , devel@linuxdriverproject.org, Tycho Andersen Subject: [PATCH RFC] remove custom Michael MIC implementation Date: Fri, 31 Mar 2017 15:47:38 +1100 Message-Id: <1490935659-7196-1-git-send-email-me@tobin.cc> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This RFC can be applied on op on Linus' tree 89970a0 Configuration options needed to build are CONFIG_STAGING=y CONFIG_KS7010=m The ks7010 driver currently uses a custom implementation of the Michael MIC algorithm. The kernel has an implementation of this algorithm already. This patch is an attempt to replace the custom implementation with the in-tree implementation via the kernel cryptography API. I am not an expert on the Michael Message Integrity Check or on cryptography in general. Actually, I'm not even an expert on kernel development. I believe I have mirrored the behavior of the custom implementation. I do not know if I have done this completely correctly or, for that matter, if I have gone about it correctly. The only in-tree driver I could find that does the MIC check in software was the Orinoco driver (net/wireless/intersil/orinoco). I based this code off of the Orinoco code and the current implementation. The whole thing is in one patch since there was no way to keep the driver in a sane state during the implementation replacement. The steps I took were as follows; 1. Remove the custom implementation, michael_mic.[ch] 2. Implement helper functions that call the kernel crypto API, this is the code that is based of Orinoco, mic.[ch] 3. Replace driver calls to the custom implementation with calls to the newly defined helper functions. The code is untested, I have hardware in the mail. If any one is interested and has any comments I would really like to hear them. I am open to all suggestions (even down to trivial coding style issues). Thank you for taking the time to read this and for any tips you may be able to give me. thanks, Tobin. Tobin C. Harding (1): staging: ks7010: remove custom Michael MIC implementation drivers/staging/ks7010/Makefile | 2 +- drivers/staging/ks7010/ks_hostif.c | 48 +++++++----- drivers/staging/ks7010/ks_wlan.h | 3 + drivers/staging/ks7010/mic.c | 131 +++++++++++++++++++++++++++++++ drivers/staging/ks7010/mic.h | 22 ++++++ drivers/staging/ks7010/michael_mic.c | 148 ----------------------------------- drivers/staging/ks7010/michael_mic.h | 25 ------ 7 files changed, 186 insertions(+), 193 deletions(-) create mode 100644 drivers/staging/ks7010/mic.c create mode 100644 drivers/staging/ks7010/mic.h delete mode 100644 drivers/staging/ks7010/michael_mic.c delete mode 100644 drivers/staging/ks7010/michael_mic.h -- 2.7.4