Lines 107-127
static int iw_get_freq(struct net_device
Link Here
|
107 |
struct iw_request_info *info, |
107 |
struct iw_request_info *info, |
108 |
union iwreq_data *req, char *extra) |
108 |
union iwreq_data *req, char *extra) |
109 |
{ |
109 |
{ |
110 |
int r; |
|
|
111 |
struct zd_mac *mac = zd_netdev_mac(netdev); |
110 |
struct zd_mac *mac = zd_netdev_mac(netdev); |
112 |
struct iw_freq *freq = &req->freq; |
111 |
struct iw_freq *freq = &req->freq; |
113 |
u8 channel; |
|
|
114 |
u8 flags; |
115 |
|
116 |
r = zd_mac_get_channel(mac, &channel, &flags); |
117 |
if (r) |
118 |
return r; |
119 |
|
112 |
|
120 |
freq->flags = (flags & MAC_FIXED_CHANNEL) ? |
113 |
return zd_channel_to_freq(freq, zd_mac_get_channel(mac)); |
121 |
IW_FREQ_FIXED : IW_FREQ_AUTO; |
|
|
122 |
dev_dbg_f(zd_mac_dev(mac), "channel %s\n", |
123 |
(flags & MAC_FIXED_CHANNEL) ? "fixed" : "auto"); |
124 |
return zd_channel_to_freq(freq, channel); |
125 |
} |
114 |
} |
126 |
|
115 |
|
127 |
static int iw_set_mode(struct net_device *netdev, |
116 |
static int iw_set_mode(struct net_device *netdev, |