Revert "rpmsg: pointer of netdev ioctl support cross-core memory access"

This reverts commit bd539651cdf1e5067dc5d21349ef835e98e262eb.

Reason for revert: Change the implementation method

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
zhanghongyu 2022-04-01 16:42:58 +08:00 committed by Xiang Xiao
parent c7fcffd09a
commit 3a42d849f5
3 changed files with 0 additions and 77 deletions

View File

@ -27,11 +27,6 @@
#include <nuttx/net/usrsock.h>
#ifdef CONFIG_NETDEV_WIRELESS_IOCTL
# include <nuttx/wireless/wireless.h>
# include <metal/cache.h>
#endif
/****************************************************************************
* Pre-processor definitions
****************************************************************************/
@ -40,16 +35,6 @@
#define USRSOCK_RPMSG_DNS_EVENT 127
#ifdef CONFIG_NETDEV_WIRELESS_IOCTL
# define WL_IS80211POINTERCMD(cmd) ((cmd) == SIOCGIWSCAN || \
(cmd) == SIOCSIWCOUNTRY || \
(cmd) == SIOCGIWRANGE || \
(cmd) == SIOCSIWENCODEEXT || \
(cmd) == SIOCGIWENCODEEXT || \
(cmd) == SIOCGIWESSID || \
(cmd) == SIOCSIWESSID)
#endif
/****************************************************************************
* Public Types
****************************************************************************/

View File

@ -49,12 +49,6 @@ struct usrsock_rpmsg_s
struct file file;
};
enum usrsock_cache_action_e
{
USRSOCK_COHERENT_BEFORE,
USRSOCK_COHERENT_AFTER,
};
/****************************************************************************
* Private Function Prototypes
****************************************************************************/
@ -161,41 +155,6 @@ static int usrsock_rpmsg_ept_cb(struct rpmsg_endpoint *ept, void *data,
return ret;
}
#ifdef CONFIG_NETDEV_WIRELESS_IOCTL
static void usersock_coherent_cache(FAR void *buf,
enum usrsock_cache_action_e action)
{
FAR struct usrsock_request_ioctl_s *req = buf;
FAR struct iwreq *wlreq;
if (req->head.reqid == USRSOCK_REQUEST_IOCTL)
{
if (WL_IS80211POINTERCMD(req->cmd))
{
wlreq = (FAR struct iwreq *)(req + 1);
if (action == USRSOCK_COHERENT_BEFORE)
{
metal_cache_flush(wlreq->u.data.pointer,
wlreq->u.data.length);
}
if (action == USRSOCK_COHERENT_AFTER)
{
metal_cache_invalidate(wlreq->u.data.pointer,
wlreq->u.data.length);
}
}
}
}
#else
static void usersock_coherent_cache(FAR void *buf,
enum usrsock_cache_action_e action)
{
}
#endif
/****************************************************************************
* Public Functions
****************************************************************************/
@ -292,8 +251,6 @@ int main(int argc, char *argv[])
break;
}
usersock_coherent_cache(buf, USRSOCK_COHERENT_BEFORE);
/* Send the packet to remote */
ret = rpmsg_send_nocopy(&priv.ept, buf, ret);
@ -301,8 +258,6 @@ int main(int argc, char *argv[])
{
break;
}
usersock_coherent_cache(buf, USRSOCK_COHERENT_AFTER);
}
/* Reclaim the resource */

View File

@ -719,26 +719,9 @@ static int usrsock_rpmsg_ioctl_handler(struct rpmsg_endpoint *ept,
if (req->usockid >= 0 &&
req->usockid < CONFIG_NETUTILS_USRSOCK_NSOCK_DESCRIPTORS)
{
#ifdef CONFIG_NETDEV_WIRELESS_IOCTL
FAR struct iwreq *wlreq = (FAR struct iwreq *)(req + 1);
if (WL_IS80211POINTERCMD(req->cmd))
{
metal_cache_invalidate(wlreq->u.data.pointer,
wlreq->u.data.length);
}
#endif
memcpy(ack + 1, req + 1, req->arglen);
ret = psock_ioctl(&priv->socks[req->usockid],
req->cmd, (unsigned long)(ack + 1));
#ifdef CONFIG_NETDEV_WIRELESS_IOCTL
if (WL_IS80211POINTERCMD(req->cmd))
{
metal_cache_flush(wlreq->u.data.pointer,
wlreq->u.data.length);
}
#endif
}
return usrsock_rpmsg_send_data_ack(ept,