All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dedy Lansky <qca_dlansky@qualcomm.com>
To: "John W . Linville" <linville@tuxdriver.com>
Cc: Dedy Lansky <qca_dlansky@qualcomm.com>,
	<linux-wireless@vger.kernel.org>, <wil6210@qca.qualcomm.com>,
	Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Subject: [PATCH 11/14] wil6210: Limit max number of associated stations
Date: Mon, 4 Aug 2014 11:20:51 +0300	[thread overview]
Message-ID: <1407140454-31639-12-git-send-email-qca_dlansky@qca.qualcomm.com> (raw)
In-Reply-To: <1407140454-31639-1-git-send-email-qca_dlansky@qca.qualcomm.com>

Add a module parameter to support setting the maximum
number of stations that can be associated to an AP.

Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
---
 drivers/net/wireless/ath/wil6210/wmi.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c
index 0beb129..596d6c1 100644
--- a/drivers/net/wireless/ath/wil6210/wmi.c
+++ b/drivers/net/wireless/ath/wil6210/wmi.c
@@ -14,6 +14,7 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include <linux/moduleparam.h>
 #include <linux/etherdevice.h>
 #include <linux/if_arp.h>
 
@@ -22,6 +23,10 @@
 #include "wmi.h"
 #include "trace.h"
 
+static uint max_assoc_sta = 1;
+module_param(max_assoc_sta, uint, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(max_assoc_sta, " Max number of stations associated to the AP");
+
 /**
  * WMI event receiving - theory of operations
  *
@@ -794,7 +799,7 @@ int wmi_pcp_start(struct wil6210_priv *wil, int bi, u8 wmi_nettype, u8 chan)
 		.network_type = wmi_nettype,
 		.disable_sec_offload = 1,
 		.channel = chan - 1,
-		.pcp_max_assoc_sta = WIL6210_MAX_CID,
+		.pcp_max_assoc_sta = max_assoc_sta,
 	};
 	struct {
 		struct wil6210_mbox_hdr_wmi wmi;
@@ -804,6 +809,14 @@ int wmi_pcp_start(struct wil6210_priv *wil, int bi, u8 wmi_nettype, u8 chan)
 	if (!wil->secure_pcp)
 		cmd.disable_sec = 1;
 
+	if ((cmd.pcp_max_assoc_sta > WIL6210_MAX_CID) ||
+	    (cmd.pcp_max_assoc_sta <= 0)) {
+		wil_info(wil,
+			 "Requested connection limit %u, valid values are 1 - %d. Setting to %d\n",
+			 max_assoc_sta, WIL6210_MAX_CID, WIL6210_MAX_CID);
+		cmd.pcp_max_assoc_sta = WIL6210_MAX_CID;
+	}
+
 	/*
 	 * Processing time may be huge, in case of secure AP it takes about
 	 * 3500ms for FW to start AP
-- 
1.8.5.2


  parent reply	other threads:[~2014-08-04  8:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-04  8:20 [PATCH 00/14] wil6210 misc updates Dedy Lansky
2014-08-04  8:20 ` [PATCH 01/14] wil6210: map MAC timer for packet lifetime into debugfs Dedy Lansky
2014-08-04  8:20 ` [PATCH 02/14] wil6210: fix race in reset Dedy Lansky
2014-08-04  8:20 ` [PATCH 03/14] wil6210: update copyright year 2014 Dedy Lansky
2014-08-04  8:20 ` [PATCH 04/14] wil6210: Optimization for Interrupt moderation threshold value Dedy Lansky
2014-08-04 17:38   ` Florian Fainelli
2014-08-05  6:15     ` qca_dlansky
2014-08-04  8:20 ` [PATCH 05/14] wil6210: check error in wil_target_reset() Dedy Lansky
2014-08-04  8:20 ` [PATCH 06/14] wil6210: wait longer for hardware reset completion Dedy Lansky
2014-08-04  8:20 ` [PATCH 07/14] wil6210: Workaround for Sparrow with bad device id Dedy Lansky
2014-08-04  8:20 ` [PATCH 08/14] wil6210: convert debugfs to the table mode Dedy Lansky
2014-08-04  8:20 ` [PATCH 09/14] wil6210: fix beamforming data reporting Dedy Lansky
2014-08-04  8:20 ` [PATCH 10/14] wil6210: fix false "scan timeout" Dedy Lansky
2014-08-04  8:20 ` Dedy Lansky [this message]
2014-08-04  8:20 ` [PATCH 12/14] wil6210: fix free'd memory access in wil_if_free() Dedy Lansky
2014-08-04  8:20 ` [PATCH 13/14] wil6210: cfg80211_rx_mgmt to use GFP_ATOMIC Dedy Lansky
2014-08-04  8:20 ` [PATCH 14/14] wil6210: fix access after free in wil_pcie_remove() Dedy Lansky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1407140454-31639-12-git-send-email-qca_dlansky@qca.qualcomm.com \
    --to=qca_dlansky@qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=qca_vkondrat@qca.qualcomm.com \
    --cc=wil6210@qca.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.