|
@@ -425,7 +425,7 @@ static int wl1271_plt_init(struct wl1271 *wl)
|
|
|
goto out_free_memmap;
|
|
|
|
|
|
/* Default fragmentation threshold */
|
|
|
- ret = wl1271_acx_frag_threshold(wl);
|
|
|
+ ret = wl1271_acx_frag_threshold(wl, wl->conf.tx.frag_threshold);
|
|
|
if (ret < 0)
|
|
|
goto out_free_memmap;
|
|
|
|
|
@@ -1745,6 +1745,34 @@ out:
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
+static int wl1271_op_set_frag_threshold(struct ieee80211_hw *hw, u32 value)
|
|
|
+{
|
|
|
+ struct wl1271 *wl = hw->priv;
|
|
|
+ int ret = 0;
|
|
|
+
|
|
|
+ mutex_lock(&wl->mutex);
|
|
|
+
|
|
|
+ if (unlikely(wl->state == WL1271_STATE_OFF)) {
|
|
|
+ ret = -EAGAIN;
|
|
|
+ goto out;
|
|
|
+ }
|
|
|
+
|
|
|
+ ret = wl1271_ps_elp_wakeup(wl, false);
|
|
|
+ if (ret < 0)
|
|
|
+ goto out;
|
|
|
+
|
|
|
+ ret = wl1271_acx_frag_threshold(wl, (u16)value);
|
|
|
+ if (ret < 0)
|
|
|
+ wl1271_warning("wl1271_op_set_frag_threshold failed: %d", ret);
|
|
|
+
|
|
|
+ wl1271_ps_elp_sleep(wl);
|
|
|
+
|
|
|
+out:
|
|
|
+ mutex_unlock(&wl->mutex);
|
|
|
+
|
|
|
+ return ret;
|
|
|
+}
|
|
|
+
|
|
|
static int wl1271_op_set_rts_threshold(struct ieee80211_hw *hw, u32 value)
|
|
|
{
|
|
|
struct wl1271 *wl = hw->priv;
|
|
@@ -2421,6 +2449,7 @@ static const struct ieee80211_ops wl1271_ops = {
|
|
|
.set_key = wl1271_op_set_key,
|
|
|
.hw_scan = wl1271_op_hw_scan,
|
|
|
.bss_info_changed = wl1271_op_bss_info_changed,
|
|
|
+ .set_frag_threshold = wl1271_op_set_frag_threshold,
|
|
|
.set_rts_threshold = wl1271_op_set_rts_threshold,
|
|
|
.conf_tx = wl1271_op_conf_tx,
|
|
|
.get_tsf = wl1271_op_get_tsf,
|