mt76x2: move efuse debugfs blob to core

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2016-02-22 08:47:26 +01:00
parent 65c0e3dccf
commit 02b9245b9e
5 changed files with 7 additions and 6 deletions
+2
View File
@@ -63,6 +63,8 @@ struct dentry *mt76_register_debugfs(struct mt76_dev *dev)
debugfs_create_u32("regidx", S_IRUSR | S_IWUSR, dir, &dev->debugfs_reg);
debugfs_create_file("regval", S_IRUSR | S_IWUSR, dir, dev, &fops_regval);
debugfs_create_blob("eeprom", S_IRUSR, dir, &dev->eeprom);
if (dev->otp.data)
debugfs_create_blob("otp", S_IRUSR, dir, &dev->otp);
debugfs_create_devm_seqfile(dev->dev, "queues", dir, mt76_queues_read);
return dir;
+1
View File
@@ -191,6 +191,7 @@ struct mt76_dev {
struct ieee80211_supported_band sband_2g;
struct ieee80211_supported_band sband_5g;
struct debugfs_blob_wrapper eeprom;
struct debugfs_blob_wrapper otp;
struct mt76_hw_cap cap;
u32 debugfs_reg;
-1
View File
@@ -127,7 +127,6 @@ struct mt76x2_dev {
u16 chainmask;
struct mt76x2_calibration cal;
struct debugfs_blob_wrapper otp;
s8 target_power;
s8 target_power_delta[2];
-1
View File
@@ -89,7 +89,6 @@ void mt76x2_init_debugfs(struct mt76x2_dev *dev)
if (!dir)
return;
debugfs_create_blob("otp", S_IRUSR, dir, &dev->otp);
debugfs_create_u8("temperature", S_IRUSR, dir, &dev->cal.temp);
debugfs_create_file("ampdu_stat", S_IRUSR, dir, dev, &fops_ampdu_stat);
+4 -4
View File
@@ -223,12 +223,12 @@ mt76x2_eeprom_load(struct mt76x2_dev *dev)
if (found)
found = !mt76x2_check_eeprom(dev);
dev->otp.data = devm_kzalloc(dev->mt76.dev, len, GFP_KERNEL);
dev->otp.size = len;
if (!dev->otp.data)
dev->mt76.otp.data = devm_kzalloc(dev->mt76.dev, len, GFP_KERNEL);
dev->mt76.otp.size = len;
if (!dev->mt76.otp.data)
return -ENOMEM;
efuse = dev->otp.data;
efuse = dev->mt76.otp.data;
if (mt76x2_get_efuse_data(dev, efuse, len))
goto out;