Merge Official Source

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2024-10-05 14:06:11 +08:00
commit 40a0abec18
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
31 changed files with 93 additions and 756 deletions

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"git.alwaysSignOff": true
}

View File

@ -0,0 +1,3 @@
#!/bin/sh
[ "$ACTION" = "add" ] && /etc/init.d/led start "$DEVICENAME"

View File

@ -64,6 +64,8 @@ load_led() {
config_get gpio $1 gpio "0"
config_get_bool inverted $1 inverted "0"
[ "$2" ] && [ "$sysfs" != "$2" ] && return
# execute application led trigger
[ -f "/usr/libexec/led-trigger/${trigger}" ] && {
. "/usr/libexec/led-trigger/${trigger}"
@ -121,7 +123,7 @@ load_led() {
[ -e "/sys/class/leds/${sysfs}/$m" ] && \
echo 1 > /sys/class/leds/${sysfs}/$m
done
echo $interval > /sys/class/leds/${sysfs}/interval
echo $interval > /sys/class/leds/${sysfs}/interval 2>/dev/null
}
;;
@ -171,6 +173,7 @@ start() {
[ -s /var/run/led.state ] && {
local led trigger brightness color
while read led trigger brightness color; do
[ "$1" ] && [ "$1" != "$led" ] && continue
[ -e "/sys/class/leds/$led/trigger" ] && \
echo "$trigger" > "/sys/class/leds/$led/trigger"
@ -185,6 +188,6 @@ start() {
}
config_load system
config_foreach load_led led
config_foreach load_led led "$1"
}
}

View File

@ -1 +1,2 @@
# Defaults are configured in /etc/sysctl.d/* and can be customized in this file
# User defined entries should be added to this file not to /etc/sysctl.d/* as
# that directory is not backed-up by default and will not survive a reimage

View File

@ -702,10 +702,7 @@ define KernelPackage/pstore
DEFAULT:=m if ALL_KMODS
KCONFIG:= \
CONFIG_PSTORE \
CONFIG_PSTORE_COMPRESS=y \
CONFIG_PSTORE_COMPRESS_DEFAULT="deflate" \
CONFIG_PSTORE_DEFLATE_COMPRESS=y \
CONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y
CONFIG_PSTORE_COMPRESS=y
FILES:= $(LINUX_DIR)/fs/pstore/pstore.ko
AUTOLOAD:=$(call AutoLoad,30,pstore,1)
DEPENDS:=+kmod-lib-zlib-deflate +kmod-lib-zlib-inflate

View File

@ -10,13 +10,13 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mac80211
PKG_VERSION:=6.11
PKG_VERSION:=6.11.2
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=COPYING
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/
PKG_HASH:=2c091ce9520c2e4c8a9c91a294f3c040f90cd76222674928e61542ead06cfa41
PKG_HASH:=700ea5abef8dde9e3c6df2acd32ff443da735d773d56db9a80269e2237549b34
PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(if $(BUILD_VARIANT),$(PKG_NAME)-$(BUILD_VARIANT)/)backports-$(PKG_VERSION)

View File

@ -383,7 +383,7 @@ define KernelPackage/ath12k
URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath12k
DEPENDS+= @PCI_SUPPORT +kmod-ath +@DRIVER_11AC_SUPPORT +@DRIVER_11AX_SUPPORT \
+kmod-crypto-michael-mic +kmod-qrtr-mhi \
+kmod-qcom-qmi-helpers
+kmod-qcom-qmi-helpers +@DRIVER_11BE_SUPPORT
FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath12k/ath12k.ko
AUTOLOAD:=$(call AutoProbe,ath12k)
endef

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1431,6 +1431,7 @@ int ath9k_init_debug(struct ath_hw *ah)
@@ -1429,6 +1429,7 @@ int ath9k_init_debug(struct ath_hw *ah)
ath9k_cmn_debug_base_eeprom(sc->debug.debugfs_phy, sc->sc_ah);
ath9k_cmn_debug_modal_eeprom(sc->debug.debugfs_phy, sc->sc_ah);
@ -82,7 +82,7 @@
void ath9k_cmn_debug_recv(struct dentry *debugfs_phy,
--- a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
@@ -514,6 +514,7 @@ int ath9k_htc_init_debug(struct ath_hw *
@@ -512,6 +512,7 @@ int ath9k_htc_init_debug(struct ath_hw *
ath9k_cmn_debug_base_eeprom(priv->debug.debugfs_phy, priv->ah);
ath9k_cmn_debug_modal_eeprom(priv->debug.debugfs_phy, priv->ah);

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -1432,6 +1432,7 @@ int ath9k_init_debug(struct ath_hw *ah)
@@ -1430,6 +1430,7 @@ int ath9k_init_debug(struct ath_hw *ah)
ath9k_cmn_debug_base_eeprom(sc->debug.debugfs_phy, sc->sc_ah);
ath9k_cmn_debug_modal_eeprom(sc->debug.debugfs_phy, sc->sc_ah);
ath9k_cmn_debug_eeprom(sc->debug.debugfs_phy, sc->sc_ah);
@ -137,7 +137,7 @@
+EXPORT_SYMBOL(ath9k_cmn_debug_chanbw);
--- a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
@@ -515,6 +515,7 @@ int ath9k_htc_init_debug(struct ath_hw *
@@ -513,6 +513,7 @@ int ath9k_htc_init_debug(struct ath_hw *
ath9k_cmn_debug_base_eeprom(priv->debug.debugfs_phy, priv->ah);
ath9k_cmn_debug_modal_eeprom(priv->debug.debugfs_phy, priv->ah);
ath9k_cmn_debug_eeprom(priv->debug.debugfs_phy, priv->ah);

View File

@ -254,7 +254,7 @@
static ssize_t read_file_ani(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
@@ -1392,6 +1447,10 @@ int ath9k_init_debug(struct ath_hw *ah)
@@ -1390,6 +1445,10 @@ int ath9k_init_debug(struct ath_hw *ah)
ath9k_tx99_init_debug(sc);
ath9k_cmn_spectral_init_debug(&sc->spec_priv, sc->debug.debugfs_phy);

View File

@ -51,7 +51,7 @@
int ath9k_init_debug(struct ath_hw *ah)
{
struct ath_common *common = ath9k_hw_common(ah);
@@ -1451,6 +1495,8 @@ int ath9k_init_debug(struct ath_hw *ah)
@@ -1449,6 +1493,8 @@ int ath9k_init_debug(struct ath_hw *ah)
debugfs_create_file("gpio_led", S_IWUSR,
sc->debug.debugfs_phy, sc, &fops_gpio_led);
#endif

View File

@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell <phil@raspberrypi.org>
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -3313,6 +3313,10 @@ brcmf_cfg80211_set_power_mgmt(struct wip
@@ -3314,6 +3314,10 @@ brcmf_cfg80211_set_power_mgmt(struct wip
* preference in cfg struct to apply this to
* FW later while initializing the dongle
*/

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/marvell/libertas/cfg.c
+++ b/drivers/net/wireless/marvell/libertas/cfg.c
@@ -2101,6 +2101,8 @@ struct wireless_dev *lbs_cfg_alloc(struc
@@ -2102,6 +2102,8 @@ struct wireless_dev *lbs_cfg_alloc(struc
goto err_wiphy_new;
}

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/marvell/libertas/cfg.c
+++ b/drivers/net/wireless/marvell/libertas/cfg.c
@@ -2178,6 +2178,8 @@ int lbs_cfg_register(struct lbs_private
@@ -2179,6 +2179,8 @@ int lbs_cfg_register(struct lbs_private
wdev->wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites);
wdev->wiphy->reg_notifier = lbs_reg_notifier;

View File

@ -245,7 +245,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (iter == txqi)
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1221,8 +1221,8 @@ struct ieee80211_tx_info {
@@ -1222,8 +1222,8 @@ struct ieee80211_tx_info {
status_data_idr:1,
status_data:13,
hw_queue:4,

View File

@ -24,7 +24,7 @@
have_80mhz = true;
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -5246,7 +5246,8 @@ ieee80211_determine_our_sta_mode(struct
@@ -5249,7 +5249,8 @@ ieee80211_determine_our_sta_mode(struct
/* Allow VHT if at least one channel on the sband supports 80 MHz */
for (i = 0; i < sband->n_channels; i++) {
if (sband->channels[i].flags & (IEEE80211_CHAN_DISABLED |

View File

@ -367,7 +367,7 @@ define KernelPackage/mt7925-common
$(KernelPackage/mt76-default)
TITLE:=MediaTek MT7925 wireless driver common code
HIDDEN:=1
DEPENDS+=+kmod-mt792x-common +@DRIVER_11AX_SUPPORT +kmod-hwmon-core
DEPENDS+=+kmod-mt792x-common +@DRIVER_11AX_SUPPORT +kmod-hwmon-core +@DRIVER_11BE_SUPPORT
FILES:= $(PKG_BUILD_DIR)/mt7925/mt7925-common.ko
endef
@ -664,6 +664,7 @@ define KernelPackage/mt7992-firmware/install
$(PKG_BUILD_DIR)/firmware/mt7996/mt7992_dsp.bin \
$(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom.bin \
$(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_2i5i.bin \
$(PKG_BUILD_DIR)/firmware/mt7996/mt7992_eeprom_2i5e.bin \
$(PKG_BUILD_DIR)/firmware/mt7996/mt7992_rom_patch.bin \
$(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wa.bin \
$(PKG_BUILD_DIR)/firmware/mt7996/mt7992_wm.bin \

View File

@ -0,0 +1,11 @@
--- a/tx.c
+++ b/tx.c
@@ -350,7 +350,7 @@ mt76_tx(struct mt76_phy *phy, struct iee
info->hw_queue |= FIELD_PREP(MT_TX_HW_QUEUE_PHY, phy->band_idx);
if ((info->flags & IEEE80211_TX_CTL_TX_OFFCHAN) ||
- (info->control.flags & IEEE80211_TX_CTRL_SCAN_TX))
+ (info->control.flags & IEEE80211_TX_CTRL_DONT_USE_RATE_MASK))
head = &wcid->tx_offchannel;
else
head = &wcid->tx_pending;

View File

@ -149,7 +149,6 @@ static int ubnt_ledbar_init_led(struct device_node *np, struct ubnt_ledbar *ledb
struct led_classdev *led_cdev)
{
struct led_init_data init_data = {};
int ret;
if (!np)
return 0;
@ -158,19 +157,13 @@ static int ubnt_ledbar_init_led(struct device_node *np, struct ubnt_ledbar *ledb
led_cdev->max_brightness = UBNT_LEDBAR_MAX_BRIGHTNESS;
ret = devm_led_classdev_register_ext(&ledbar->client->dev, led_cdev,
&init_data);
if (ret)
dev_err(&ledbar->client->dev, "led register err: %d\n", ret);
return ret;
return devm_led_classdev_register_ext(&ledbar->client->dev, led_cdev, &init_data);
}
static int ubnt_ledbar_probe(struct i2c_client *client)
{
struct device_node *np = client->dev.of_node;
struct ubnt_ledbar *ledbar;
int ret;
ledbar = devm_kzalloc(&client->dev, sizeof(*ledbar), GFP_KERNEL);
if (!ledbar)
@ -178,19 +171,13 @@ static int ubnt_ledbar_probe(struct i2c_client *client)
ledbar->enable_gpio = devm_gpiod_get(&client->dev, "enable", GPIOD_OUT_LOW);
if (IS_ERR(ledbar->enable_gpio)) {
ret = PTR_ERR(ledbar->enable_gpio);
dev_err(&client->dev, "Failed to get enable gpio: %d\n", ret);
return ret;
}
if (IS_ERR(ledbar->enable_gpio))
return dev_err_probe(&client->dev, PTR_ERR(ledbar->enable_gpio), "Failed to get enable gpio");
ledbar->reset_gpio = devm_gpiod_get_optional(&client->dev, "reset", GPIOD_OUT_LOW);
if (IS_ERR(ledbar->reset_gpio)) {
ret = PTR_ERR(ledbar->reset_gpio);
dev_err(&client->dev, "Failed to get reset gpio: %d\n", ret);
return ret;
}
if (IS_ERR(ledbar->reset_gpio))
return dev_err_probe(&client->dev, PTR_ERR(ledbar->reset_gpio), "Failed to get reset gpio");
ledbar->led_count = 1;
of_property_read_u32(np, "led-count", &ledbar->led_count);

View File

@ -191,7 +191,7 @@ function wiphy_detect() {
push(modes, "EHT160");
if (eht_phy_cap & 2)
push(modes, "ETH320");
push(modes, "EHT320");
}
let entry = wiphy_get_entry(name, path);

View File

@ -6,14 +6,17 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=audit-userspace
PKG_VERSION:=3.1.4
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/linux-audit/audit-userspace/archive/refs/tags/v$(PKG_VERSION).tar.gz?
PKG_HASH:=aec501760acd13ebbe00e78b9b59f795d16a430b1d673628e346cd18905c594b
PKG_VERSION:=3.1.5
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/linux-audit/$(PKG_NAME).git
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
PKG_MIRROR_HASH:=60f479476d4f1b0beadbe3e516ea67490d38ca9b01db53e56f52b1731340d5bb
PKG_MAINTAINER:=Thomas Petazzoni <thomas.petazzoni@bootlin.com>
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
PKG_LICENSE:=GPL-2.0-or-later LGPL-2.1-or-later
PKG_LICENSE_FILES:=COPYING COPYING.LIB
PKG_CPE_ID:=cpe:/a:linux_audit_project:linux_audit
PKG_CONFIG_DEPENDS:=CONFIG_KERNEL_IO_URING

View File

@ -1,615 +0,0 @@
From 429d031edd52566eeba03c3b3af32ad6e103fd94 Mon Sep 17 00:00:00 2001
From: Steve Grubb <ausearch.1@gmail.com>
Date: Fri, 3 May 2024 17:33:39 -0400
Subject: [PATCH] Implicit builtin functions
Correct a number of places where printf is being used without a prototype.
All cases are in libraries which should not be using printf. Change them
to return an error rather than communicate the problem.
This is a backport of 8c7eaa7
---
audisp/audispd-llist.c | 10 +++++-----
audisp/audispd-llist.h | 4 ++--
auparse/normalize-llist.c | 12 ++++++------
auparse/normalize-llist.h | 4 ++--
auparse/normalize.c | 14 +++++++++-----
src/auditctl-llist.c | 18 +++++++++---------
src/auditctl-llist.h | 4 ++--
src/ausearch-avc.c | 16 ++++++++--------
src/ausearch-avc.h | 4 ++--
src/ausearch-int.c | 12 ++++++------
src/ausearch-int.h | 4 ++--
src/ausearch-llist.c | 14 +++++++-------
src/ausearch-llist.h | 2 +-
src/ausearch-nvpair.c | 12 ++++++------
src/ausearch-nvpair.h | 4 ++--
src/ausearch-string.c | 10 +++++-----
src/ausearch-string.h | 2 +-
tools/aulastlog/aulastlog-llist.c | 18 +++++++++---------
tools/aulastlog/aulastlog-llist.h | 4 ++--
19 files changed, 86 insertions(+), 82 deletions(-)
--- a/audisp/audispd-llist.c
+++ b/audisp/audispd-llist.c
@@ -69,15 +69,13 @@ unsigned int plist_count_active(const co
return cnt;
}
-void plist_append(conf_llist *l, plugin_conf_t *p)
+int plist_append(conf_llist *l, plugin_conf_t *p)
{
lnode* newnode;
newnode = malloc(sizeof(lnode));
- if (newnode == NULL) {
- printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
- return;
- }
+ if (newnode == NULL)
+ return 1;
if (p) {
void *pp = malloc(sizeof(struct plugin_conf));
@@ -98,6 +96,8 @@ void plist_append(conf_llist *l, plugin_
// make newnode current
l->cur = newnode;
l->cnt++;
+
+ return 0;
}
void plist_clear(conf_llist* l)
--- a/audisp/audispd-llist.h
+++ b/audisp/audispd-llist.h
@@ -1,6 +1,6 @@
/*
* audispd-llist.h - Header file for ausearch-conf_llist.c
-* Copyright (c) 2007,2013 Red Hat Inc., Durham, North Carolina.
+* Copyright (c) 2007,2013 Red Hat Inc.
* All Rights Reserved.
*
* This software may be freely redistributed and/or modified under the
@@ -51,7 +51,7 @@ unsigned int plist_count_active(const co
void plist_last(conf_llist *l);
lnode *plist_next(conf_llist *l);
static inline lnode *plist_get_cur(conf_llist *l) { return l->cur; }
-void plist_append(conf_llist *l, plugin_conf_t *p);
+int plist_append(conf_llist *l, plugin_conf_t *p);
void plist_clear(conf_llist* l);
void plist_mark_all_unchecked(conf_llist* l);
lnode *plist_find_unchecked(conf_llist* l);
--- a/auparse/normalize-llist.c
+++ b/auparse/normalize-llist.c
@@ -1,6 +1,6 @@
/*
* normalize-llist.c - Minimal linked list library
- * Copyright (c) 2016-17 Red Hat Inc., Durham, North Carolina.
+ * Copyright (c) 2016-17 Red Hat Inc.
* All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
@@ -61,15 +61,14 @@ data_node *cllist_next(cllist *l)
return l->cur;
}
-void cllist_append(cllist *l, uint32_t num, void *data)
+// Returns 0 on success and 1 on error
+int cllist_append(cllist *l, uint32_t num, void *data)
{
data_node *newnode;
newnode = malloc(sizeof(data_node));
- if (newnode == NULL) {
- printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
- return;
- }
+ if (newnode == NULL)
+ return 1;
newnode->num = num;
newnode->data = data;
@@ -84,5 +83,6 @@ void cllist_append(cllist *l, uint32_t n
// make newnode current
l->cur = newnode;
l->cnt++;
+ return 0;
}
--- a/auparse/normalize-llist.h
+++ b/auparse/normalize-llist.h
@@ -1,6 +1,6 @@
/*
* normalize-llist.h - Header file for normalize-llist.c
- * Copyright (c) 2016-17 Red Hat Inc., Durham, North Carolina.
+ * Copyright (c) 2016-17 Red Hat Inc.
* All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
@@ -53,7 +53,7 @@ AUDIT_HIDDEN_START
void cllist_create(cllist *l, void (*cleanup)(void *));
void cllist_clear(cllist* l);
data_node *cllist_next(cllist *l);
-void cllist_append(cllist *l, uint32_t num, void *data);
+int cllist_append(cllist *l, uint32_t num, void *data);
AUDIT_HIDDEN_END
--- a/auparse/normalize.c
+++ b/auparse/normalize.c
@@ -179,7 +179,8 @@ static unsigned int add_subj_attr(aupars
if ((auparse_find_field(au, str))) {
attr = set_record(0, rnum);
attr = set_field(attr, auparse_get_field_num(au));
- cllist_append(&D.actor.attr, attr, NULL);
+ if (cllist_append(&D.actor.attr, attr, NULL))
+ return 1;
return 0;
} else
auparse_goto_record_num(au, rnum);
@@ -224,7 +225,8 @@ static unsigned int add_obj_attr(auparse
if ((auparse_find_field(au, str))) {
attr = set_record(0, rnum);
attr = set_field(attr, auparse_get_field_num(au));
- cllist_append(&D.thing.attr, attr, NULL);
+ if (cllist_append(&D.thing.attr, attr, NULL))
+ return 1;
return 0;
} else
auparse_goto_record_num(au, rnum);
@@ -360,21 +362,23 @@ static void collect_id_obj2(auparse_stat
}
}
-static void collect_path_attrs(auparse_state_t *au)
+static int collect_path_attrs(auparse_state_t *au)
{
value_t attr;
unsigned int rnum = auparse_get_record_num(au);
auparse_first_field(au);
if (add_obj_attr(au, "mode", rnum))
- return; // Failed opens don't have anything else
+ return 1; // Failed opens don't have anything else
// All the rest of the fields matter
while ((auparse_next_field(au))) {
attr = set_record(0, rnum);
attr = set_field(attr, auparse_get_field_num(au));
- cllist_append(&D.thing.attr, attr, NULL);
+ if (cllist_append(&D.thing.attr, attr, NULL))
+ return 1;
}
+ return 0;
}
static void collect_cwd_attrs(auparse_state_t *au)
--- a/src/auditctl-llist.c
+++ b/src/auditctl-llist.c
@@ -1,7 +1,7 @@
/*
* ausearch-llist.c - Minimal linked list library
-* Copyright (c) 2005 Red Hat Inc., Durham, North Carolina.
-* All Rights Reserved.
+* Copyright (c) 2005 Red Hat Inc.
+* All Rights Reserved.
*
* This software may be freely redistributed and/or modified under the
* terms of the GNU General Public License as published by the Free
@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to the
-* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
+* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1335, USA.
*
* Authors:
@@ -59,19 +59,17 @@ lnode *list_next(llist *l)
return l->cur;
}
-void list_append(llist *l, struct audit_rule_data *r, size_t sz)
+int list_append(llist *l, struct audit_rule_data *r, size_t sz)
{
lnode* newnode;
newnode = malloc(sizeof(lnode));
- if (newnode == NULL) {
- printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
- return;
- }
+ if (newnode == NULL)
+ return 1;
if (r) {
void *rr = malloc(sz);
- if (rr)
+ if (rr)
memcpy(rr, r, sz);
newnode->r = rr;
} else
@@ -89,6 +87,8 @@ void list_append(llist *l, struct audit_
// make newnode current
l->cur = newnode;
l->cnt++;
+
+ return 0;
}
void list_clear(llist* l)
--- a/src/auditctl-llist.h
+++ b/src/auditctl-llist.h
@@ -1,6 +1,6 @@
/*
* auditctl-llist.h - Header file for ausearch-llist.c
-* Copyright (c) 2005 Red Hat Inc., Durham, North Carolina.
+* Copyright (c) 2005 Red Hat Inc.
* All Rights Reserved.
*
* This software may be freely redistributed and/or modified under the
@@ -50,7 +50,7 @@ void list_first(llist *l);
void list_last(llist *l);
lnode *list_next(llist *l);
static inline lnode *list_get_cur(llist *l) { return l->cur; }
-void list_append(llist *l, struct audit_rule_data *r, size_t sz);
+int list_append(llist *l, struct audit_rule_data *r, size_t sz);
void list_clear(llist* l);
#endif
--- a/src/ausearch-avc.c
+++ b/src/ausearch-avc.c
@@ -1,7 +1,7 @@
/*
* ausearch-avc.c - Minimal linked list library for avcs
-* Copyright (c) 2006,2008,2014 Red Hat Inc., Durham, North Carolina.
-* All Rights Reserved.
+* Copyright (c) 2006,2008,2014 Red Hat Inc.
+* All Rights Reserved.
*
* This software may be freely redistributed and/or modified under the
* terms of the GNU General Public License as published by the Free
@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to the
-* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
+* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1335, USA.
*
* Authors:
@@ -62,15 +62,13 @@ static void alist_last(alist *l)
l->cur = cur;
}
-void alist_append(alist *l, anode *node)
+int alist_append(alist *l, anode *node)
{
anode* newnode;
newnode = malloc(sizeof(anode));
- if (newnode == NULL) {
- printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
- return;
- }
+ if (newnode == NULL)
+ return 1;
if (node->scontext)
newnode->scontext = node->scontext;
@@ -108,6 +106,8 @@ void alist_append(alist *l, anode *node)
// make newnode current
l->cur = newnode;
l->cnt++;
+
+ return 0;
}
int alist_find_subj(alist *l)
--- a/src/ausearch-avc.h
+++ b/src/ausearch-avc.h
@@ -1,6 +1,6 @@
/*
* ausearch-avc.h - Header file for ausearch-string.c
-* Copyright (c) 2006,2008 Red Hat Inc., Durham, North Carolina.
+* Copyright (c) 2006,2008 Red Hat Inc.
* All Rights Reserved.
*
* This software may be freely redistributed and/or modified under the
@@ -54,7 +54,7 @@ void alist_create(alist *l);
static inline void alist_first(alist *l) { l->cur = l->head; }
anode *alist_next(alist *l);
static inline anode *alist_get_cur(alist *l) { return l->cur; }
-void alist_append(alist *l, anode *node);
+int alist_append(alist *l, anode *node);
void anode_init(anode *an);
void anode_clear(anode *an);
void alist_clear(alist* l);
--- a/src/ausearch-int.c
+++ b/src/ausearch-int.c
@@ -1,6 +1,6 @@
/*
* ausearch-int.c - Minimal linked list library for integers
-* Copyright (c) 2005,2008 Red Hat Inc., Durham, North Carolina.
+* Copyright (c) 2005,2008 Red Hat Inc.
* All Rights Reserved.
*
* This software may be freely redistributed and/or modified under the
@@ -41,15 +41,13 @@ int_node *ilist_next(ilist *l)
return l->cur;
}
-void ilist_append(ilist *l, int num, unsigned int hits, int aux)
+int ilist_append(ilist *l, int num, unsigned int hits, int aux)
{
int_node* newnode;
newnode = malloc(sizeof(int_node));
- if (newnode == NULL) {
- printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
- return;
- }
+ if (newnode == NULL)
+ return 1;
newnode->num = num;
newnode->hits = hits;
@@ -65,6 +63,8 @@ void ilist_append(ilist *l, int num, uns
// make newnode current
l->cur = newnode;
l->cnt++;
+
+ return 0;
}
void ilist_clear(ilist* l)
--- a/src/ausearch-int.h
+++ b/src/ausearch-int.h
@@ -1,6 +1,6 @@
/*
* ausearch-int.h - Header file for ausearch-int.c
-* Copyright (c) 2005,2008 Red Hat Inc., Durham, North Carolina.
+* Copyright (c) 2005,2008 Red Hat Inc.
* All Rights Reserved.
*
* This software may be freely redistributed and/or modified under the
@@ -48,7 +48,7 @@ void ilist_create(ilist *l);
static inline void ilist_first(ilist *l) { l->cur = l->head; }
int_node *ilist_next(ilist *l);
static inline int_node *ilist_get_cur(ilist *l) { return l->cur; }
-void ilist_append(ilist *l, int num, unsigned int hits, int aux);
+int ilist_append(ilist *l, int num, unsigned int hits, int aux);
void ilist_clear(ilist* l);
/* append a number if its not already on the list */
--- a/src/ausearch-llist.c
+++ b/src/ausearch-llist.c
@@ -1,6 +1,6 @@
/*
* ausearch-llist.c - Minimal linked list library
-* Copyright (c) 2005-2008,2011,2016 Red Hat Inc., Durham, North Carolina.
+* Copyright (c) 2005-2008,2011,2016 Red Hat Inc.
* Copyright (c) 2011 IBM Corp.
* All Rights Reserved.
*
@@ -102,15 +102,13 @@ lnode *list_prev(llist *l)
return l->cur;
}
-void list_append(llist *l, lnode *node)
+int list_append(llist *l, lnode *node)
{
lnode* newnode;
newnode = malloc(sizeof(lnode));
- if (newnode == NULL) {
- printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
- return;
- }
+ if (newnode == NULL)
+ return 1;
if (node->message)
newnode->message = node->message;
@@ -123,7 +121,7 @@ void list_append(llist *l, lnode *node)
newnode->type = node->type;
newnode->a0 = node->a0;
newnode->a1 = node->a1;
- newnode->item = l->cnt;
+ newnode->item = l->cnt;
newnode->next = NULL;
// if we are at top, fix this up
@@ -135,6 +133,8 @@ void list_append(llist *l, lnode *node)
// make newnode current
l->cur = newnode;
l->cnt++;
+
+ return 0;
}
int list_find_item(llist *l, unsigned int i)
--- a/src/ausearch-llist.h
+++ b/src/ausearch-llist.h
@@ -107,7 +107,7 @@ void list_last(llist *l);
lnode *list_next(llist *l);
lnode *list_prev(llist *l);
static inline lnode *list_get_cur(llist *l) { return l->cur; }
-void list_append(llist *l, lnode *node);
+int list_append(llist *l, lnode *node);
void list_clear(llist* l);
int list_get_event(llist* l, event *e);
--- a/src/ausearch-nvpair.c
+++ b/src/ausearch-nvpair.c
@@ -1,6 +1,6 @@
/*
* ausearch-nvpair.c - Minimal linked list library for name-value pairs
-* Copyright (c) 2006-08 Red Hat Inc., Durham, North Carolina.
+* Copyright (c) 2006-08 Red Hat Inc.
* All Rights Reserved.
*
* This software may be freely redistributed and/or modified under the
@@ -42,13 +42,11 @@ nvnode *search_list_next(nvlist *l)
return l->cur;
}
-void search_list_append(nvlist *l, nvnode *node)
+int search_list_append(nvlist *l, nvnode *node)
{
nvnode* newnode = malloc(sizeof(nvnode));
- if (newnode == NULL) {
- printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
- return;
- }
+ if (newnode == NULL)
+ return 1;
newnode->name = node->name;
newnode->val = node->val;
@@ -66,6 +64,8 @@ void search_list_append(nvlist *l, nvnod
// make newnode current
l->cur = newnode;
l->cnt++;
+
+ return 0;
}
int search_list_find_val(nvlist *l, long val)
--- a/src/ausearch-nvpair.h
+++ b/src/ausearch-nvpair.h
@@ -1,6 +1,6 @@
/*
* ausearch-nvpair.h - Header file for ausearch-nvpair.c
-* Copyright (c) 2006-08 Red Hat Inc., Durham, North Carolina.
+* Copyright (c) 2006-08 Red Hat Inc.
* All Rights Reserved.
*
* This software may be freely redistributed and/or modified under the
@@ -48,7 +48,7 @@ void search_list_create(nvlist *l);
static inline void search_list_first(nvlist *l) { l->cur = l->head; }
nvnode *search_list_next(nvlist *l);
static inline nvnode *search_list_get_cur(nvlist *l) { return l->cur; }
-void search_list_append(nvlist *l, nvnode *node);
+int search_list_append(nvlist *l, nvnode *node);
void search_list_clear(nvlist* l);
/* Given a numeric index, find that record. */
--- a/src/ausearch-string.c
+++ b/src/ausearch-string.c
@@ -44,15 +44,13 @@ snode *slist_next(slist *l)
return l->cur;
}
-void slist_append(slist *l, snode *node)
+int slist_append(slist *l, snode *node)
{
snode* newnode;
newnode = malloc(sizeof(snode));
- if (newnode == NULL) {
- printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
- return;
- }
+ if (newnode == NULL)
+ return 1;
if (node->str)
newnode->str = node->str;
@@ -79,6 +77,8 @@ void slist_append(slist *l, snode *node)
// make newnode current
l->cur = newnode;
l->cnt++;
+
+ return 0;
}
void slist_clear(slist* l)
--- a/src/ausearch-string.h
+++ b/src/ausearch-string.h
@@ -49,7 +49,7 @@ void slist_create(slist *l);
static inline void slist_first(slist *l) { l->cur = l->head; }
snode *slist_next(slist *l);
static inline snode *slist_get_cur(slist *l) { return l->cur; }
-void slist_append(slist *l, snode *node);
+int slist_append(slist *l, snode *node);
void slist_clear(slist* l);
/* append a string if its not already on the list */
--- a/tools/aulastlog/aulastlog-llist.c
+++ b/tools/aulastlog/aulastlog-llist.c
@@ -1,7 +1,7 @@
/*
* aulastlog-llist.c - Minimal linked list library
-* Copyright (c) 2008 Red Hat Inc., Durham, North Carolina.
-* All Rights Reserved.
+* Copyright (c) 2008 Red Hat Inc..
+* All Rights Reserved.
*
* This software may be freely redistributed and/or modified under the
* terms of the GNU General Public License as published by the Free
@@ -15,7 +15,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to the
-* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
+* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1335, USA.
*
* Authors:
@@ -41,15 +41,13 @@ lnode *list_next(llist *l)
return l->cur;
}
-void list_append(llist *l, lnode *node)
+int list_append(llist *l, lnode *node)
{
lnode* newnode;
newnode = malloc(sizeof(lnode));
- if (newnode == NULL) {
- printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
- return;
- }
+ if (newnode == NULL)
+ return 1;
newnode->sec = node->sec;
newnode->uid = node->uid;
@@ -62,7 +60,7 @@ void list_append(llist *l, lnode *node)
newnode->term = strdup(node->term);
else
newnode->term = NULL;
- newnode->item = l->cnt;
+ newnode->item = l->cnt;
newnode->next = NULL;
// if we are at top, fix this up
@@ -74,6 +72,8 @@ void list_append(llist *l, lnode *node)
// make newnode current
l->cur = newnode;
l->cnt++;
+
+ return 0;
}
void list_clear(llist* l)
--- a/tools/aulastlog/aulastlog-llist.h
+++ b/tools/aulastlog/aulastlog-llist.h
@@ -1,6 +1,6 @@
/*
* aulastlog-llist.h - Header file for aulastlog-llist.c
-* Copyright (c) 2008 Red Hat Inc., Durham, North Carolina.
+* Copyright (c) 2008 Red Hat Inc.
* All Rights Reserved.
*
* This software may be freely redistributed and/or modified under the
@@ -53,7 +53,7 @@ static inline void list_first(llist *l)
lnode *list_next(llist *l);
static inline lnode *list_get_cur(llist *l) { return l->cur; }
static inline unsigned int list_get_cnt(llist *l) { return l->cnt; }
-void list_append(llist *l, lnode *node);
+int list_append(llist *l, lnode *node);
void list_clear(llist* l);
int list_update_login(llist* l, time_t t);
int list_update_host(llist* l, const char *h);

View File

@ -144,8 +144,6 @@ static int gpio_rb91x_key_probe(struct platform_device *pdev)
struct gpio_rb91x_key *drvdata;
struct gpio_chip *gc;
struct device *dev = &pdev->dev;
struct fwnode_handle *fwnode = dev->fwnode;
int r;
drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL);
if (!drvdata)
@ -155,16 +153,12 @@ static int gpio_rb91x_key_probe(struct platform_device *pdev)
mutex_init(&drvdata->poll_mutex);
drvdata->gpio = devm_gpiod_get(dev, NULL, GPIOD_OUT_LOW);
if (IS_ERR(drvdata->gpio)) {
if (PTR_ERR(drvdata->gpio) != -EPROBE_DEFER) {
dev_err(dev, "failed to get gpio: %ld\n",
PTR_ERR(drvdata->gpio));
}
return PTR_ERR(drvdata->gpio);
}
if (IS_ERR(drvdata->gpio))
return dev_err_probe(dev, PTR_ERR(drvdata->gpio), "failed to get gpio");
gc = &drvdata->gc;
gc->label = GPIO_RB91X_KEY_DRIVER_NAME;
gc->parent = dev;
gc->can_sleep = 1;
gc->base = -1;
gc->ngpio = GPIO_RB91X_KEY_NGPIOS;
@ -172,25 +166,10 @@ static int gpio_rb91x_key_probe(struct platform_device *pdev)
gc->set = gpio_rb91x_key_set;
gc->direction_output = gpio_rb91x_key_direction_output;
gc->direction_input = gpio_rb91x_key_direction_input;
gc->fwnode = fwnode;
platform_set_drvdata(pdev, drvdata);
r = gpiochip_add(&drvdata->gc);
if (r) {
dev_err(dev, "gpiochip_add() failed: %d\n", r);
return r;
}
return 0;
}
static int gpio_rb91x_key_remove(struct platform_device *pdev)
{
struct gpio_rb91x_key *drvdata = platform_get_drvdata(pdev);
gpiochip_remove(&drvdata->gc);
return 0;
return devm_gpiochip_add_data(dev, gc, drvdata);
}
static const struct of_device_id gpio_rb91x_key_match[] = {
@ -202,7 +181,6 @@ MODULE_DEVICE_TABLE(of, gpio_rb91x_key_match);
static struct platform_driver gpio_rb91x_key_driver = {
.probe = gpio_rb91x_key_probe,
.remove = gpio_rb91x_key_remove,
.driver = {
.name = GPIO_RB91X_KEY_DRIVER_NAME,
.owner = THIS_MODULE,

View File

@ -77,13 +77,14 @@
partition@100000 {
reg = <0x100000 0xff00000>;
label = "ubi";
compatible = "linux,ubi";
volumes {
ubi-volume-env1 {
volname = "env1";
nvmem-layout {
compatible = "u-boot,env";
compatible = "u-boot,env-redundant-count";
ethaddr: ethaddr {
#nvmem-cell-cells = <1>;

View File

@ -84,7 +84,7 @@
&gmac1 {
status = "okay";
label = "eth0";
label = "wan1";
phy-handle = <&ethphy0>;
};
@ -97,22 +97,22 @@
port@1 {
status = "okay";
label = "eth1";
label = "lan2";
};
port@2 {
status = "okay";
label = "eth2";
label = "lan3";
};
port@3 {
status = "okay";
label = "eth3";
label = "lan4";
};
port@4 {
status = "okay";
label = "eth4";
label = "lan5";
};
};
};

View File

@ -2745,6 +2745,8 @@ TARGET_DEVICES += tplink_ec330-g5u-v1
define Device/tplink_er605-v2
$(Device/nand)
DEVICE_COMPAT_VERSION := 1.2
DEVICE_COMPAT_MESSAGE := Config cannot be migrated because interface names have changed
DEVICE_VENDOR := TP-Link
DEVICE_MODEL := ER605
DEVICE_VARIANT := v2

View File

@ -150,7 +150,7 @@ ramips_setup_interfaces()
ucidef_set_interface_lan "lan0 lan1 lan2 lan3"
;;
tplink,er605-v2)
ucidef_set_interfaces_lan_wan "eth1 eth2 eth3 eth4" "eth0"
ucidef_set_interfaces_lan_wan "lan2 lan3 lan4 lan5" "wan1"
;;
tplink,tl-wpa8631p-v3)
ucidef_set_interface_lan "lan1 lan2 lan3 plc0"

View File

@ -12,6 +12,9 @@ case "$(board_name)" in
iptime,ax2004m)
ucidef_set_compat_version "2.0"
;;
tplink,er605-v2)
ucidef_set_compat_version "1.2"
;;
*)
ucidef_set_compat_version "1.1"
;;

View File

@ -176,6 +176,7 @@ CONFIG_MTD_SPLIT_UIMAGE_FW=y
CONFIG_MTD_UBI=y
CONFIG_MTD_UBI_BEB_LIMIT=20
CONFIG_MTD_UBI_BLOCK=y
CONFIG_MTD_UBI_NVMEM=y
CONFIG_MTD_UBI_WL_THRESHOLD=4096
CONFIG_MTD_VIRT_CONCAT=y
CONFIG_NEED_DMA_MAP_STATE=y
@ -201,6 +202,7 @@ CONFIG_NR_CPUS=4
CONFIG_NVMEM=y
CONFIG_NVMEM_LAYOUTS=y
# CONFIG_NVMEM_LAYOUT_MIKROTIK is not set
CONFIG_NVMEM_LAYOUT_U_BOOT_ENV=y
CONFIG_OF=y
CONFIG_OF_ADDRESS=y
CONFIG_OF_EARLY_FLATTREE=y
@ -243,7 +245,6 @@ CONFIG_QCOM_NET_PHYLIB=y
CONFIG_QUEUED_RWLOCKS=y
CONFIG_QUEUED_SPINLOCKS=y
CONFIG_RALINK=y
# CONFIG_RALINK_GDMA is not set
# CONFIG_RALINK_WDT is not set
CONFIG_RANDSTRUCT_NONE=y
CONFIG_RATIONAL=y

View File

@ -69,7 +69,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
obj-$(CONFIG_I2C_QUP) += i2c-qup.o
--- /dev/null
+++ b/drivers/i2c/busses/i2c-ralink.c
@@ -0,0 +1,440 @@
@@ -0,0 +1,397 @@
+/*
+ * drivers/i2c/busses/i2c-ralink.c
+ *
@ -410,101 +410,58 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
+
+static int rt_i2c_probe(struct platform_device *pdev)
+{
+ struct resource *res;
+ struct device *dev = &pdev->dev;
+ struct rt_i2c *i2c;
+ struct i2c_adapter *adap;
+ const struct of_device_id *match;
+ int ret, restart;
+ int restart;
+
+ match = of_match_device(i2c_rt_dt_ids, &pdev->dev);
+
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res) {
+ dev_err(&pdev->dev, "no memory resource found\n");
+ return -ENODEV;
+ }
+
+ i2c = devm_kzalloc(&pdev->dev, sizeof(struct rt_i2c), GFP_KERNEL);
+ i2c = devm_kzalloc(dev, sizeof(struct rt_i2c), GFP_KERNEL);
+ if (!i2c) {
+ dev_err(&pdev->dev, "failed to allocate i2c_adapter\n");
+ dev_err(dev, "failed to allocate i2c_adapter\n");
+ return -ENOMEM;
+ }
+
+ i2c->base = devm_ioremap_resource(&pdev->dev, res);
+ i2c->base = devm_platform_ioremap_resource(pdev, 0);
+ if (IS_ERR(i2c->base))
+ return PTR_ERR(i2c->base);
+
+ i2c->clk = devm_clk_get(&pdev->dev, NULL);
+ if (IS_ERR(i2c->clk)) {
+ dev_err(&pdev->dev, "no clock defined\n");
+ return -ENODEV;
+ }
+ clk_prepare_enable(i2c->clk);
+ i2c->dev = &pdev->dev;
+ i2c->clk = devm_clk_get_enabled(dev, NULL);
+ if (IS_ERR(i2c->clk))
+ return dev_err_probe(dev, PTR_ERR(i2c->clk), "no clock defined");
+
+ i2c->dev = dev;
+
+ if (of_property_read_u32(pdev->dev.of_node,
+ "clock-frequency", &i2c->cur_clk))
+ i2c->cur_clk = 100000;
+
+ adap = &i2c->adap;
+ adap->owner = THIS_MODULE;
+ adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
+ adap->algo = &rt_i2c_algo;
+ adap->retries = 3;
+ adap->dev.parent = &pdev->dev;
+ adap->dev.parent = dev;
+ i2c_set_adapdata(adap, i2c);
+ adap->dev.of_node = pdev->dev.of_node;
+ strlcpy(adap->name, dev_name(&pdev->dev), sizeof(adap->name));
+ strlcpy(adap->name, dev_name(dev), sizeof(adap->name));
+ adap->quirks = &rt_i2c_quirks;
+
+ platform_set_drvdata(pdev, i2c);
+
+ restart = rt_i2c_init(i2c);
+
+ ret = i2c_add_adapter(adap);
+ if (ret < 0) {
+ dev_err(&pdev->dev, "failed to add adapter\n");
+ clk_disable_unprepare(i2c->clk);
+ return ret;
+ }
+
+ dev_info(&pdev->dev, "clock %uKHz, re-start %ssupport\n",
+ dev_info(dev, "clock %uKHz, re-start %ssupport\n",
+ i2c->cur_clk/1000, restart ? "" : "not ");
+
+ return ret;
+}
+
+static int rt_i2c_remove(struct platform_device *pdev)
+{
+ struct rt_i2c *i2c = platform_get_drvdata(pdev);
+
+ i2c_del_adapter(&i2c->adap);
+ clk_disable_unprepare(i2c->clk);
+
+ return 0;
+ return devm_i2c_add_adapter(dev, adap);
+}
+
+static struct platform_driver rt_i2c_driver = {
+ .probe = rt_i2c_probe,
+ .remove = rt_i2c_remove,
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = "i2c-ralink",
+ .of_match_table = i2c_rt_dt_ids,
+ },
+};
+
+static int __init i2c_rt_init (void)
+{
+ return platform_driver_register(&rt_i2c_driver);
+}
+subsys_initcall(i2c_rt_init);
+
+static void __exit i2c_rt_exit (void)
+{
+ platform_driver_unregister(&rt_i2c_driver);
+}
+module_exit(i2c_rt_exit);
+module_platform_driver(rt_i2c_driver);
+
+MODULE_AUTHOR("Steven Liu <steven_liu@mediatek.com>");
+MODULE_DESCRIPTION("Ralink I2c host driver");

View File

@ -9,6 +9,7 @@
CONFIG_AMD_NB=y
CONFIG_ARCH_32BIT_OFF_T=y
CONFIG_ARCH_CLOCKSOURCE_INIT=y
CONFIG_ARCH_CONFIGURES_CPU_MITIGATIONS=y
CONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y