@@ -48,49 +48,6 @@ static ssize_t name_show(struct device *dev,
48
48
}
49
49
static DEVICE_ATTR_RO (name );
50
50
51
- #define MASTER_SHOW_COMPLEX (name , format_string , args ...) \
52
- static ssize_t name ## _show(struct device *dev, \
53
- struct device_attribute *attr, char *buf) \
54
- { \
55
- struct wpan_phy *phy = container_of(dev, struct wpan_phy, dev); \
56
- int ret; \
57
- \
58
- mutex_lock(&phy->pib_lock); \
59
- ret = snprintf(buf, PAGE_SIZE, format_string "\n", args); \
60
- mutex_unlock(&phy->pib_lock); \
61
- return ret; \
62
- } \
63
- static DEVICE_ATTR_RO(name)
64
-
65
- #define MASTER_SHOW (field , format_string ) \
66
- MASTER_SHOW_COMPLEX(field, format_string, phy->field)
67
-
68
- MASTER_SHOW (current_channel , "%d" );
69
- MASTER_SHOW (current_page , "%d" );
70
- MASTER_SHOW (transmit_power , "%d +- 1 dB" );
71
- MASTER_SHOW_COMPLEX (cca_mode , "%d" , phy -> cca .mode );
72
-
73
- static ssize_t channels_supported_show (struct device * dev ,
74
- struct device_attribute * attr ,
75
- char * buf )
76
- {
77
- struct wpan_phy * phy = container_of (dev , struct wpan_phy , dev );
78
- int ret ;
79
- int i , len = 0 ;
80
-
81
- mutex_lock (& phy -> pib_lock );
82
- for (i = 0 ; i < 32 ; i ++ ) {
83
- ret = snprintf (buf + len , PAGE_SIZE - len ,
84
- "%#09x\n" , phy -> channels_supported [i ]);
85
- if (ret < 0 )
86
- break ;
87
- len += ret ;
88
- }
89
- mutex_unlock (& phy -> pib_lock );
90
- return len ;
91
- }
92
- static DEVICE_ATTR_RO (channels_supported );
93
-
94
51
static void wpan_phy_release (struct device * dev )
95
52
{
96
53
struct cfg802154_registered_device * rdev = dev_to_rdev (dev );
@@ -101,12 +58,6 @@ static void wpan_phy_release(struct device *dev)
101
58
static struct attribute * pmib_attrs [] = {
102
59
& dev_attr_index .attr ,
103
60
& dev_attr_name .attr ,
104
- /* below will be removed soon */
105
- & dev_attr_current_channel .attr ,
106
- & dev_attr_current_page .attr ,
107
- & dev_attr_channels_supported .attr ,
108
- & dev_attr_transmit_power .attr ,
109
- & dev_attr_cca_mode .attr ,
110
61
NULL ,
111
62
};
112
63
ATTRIBUTE_GROUPS (pmib );
0 commit comments