From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH 4/7] staging: rtl8192e: Remove mode IW_MODE_ADHOC from rtl_cam.c
Date: Fri, 22 Sep 2023 15:29:41 +0200 [thread overview]
Message-ID: <143345585dfcc0e920b2ba5fa614f626ab3ad8ee.1695387832.git.philipp.g.hortmann@gmail.com> (raw)
In-Reply-To: <cover.1695387832.git.philipp.g.hortmann@gmail.com>
Remove unsupported mode IW_MODE_ADHOC from rtl_cam.c.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_cam.c | 61 +++------------------
1 file changed, 7 insertions(+), 54 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c
index 944cc73fb2b6..14b48cacfbbd 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_cam.c
@@ -33,11 +33,6 @@ void rtl92e_enable_hw_security_config(struct net_device *dev)
(priv->rtllib->auth_mode != 2)) {
SECR_value |= SCR_RxUseDK;
SECR_value |= SCR_TxUseDK;
- } else if ((ieee->iw_mode == IW_MODE_ADHOC) &&
- (ieee->pairwise_key_type & (KEY_TYPE_CCMP |
- KEY_TYPE_TKIP))) {
- SECR_value |= SCR_RxUseDK;
- SECR_value |= SCR_TxUseDK;
}
ieee->hwsec_active = 1;
@@ -157,29 +152,14 @@ void rtl92e_cam_restore(struct net_device *dev)
}
} else if (priv->rtllib->pairwise_key_type == KEY_TYPE_TKIP) {
- if (priv->rtllib->iw_mode == IW_MODE_ADHOC) {
- rtl92e_set_key(dev, 4, 0,
- priv->rtllib->pairwise_key_type,
- (const u8 *)dev->dev_addr, 0,
- (u32 *)(&priv->rtllib->swcamtable[4].key_buf[0]));
- } else {
- rtl92e_set_key(dev, 4, 0,
- priv->rtllib->pairwise_key_type,
- MacAddr, 0,
- (u32 *)(&priv->rtllib->swcamtable[4].key_buf[0]));
- }
-
+ rtl92e_set_key(dev, 4, 0,
+ priv->rtllib->pairwise_key_type,
+ MacAddr, 0,
+ (u32 *)(&priv->rtllib->swcamtable[4].key_buf[0]));
} else if (priv->rtllib->pairwise_key_type == KEY_TYPE_CCMP) {
- if (priv->rtllib->iw_mode == IW_MODE_ADHOC) {
- rtl92e_set_key(dev, 4, 0,
- priv->rtllib->pairwise_key_type,
- (const u8 *)dev->dev_addr, 0,
- (u32 *)(&priv->rtllib->swcamtable[4].key_buf[0]));
- } else {
- rtl92e_set_key(dev, 4, 0,
- priv->rtllib->pairwise_key_type, MacAddr,
- 0, (u32 *)(&priv->rtllib->swcamtable[4].key_buf[0]));
- }
+ rtl92e_set_key(dev, 4, 0,
+ priv->rtllib->pairwise_key_type, MacAddr,
+ 0, (u32 *)(&priv->rtllib->swcamtable[4].key_buf[0]));
}
if (priv->rtllib->group_key_type == KEY_TYPE_TKIP) {
@@ -192,19 +172,6 @@ void rtl92e_cam_restore(struct net_device *dev)
(u32 *)(&priv->rtllib->swcamtable[EntryId].key_buf[0]));
}
}
- if (priv->rtllib->iw_mode == IW_MODE_ADHOC) {
- if (priv->rtllib->swcamtable[0].bused) {
- rtl92e_set_key(dev, 0, 0,
- priv->rtllib->group_key_type,
- CAM_CONST_ADDR[0], 0,
- (u32 *)(&priv->rtllib->swcamtable[0].key_buf[0]));
- } else {
- netdev_warn(dev,
- "%s(): ADHOC TKIP: missing key entry.\n",
- __func__);
- return;
- }
- }
} else if (priv->rtllib->group_key_type == KEY_TYPE_CCMP) {
MacAddr = CAM_CONST_BROAD;
for (EntryId = 1; EntryId < 4; EntryId++) {
@@ -215,19 +182,5 @@ void rtl92e_cam_restore(struct net_device *dev)
(u32 *)(&priv->rtllib->swcamtable[EntryId].key_buf[0]));
}
}
-
- if (priv->rtllib->iw_mode == IW_MODE_ADHOC) {
- if (priv->rtllib->swcamtable[0].bused) {
- rtl92e_set_key(dev, 0, 0,
- priv->rtllib->group_key_type,
- CAM_CONST_ADDR[0], 0,
- (u32 *)(&priv->rtllib->swcamtable[0].key_buf[0]));
- } else {
- netdev_warn(dev,
- "%s(): ADHOC CCMP: missing key entry.\n",
- __func__);
- return;
- }
- }
}
}
--
2.42.0
next prev parent reply other threads:[~2023-09-22 13:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-22 13:29 [PATCH 0/7] staging: rtl8192e: Remove mode IW_MODE_ADHOC functions Philipp Hortmann
2023-09-22 13:29 ` [PATCH 1/7] staging: rtl8192e: Remove mode IW_MODE_ADHOC from rtllib_tx.c Philipp Hortmann
2023-09-22 13:29 ` [PATCH 2/7] staging: rtl8192e: Remove mode IW_MODE_ADHOC from rtllib_rx.c Philipp Hortmann
2023-09-22 13:29 ` [PATCH 3/7] staging: rtl8192e: Remove mode IW_MODE_ADHOC from rtl_core.c Philipp Hortmann
2023-09-22 13:29 ` Philipp Hortmann [this message]
2023-09-22 13:29 ` [PATCH 5/7] staging: rtl8192e: Remove mode IW_MODE_ADHOC from rtllib_softmac.c Philipp Hortmann
2023-09-22 13:29 ` [PATCH 6/7] staging: rtl8192e: Remove delayed_work start_ibss_wq Philipp Hortmann
2023-09-22 13:30 ` [PATCH 7/7] staging: rtl8192e: Remove rtllib_stop_send_beacons Philipp Hortmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=143345585dfcc0e920b2ba5fa614f626ab3ad8ee.1695387832.git.philipp.g.hortmann@gmail.com \
--to=philipp.g.hortmann@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®