From patchwork Thu Feb 12 18:15:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avinash Patil X-Patchwork-Id: 5819421 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 68AB69F37F for ; Thu, 12 Feb 2015 12:46:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 876922012E for ; Thu, 12 Feb 2015 12:46:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A2E272011D for ; Thu, 12 Feb 2015 12:46:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755358AbbBLMqY (ORCPT ); Thu, 12 Feb 2015 07:46:24 -0500 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:3553 "EHLO mx0a-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755034AbbBLMqX (ORCPT ); Thu, 12 Feb 2015 07:46:23 -0500 Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.14.5/8.14.5) with SMTP id t1CCjLnj023554 for ; Thu, 12 Feb 2015 04:46:22 -0800 Received: from sc-owa03.marvell.com ([199.233.58.149]) by mx0a-0016f401.pphosted.com with ESMTP id 1sgtb7rd5d-5 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Thu, 12 Feb 2015 04:46:22 -0800 Received: from maili.marvell.com (10.93.76.83) by SC-OWA03.marvell.com (10.93.76.24) with Microsoft SMTP Server id 8.3.327.1; Thu, 12 Feb 2015 04:46:21 -0800 Received: from pe-lt950 (unknown [10.31.130.218]) by maili.marvell.com (Postfix) with ESMTP id A26CB3F703F; Thu, 12 Feb 2015 04:46:20 -0800 (PST) Received: from pe-lt950.marvell.com (localhost [127.0.0.1]) by pe-lt950 (8.14.7/8.14.7) with ESMTP id t1CIG2pq030470; Thu, 12 Feb 2015 23:46:02 +0530 Received: (from root@localhost) by pe-lt950.marvell.com (8.14.7/8.14.7/Submit) id t1CIFwRv030447; Thu, 12 Feb 2015 23:45:58 +0530 From: Avinash Patil To: CC: , , , Li Long , Avinash Patil Subject: [PATCH 1/3] mwifiex: add cfg80211 set_default_mgmt_key handler Date: Thu, 12 Feb 2015 23:45:52 +0530 Message-ID: <1423764954-30412-1-git-send-email-patila@marvell.com> X-Mailer: git-send-email 1.8.1.4 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68, 1.0.33, 0.0.0000 definitions=2015-02-12_03:2015-02-12, 2015-02-12, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1502120126 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Xinming Hu It is observed that hostapd failed to setup with management frame protection mode enabled when using mwifiex. This is because hostapd will try to install IGTK using cfg80211 set_default_mgmt_key handler. we have already support IGTK install in set_key handler, so just work around this issue by add an empty cfg80211_set_default_mgmt_key handler. Signed-off-by: Xinming Hu Signed-off-by: Cathy Luo Signed-off-by: Li Long Signed-off-by: Avinash Patil --- drivers/net/wireless/mwifiex/cfg80211.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index 5f3c1d3..ab7643d 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c @@ -415,6 +415,18 @@ mwifiex_cfg80211_add_key(struct wiphy *wiphy, struct net_device *netdev, } /* + * CFG802.11 operation handler to set default mgmt key. + */ +static int +mwifiex_cfg80211_set_default_mgmt_key(struct wiphy *wiphy, + struct net_device *netdev, + u8 key_index) +{ + wiphy_dbg(wiphy, "set default mgmt key, key index=%d\n", key_index); + return 0; +} + +/* * This function sends domain information to the firmware. * * The following information are passed to the firmware - @@ -3280,6 +3292,7 @@ static struct cfg80211_ops mwifiex_cfg80211_ops = { .leave_ibss = mwifiex_cfg80211_leave_ibss, .add_key = mwifiex_cfg80211_add_key, .del_key = mwifiex_cfg80211_del_key, + .set_default_mgmt_key = mwifiex_cfg80211_set_default_mgmt_key, .mgmt_tx = mwifiex_cfg80211_mgmt_tx, .mgmt_frame_register = mwifiex_cfg80211_mgmt_frame_register, .remain_on_channel = mwifiex_cfg80211_remain_on_channel,