Skip to content

Commit

Permalink
mt76x2: move efuse debugfs blob to core
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Fietkau <[email protected]>
  • Loading branch information
Felix Fietkau committed Feb 22, 2016
1 parent 65c0e3d commit 02b9245
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 2 additions & 0 deletions debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions mt76.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion mt76x2.h
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
1 change: 0 additions & 1 deletion mt76x2_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions mt76x2_eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 02b9245

Please sign in to comment.