o wl3501: implement get frag threshold wireless extension

parent 7b4448c8
......@@ -2088,6 +2088,22 @@ static int wl3501_get_rts_threshold(struct net_device *dev,
return rc;
}
static int wl3501_get_frag_threshold(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
u16 threshold;
struct wl3501_card *this = (struct wl3501_card *)dev->priv;
int rc = wl3501_get_mib_value(this, WL3501_MIB_ATTR_FRAG_THRESHOLD,
&threshold, sizeof(threshold));
if (!rc) {
wrqu->frag.value = threshold;
wrqu->frag.disabled = threshold >= 2346;
wrqu->frag.fixed = 1;
}
return rc;
}
static const iw_handler wl3501_handler[] = {
[SIOCGIWNAME - SIOCIWFIRST] = wl3501_get_name,
[SIOCSIWFREQ - SIOCIWFIRST] = wl3501_set_freq,
......@@ -2108,6 +2124,7 @@ static const iw_handler wl3501_handler[] = {
[SIOCGIWNICKN - SIOCIWFIRST] = wl3501_get_nick,
[SIOCGIWRATE - SIOCIWFIRST] = wl3501_get_rate,
[SIOCGIWRTS - SIOCIWFIRST] = wl3501_get_rts_threshold,
[SIOCGIWFRAG - SIOCIWFIRST] = wl3501_get_frag_threshold,
};
static const struct iw_handler_def wl3501_handler_def = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment