mirror of https://gitee.com/openkylin/linux.git
KYLIN: android: add kmre support
Mainline: NA Category: Feature CVE: NA config present, only apply the changes for binder and virt_wifi. Cc: nh <nh@kylinos.cn> #linux-hwe-5.15 Cc: chen zhang <chenzhang@kylinos.cn> Signed-off-by: Jiajia Liu <liujiajia@kylinos.cn> Change-Id: I7c6db8d07f3b597721a7a341e6500218f2bec828 Reviewed-on: http://gerrit.kylin.com/c/kfocal/+/30848 Reviewed-by: 陈章 <chenzhang@kylinos.cn>
This commit is contained in:
parent
43e4654b4d
commit
7b8fe2936c
|
@ -110,8 +110,7 @@ enum {
|
|||
BINDER_DEBUG_PRIORITY_CAP = 1U << 13,
|
||||
BINDER_DEBUG_SPINLOCKS = 1U << 14,
|
||||
};
|
||||
static uint32_t binder_debug_mask = BINDER_DEBUG_USER_ERROR |
|
||||
BINDER_DEBUG_FAILED_TRANSACTION | BINDER_DEBUG_DEAD_TRANSACTION;
|
||||
static uint32_t binder_debug_mask = 0;
|
||||
module_param_named(debug_mask, binder_debug_mask, uint, 0644);
|
||||
|
||||
char *binder_devices_param = CONFIG_ANDROID_BINDER_DEVICES;
|
||||
|
@ -714,7 +713,7 @@ static struct binder_node *binder_init_node_ilocked(
|
|||
node->work.type = BINDER_WORK_NODE;
|
||||
node->min_priority = flags & FLAT_BINDER_FLAG_PRIORITY_MASK;
|
||||
node->accept_fds = !!(flags & FLAT_BINDER_FLAG_ACCEPTS_FDS);
|
||||
node->txn_security_ctx = !!(flags & FLAT_BINDER_FLAG_TXN_SECURITY_CTX);
|
||||
node->txn_security_ctx = false;
|
||||
spin_lock_init(&node->lock);
|
||||
INIT_LIST_HEAD(&node->work.entry);
|
||||
INIT_LIST_HEAD(&node->async_todo);
|
||||
|
|
|
@ -165,8 +165,6 @@ static int virt_wifi_scan(struct wiphy *wiphy,
|
|||
{
|
||||
struct virt_wifi_wiphy_priv *priv = wiphy_priv(wiphy);
|
||||
|
||||
wiphy_debug(wiphy, "scan\n");
|
||||
|
||||
if (priv->scan_request || priv->being_deleted)
|
||||
return -EBUSY;
|
||||
|
||||
|
@ -240,8 +238,6 @@ static int virt_wifi_connect(struct wiphy *wiphy, struct net_device *netdev,
|
|||
eth_zero_addr(priv->connect_requested_bss);
|
||||
}
|
||||
|
||||
wiphy_debug(wiphy, "connect\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -293,7 +289,6 @@ static int virt_wifi_disconnect(struct wiphy *wiphy, struct net_device *netdev,
|
|||
if (priv->being_deleted)
|
||||
return -EBUSY;
|
||||
|
||||
wiphy_debug(wiphy, "disconnect\n");
|
||||
virt_wifi_cancel_connect(netdev);
|
||||
|
||||
cfg80211_disconnected(netdev, reason_code, NULL, 0, true, GFP_KERNEL);
|
||||
|
@ -309,8 +304,6 @@ static int virt_wifi_get_station(struct wiphy *wiphy, struct net_device *dev,
|
|||
{
|
||||
struct virt_wifi_netdev_priv *priv = netdev_priv(dev);
|
||||
|
||||
wiphy_debug(wiphy, "get_station\n");
|
||||
|
||||
if (!priv->is_connected || !ether_addr_equal(mac, fake_router_bssid))
|
||||
return -ENOENT;
|
||||
|
||||
|
@ -334,8 +327,6 @@ static int virt_wifi_dump_station(struct wiphy *wiphy, struct net_device *dev,
|
|||
{
|
||||
struct virt_wifi_netdev_priv *priv = netdev_priv(dev);
|
||||
|
||||
wiphy_debug(wiphy, "dump_station\n");
|
||||
|
||||
if (idx != 0 || !priv->is_connected)
|
||||
return -ENOENT;
|
||||
|
||||
|
@ -368,6 +359,7 @@ static struct wiphy *virt_wifi_make_wiphy(void)
|
|||
wiphy->max_scan_ssids = 4;
|
||||
wiphy->max_scan_ie_len = 1000;
|
||||
wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
|
||||
wiphy->flags |= WIPHY_FLAG_NETNS_OK;
|
||||
|
||||
wiphy->bands[NL80211_BAND_2GHZ] = &band_2ghz;
|
||||
wiphy->bands[NL80211_BAND_5GHZ] = &band_5ghz;
|
||||
|
@ -569,6 +561,7 @@ static int virt_wifi_newlink(struct net *src_net, struct net_device *dev,
|
|||
priv->is_connected = false;
|
||||
priv->is_up = false;
|
||||
INIT_DELAYED_WORK(&priv->connect, virt_wifi_connect_complete);
|
||||
wiphy_net_set(common_wiphy, current->nsproxy->net_ns);
|
||||
__module_get(THIS_MODULE);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue