* Re: [PATCH v3 1/3] Documentation: dt: net: add mt76 wireless device binding
From: Kalle Valo @ 2016-09-08 10:54 UTC (permalink / raw)
To: Felix Fietkau; +Cc: linux-wireless, devicetree
In-Reply-To: <20160905095128.80560-2-nbd@nbd.name>
Felix Fietkau <nbd@nbd.name> writes:
> Signed-off-by: Felix Fietkau <nbd@nbd.name>
> ---
> .../bindings/net/wireless/mediatek,mt76.txt | 26 ++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt
>
> diff --git a/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt
> new file mode 100644
> index 0000000..d51c35f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/wireless/mediatek,mt76.txt
> @@ -0,0 +1,26 @@
> +* MediaTek mt76xx devices
> +
> +This node provides properties for configuring the MediaTek mt76xx wireless
> +device. The node is expected to be specified as a child node of the PCI
> +controller to which the wireless chip is connected.
> +
> +Optional properties:
> +
> +- mac-address: See ethernet.txt in the parent directory
> +- local-mac-address: See ethernet.txt in the parent directory
> +- mediatek,2ghz: Override the 2.4 GHz band capability from EEPROM
> +- mediatek,5ghz: Override the 5 GHz band capability from EEPROM
> +- mediatek,mtd-eeprom: Specify a MTD partition + offset containing EEPROM data
> +
> +&pcie {
> + status = "okay";
> +
> + pcie0 {
> + mt76@0,0 {
> + reg = <0x0000 0 0 0 0>;
> + device_type = "pci";
> + mediatek,mtd-eeprom = <&factory 0x8000>;
> + mediatek,2ghz = <0>;
> + };
> + };
> +};
I need an ack from device tree maintainers, CCing the devicetree list.
Do we need to resend or this ok?
Patchwork link:
https://patchwork.kernel.org/patch/9313309/
--
Kalle Valo
^ permalink raw reply
* Re: [PATCH] rsi: code clean-up
From: Kalle Valo @ 2016-09-08 10:46 UTC (permalink / raw)
To: Arend Van Spriel
Cc: Prameela Rani Garnepudi, linux-wireless, johannes.berg, hofrat,
xypron.glpk, Prameela Rani Garnepudi
In-Reply-To: <9f56e811-e415-7a2e-605a-dce0cf6a1cf1@broadcom.com>
Arend Van Spriel <arend.vanspriel@broadcom.com> writes:
> On 8-9-2016 7:36, Prameela Rani Garnepudi wrote:
>> From: Prameela Rani Garnepudi <prameela.garnepudi@redpinesignals.com>
>
> Seems like you missed the essential training on main-line driver
> development :-p
>
> Typically you should split this up in conceptually separate patches so
> it is easier for people to review. A large patch changing things all
> over the place solving different things is taking a lot more time to review.
>
> So go work on branch, make a commit for each issue you want to address,
> and when ready do (using 6 commits as example):
>
> $ git format-patch -s -M --cover-letter -6
>
> The '--cover-letter' results in 0000-...patch file in which you can
> summarize the changes in bullet list so Kalle can reuse that moving the
> patches upstream to networking subsystem.
>
> When done use git to send the patches:
>
> $ git send-email --to='Kalle Valo <kvalo@codeaurora.org>'
> --cc=linux-wireless@vger.kernel.org *.patch
And write a commit log for each patch. In minimum the commit log should
answer to the question "Why?".
A good way to learn how the this all works is to see how others do it.
For example, you can see all ath9k commits like this:
gitk drivers/net/wireless/ath/ath9k/
or iwlwifi:
gitk drivers/net/wireless/intel/iwlwifi/
--
Kalle Valo
^ permalink raw reply
* Re: [PATCH] rsi: code clean-up
From: Arend Van Spriel @ 2016-09-08 9:34 UTC (permalink / raw)
To: Prameela Rani Garnepudi, linux-wireless, kvalo, johannes.berg,
hofrat, xypron.glpk
Cc: Prameela Rani Garnepudi
In-Reply-To: <1473313017-4074-1-git-send-email-prameela.j04cs@gmail.com>
On 8-9-2016 7:36, Prameela Rani Garnepudi wrote:
> From: Prameela Rani Garnepudi <prameela.garnepudi@redpinesignals.com>
Seems like you missed the essential training on main-line driver
development :-p
Typically you should split this up in conceptually separate patches so
it is easier for people to review. A large patch changing things all
over the place solving different things is taking a lot more time to review.
So go work on branch, make a commit for each issue you want to address,
and when ready do (using 6 commits as example):
$ git format-patch -s -M --cover-letter -6
The '--cover-letter' results in 0000-...patch file in which you can
summarize the changes in bullet list so Kalle can reuse that moving the
patches upstream to networking subsystem.
When done use git to send the patches:
$ git send-email --to='Kalle Valo <kvalo@codeaurora.org>'
--cc=linux-wireless@vger.kernel.org *.patch
Regards,
> Signed-off-by: Prameela Rani Garnepudi <prameela.garnepudi@redpinesignals.com>
> ---
> drivers/net/wireless/rsi/rsi_91x_core.c | 18 ++--
> drivers/net/wireless/rsi/rsi_91x_debugfs.c | 13 +--
> drivers/net/wireless/rsi/rsi_91x_mac80211.c | 81 +++++++++------
> drivers/net/wireless/rsi/rsi_91x_main.c | 16 ++-
> drivers/net/wireless/rsi/rsi_91x_mgmt.c | 155 +++++++++++-----------------
> drivers/net/wireless/rsi/rsi_91x_sdio.c | 14 +--
> drivers/net/wireless/rsi/rsi_91x_sdio_ops.c | 11 +-
> drivers/net/wireless/rsi/rsi_91x_usb.c | 34 ++++--
> drivers/net/wireless/rsi/rsi_common.h | 2 +-
> drivers/net/wireless/rsi/rsi_debugfs.h | 3 +-
> drivers/net/wireless/rsi/rsi_main.h | 36 ++++---
> drivers/net/wireless/rsi/rsi_mgmt.h | 54 +++++-----
> drivers/net/wireless/rsi/rsi_sdio.h | 18 ++--
> 13 files changed, 228 insertions(+), 227 deletions(-)
>
> diff --git a/drivers/net/wireless/rsi/rsi_91x_core.c b/drivers/net/wireless/rsi/rsi_91x_core.c
> index f3d3995..c6db8a9 100644
> --- a/drivers/net/wireless/rsi/rsi_91x_core.c
> +++ b/drivers/net/wireless/rsi/rsi_91x_core.c
> @@ -134,7 +134,7 @@ static u8 rsi_core_determine_hal_queue(struct rsi_common *common)
> bool recontend_queue = false;
> u32 q_len = 0;
> u8 q_num = INVALID_QUEUE;
> - u8 ii = 0;
> + u8 ii;
>
> if (skb_queue_len(&common->tx_queue[MGMT_SOFT_Q])) {
> if (!common->mgmt_q_block)
> @@ -142,8 +142,10 @@ static u8 rsi_core_determine_hal_queue(struct rsi_common *common)
> return q_num;
> }
>
> - if (common->hw_data_qs_blocked)
> + if (common->hw_data_qs_blocked) {
> + rsi_dbg(INFO_ZONE, "%s: data queue blocked\n", __func__);
> return q_num;
> + }
>
> if (common->pkt_cnt != 0) {
> --common->pkt_cnt;
> @@ -210,6 +212,7 @@ static void rsi_core_queue_pkt(struct rsi_common *common,
> struct sk_buff *skb)
> {
> u8 q_num = skb->priority;
> +
> if (q_num >= NUM_SOFT_QUEUES) {
> rsi_dbg(ERR_ZONE, "%s: Invalid Queue Number: q_num = %d\n",
> __func__, q_num);
> @@ -285,7 +288,7 @@ void rsi_core_qos_processor(struct rsi_common *common)
> }
>
> skb = rsi_core_dequeue_pkt(common, q_num);
> - if (skb == NULL) {
> + if (!skb) {
> rsi_dbg(ERR_ZONE, "skb null\n");
> mutex_unlock(&common->tx_rxlock);
> break;
> @@ -331,15 +334,16 @@ void rsi_core_xmit(struct rsi_common *common, struct sk_buff *skb)
> __func__);
> goto xmit_fail;
> }
> - info = IEEE80211_SKB_CB(skb);
> - tx_params = (struct skb_info *)info->driver_data;
> - tmp_hdr = (struct ieee80211_hdr *)&skb->data[0];
>
> if (common->fsm_state != FSM_MAC_INIT_DONE) {
> rsi_dbg(ERR_ZONE, "%s: FSM state not open\n", __func__);
> goto xmit_fail;
> }
>
> + info = IEEE80211_SKB_CB(skb);
> + tx_params = (struct skb_info *)info->driver_data;
> + tmp_hdr = (struct ieee80211_hdr *)&skb->data[0];
> +
> if ((ieee80211_is_mgmt(tmp_hdr->frame_control)) ||
> (ieee80211_is_ctl(tmp_hdr->frame_control)) ||
> (ieee80211_is_qos_nullfunc(tmp_hdr->frame_control))) {
> @@ -360,7 +364,7 @@ void rsi_core_xmit(struct rsi_common *common, struct sk_buff *skb)
>
> if ((q_num != MGMT_SOFT_Q) &&
> ((skb_queue_len(&common->tx_queue[q_num]) + 1) >=
> - DATA_QUEUE_WATER_MARK)) {
> + DATA_QUEUE_WATER_MARK)) {
> rsi_dbg(ERR_ZONE, "%s: sw queue full\n", __func__);
> if (!ieee80211_queue_stopped(adapter->hw, WME_AC(q_num)))
> ieee80211_stop_queue(adapter->hw, WME_AC(q_num));
> diff --git a/drivers/net/wireless/rsi/rsi_91x_debugfs.c b/drivers/net/wireless/rsi/rsi_91x_debugfs.c
> index 828a042..5ec7bce 100644
> --- a/drivers/net/wireless/rsi/rsi_91x_debugfs.c
> +++ b/drivers/net/wireless/rsi/rsi_91x_debugfs.c
> @@ -59,7 +59,7 @@ static int rsi_sdio_stats_read(struct seq_file *seq, void *data)
> }
>
> /**
> - * rsi_sdio_stats_open() - This funtion calls single open function of seq_file
> + * rsi_sdio_stats_open() - This function calls single open function of seq_file
> * to open file and read contents from it.
> * @inode: Pointer to the inode structure.
> * @file: Pointer to the file structure.
> @@ -100,7 +100,7 @@ static int rsi_version_read(struct seq_file *seq, void *data)
> }
>
> /**
> - * rsi_version_open() - This funtion calls single open function of seq_file to
> + * rsi_version_open() - This function calls single open function of seq_file to
> * open file and read contents from it.
Two functions with the same generic description. Just mention what info
it provides.
> * @inode: Pointer to the inode structure.
> * @file: Pointer to the file structure.
> @@ -108,7 +108,7 @@ static int rsi_version_read(struct seq_file *seq, void *data)
> * Return: Pointer to the opened file status: 0 on success, ENOMEM on failure.
> */
> static int rsi_version_open(struct inode *inode,
> - struct file *file)
> + struct file *file)
The indentation should be aligned to the opening bracket.
> {
> return single_open(file, rsi_version_read, inode->i_private);
> }
> @@ -180,7 +180,7 @@ static int rsi_stats_read(struct seq_file *seq, void *data)
> }
>
> /**
> - * rsi_stats_open() - This funtion calls single open function of seq_file to
> + * rsi_stats_open() - This function calls single open function of seq_file to
> * open file and read contents from it.
too generic.
> * @inode: Pointer to the inode structure.
> * @file: Pointer to the file structure.
> @@ -194,7 +194,8 @@ static int rsi_stats_open(struct inode *inode,
> }
>
> /**
> - * rsi_debug_zone_read() - This function display the currently enabled debug zones.
> + * rsi_debug_zone_read() - This function display the currently
> + * enabled debug zones.
> * @seq: Pointer to the sequence file structure.
> * @data: Pointer to the data.
> *
> @@ -209,7 +210,7 @@ static int rsi_debug_zone_read(struct seq_file *seq, void *data)
> }
>
> /**
> - * rsi_debug_read() - This funtion calls single open function of seq_file to
> + * rsi_debug_read() - This function calls single open function of seq_file to
> * open file and read contents from it.
too generic.
> * @inode: Pointer to the inode structure.
> * @file: Pointer to the file structure.
> diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
> index dbb2389..9c6fa61 100644
> --- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c
> +++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
> @@ -194,6 +194,7 @@ static void rsi_register_rates_channels(struct rsi_hw *adapter, int band)
> void rsi_mac80211_detach(struct rsi_hw *adapter)
> {
> struct ieee80211_hw *hw = adapter->hw;
> + int i;
>
> if (hw) {
> ieee80211_stop_queues(hw);
> @@ -201,7 +202,17 @@ void rsi_mac80211_detach(struct rsi_hw *adapter)
> ieee80211_free_hw(hw);
> }
>
> + for (i = 0; i < 2; i++) {
Do not use hardcode value, but ARRAY_SIZE(adapter->sbands).
> + struct ieee80211_supported_band *sbands = &adapter->sbands[i];
> +
> + if (!sbands->channels)
> + kfree(sbands->channels);
This does not seem right. Why do a kfree() is sbands->channels is null?
> + }
> +
> +#ifdef CONFIG_RSI_DEBUGFS
> rsi_remove_dbgfs(adapter);
> + kfree(adapter->dfsentry);
> +#endif
> }
> EXPORT_SYMBOL_GPL(rsi_mac80211_detach);
>
> @@ -429,9 +440,11 @@ static int rsi_mac80211_config(struct ieee80211_hw *hw,
> u16 rsi_get_connected_channel(struct rsi_hw *adapter)
> {
> struct ieee80211_vif *vif = adapter->vifs[0];
> +
> if (vif) {
> struct ieee80211_bss_conf *bss = &vif->bss_conf;
> struct ieee80211_channel *channel = bss->chandef.chan;
> +
> return channel->hw_value;
> }
>
> @@ -667,15 +680,14 @@ static int rsi_mac80211_ampdu_action(struct ieee80211_hw *hw,
> struct ieee80211_vif *vif,
> struct ieee80211_ampdu_params *params)
> {
> - int status = -EOPNOTSUPP;
> + int status = 1;
> struct rsi_hw *adapter = hw->priv;
> struct rsi_common *common = adapter->priv;
> - u16 seq_no = 0;
> + u16 seq_no = params->ssn;
> u8 ii = 0;
> struct ieee80211_sta *sta = params->sta;
> enum ieee80211_ampdu_mlme_action action = params->action;
> u16 tid = params->tid;
> - u16 *ssn = ¶ms->ssn;
> u8 buf_size = params->buf_size;
>
> for (ii = 0; ii < RSI_MAX_VIFS; ii++) {
> @@ -684,28 +696,30 @@ static int rsi_mac80211_ampdu_action(struct ieee80211_hw *hw,
> }
>
> mutex_lock(&common->mutex);
> - rsi_dbg(INFO_ZONE, "%s: AMPDU action %d called\n", __func__, action);
> - if (ssn != NULL)
> - seq_no = *ssn;
>
> switch (action) {
> case IEEE80211_AMPDU_RX_START:
> - status = rsi_send_aggregation_params_frame(common,
> - tid,
> - seq_no,
> - buf_size,
> - STA_RX_ADDBA_DONE);
> + rsi_dbg(INFO_ZONE, "AMPDU action RX_START (%d)\n", action);
> + status = rsi_send_aggr_params_frame(common,
> + tid,
> + seq_no,
> + buf_size,
> + STA_RX_ADDBA_DONE);
> break;
>
> case IEEE80211_AMPDU_RX_STOP:
> - status = rsi_send_aggregation_params_frame(common,
> - tid,
> - 0,
> - buf_size,
> - STA_RX_DELBA);
> + rsi_dbg(INFO_ZONE,
> + "AMPDU action RX_STOP (%d) called\n", action);
> + status = rsi_send_aggr_params_frame(common,
> + tid,
> + 0,
> + buf_size,
> + STA_RX_DELBA);
> break;
>
> case IEEE80211_AMPDU_TX_START:
> + rsi_dbg(INFO_ZONE,
> + "AMPDU action TX_START (%d) called\n", action);
> common->vif_info[ii].seq_start = seq_no;
> ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid);
> status = 0;
> @@ -714,22 +728,27 @@ static int rsi_mac80211_ampdu_action(struct ieee80211_hw *hw,
> case IEEE80211_AMPDU_TX_STOP_CONT:
> case IEEE80211_AMPDU_TX_STOP_FLUSH:
> case IEEE80211_AMPDU_TX_STOP_FLUSH_CONT:
> - status = rsi_send_aggregation_params_frame(common,
> - tid,
> - seq_no,
> - buf_size,
> - STA_TX_DELBA);
> + rsi_dbg(INFO_ZONE,
> + "AMPDU action TX_STOP_CONT / TX_STOP_FLUSH /"
> + " TX_STOP_FLUSH_CONT (%d) called\n", action);
> + status = rsi_send_aggr_params_frame(common,
> + tid,
> + seq_no,
> + buf_size,
> + STA_TX_DELBA);
> if (!status)
> ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid);
> break;
>
> case IEEE80211_AMPDU_TX_OPERATIONAL:
> - status = rsi_send_aggregation_params_frame(common,
> - tid,
> - common->vif_info[ii]
> - .seq_start,
> - buf_size,
> - STA_TX_ADDBA_DONE);
> + rsi_dbg(INFO_ZONE,
> + "AMPDU action TX_OPERATIONAL(%d) called\n",
> + action);
> + status = rsi_send_aggr_params_frame(common,
> + tid,
> + common->vif_info[ii].seq_start,
> + buf_size,
> + STA_TX_ADDBA_DONE);
> break;
>
> default:
> @@ -819,8 +838,6 @@ static void rsi_perform_cqm(struct rsi_common *common,
> common->cqm_info.last_cqm_event_rssi = rssi;
> rsi_dbg(INFO_ZONE, "CQM: Notifying event: %d\n", event);
> ieee80211_cqm_rssi_notify(adapter->vifs[0], event, GFP_KERNEL);
> -
> - return;
> }
>
> /**
> @@ -875,16 +892,14 @@ static void rsi_fill_rx_status(struct ieee80211_hw *hw,
> }
>
> /* CQM only for connected AP beacons, the RSSI is a weighted avg */
> - if (bss->assoc && !(memcmp(bss->bssid, hdr->addr2, ETH_ALEN))) {
> + if (bss->assoc && ether_addr_equal(bss->bssid, hdr->addr2)) {
> if (ieee80211_is_beacon(hdr->frame_control))
> rsi_perform_cqm(common, hdr->addr2, rxs->signal);
> }
> -
> - return;
> }
>
> /**
> - * rsi_indicate_pkt_to_os() - This function sends recieved packet to mac80211.
> + * rsi_indicate_pkt_to_os() - This function sends received packet to mac80211.
> * @common: Pointer to the driver private structure.
> * @skb: Pointer to the socket buffer structure.
> *
> diff --git a/drivers/net/wireless/rsi/rsi_91x_main.c b/drivers/net/wireless/rsi/rsi_91x_main.c
> index 8810862..f59a66a 100644
> --- a/drivers/net/wireless/rsi/rsi_91x_main.c
> +++ b/drivers/net/wireless/rsi/rsi_91x_main.c
> @@ -86,7 +86,7 @@ static struct sk_buff *rsi_prepare_skb(struct rsi_common *common,
>
> pkt_len -= extended_desc;
> skb = dev_alloc_skb(pkt_len + FRAME_DESC_SZ);
> - if (skb == NULL)
> + if (!skb)
> return NULL;
>
> payload_offset = (extended_desc + FRAME_DESC_SZ);
> @@ -111,11 +111,10 @@ static struct sk_buff *rsi_prepare_skb(struct rsi_common *common,
> int rsi_read_pkt(struct rsi_common *common, s32 rcv_pkt_len)
> {
> u8 *frame_desc = NULL, extended_desc = 0;
> - u32 index, length = 0, queueno = 0;
> + u32 index = 0, length = 0, queueno = 0;
> u16 actual_length = 0, offset;
> struct sk_buff *skb = NULL;
>
> - index = 0;
> do {
> frame_desc = &common->rx_data_pkt[index];
> actual_length = *(u16 *)&frame_desc[0];
> @@ -131,7 +130,7 @@ int rsi_read_pkt(struct rsi_common *common, s32 rcv_pkt_len)
> (frame_desc + offset),
> length,
> extended_desc);
> - if (skb == NULL)
> + if (!skb)
> goto fail;
>
> rsi_indicate_pkt_to_os(common, skb);
> @@ -198,15 +197,14 @@ struct rsi_hw *rsi_91x_init(void)
> return NULL;
>
> adapter->priv = kzalloc(sizeof(*common), GFP_KERNEL);
> - if (adapter->priv == NULL) {
> - rsi_dbg(ERR_ZONE, "%s: Failed in allocation of memory\n",
> + if (!adapter->priv) {
> + rsi_dbg(ERR_ZONE, "%s: Failed in allocation of priv\n",
> __func__);
> kfree(adapter);
> return NULL;
> - } else {
> - common = adapter->priv;
> - common->priv = adapter;
> }
> + common = adapter->priv;
> + common->priv = adapter;
>
> for (ii = 0; ii < NUM_SOFT_QUEUES; ii++)
> skb_queue_head_init(&common->tx_queue[ii]);
> diff --git a/drivers/net/wireless/rsi/rsi_91x_mgmt.c b/drivers/net/wireless/rsi/rsi_91x_mgmt.c
> index 35c14cc..db96bd7 100644
> --- a/drivers/net/wireless/rsi/rsi_91x_mgmt.c
> +++ b/drivers/net/wireless/rsi/rsi_91x_mgmt.c
> @@ -255,9 +255,9 @@ static int rsi_send_internal_mgmt_frame(struct rsi_common *common,
> {
> struct skb_info *tx_params;
>
> - if (skb == NULL) {
> + if (!skb) {
> rsi_dbg(ERR_ZONE, "%s: Unable to allocate skb\n", __func__);
> - return -ENOMEM;
> + return -EINVAL;
The debug message should be changed as well as no allocation attempt is
made here. Can skb ever be null or would it be an error during development?
> }
> tx_params = (struct skb_info *)&IEEE80211_SKB_CB(skb)->driver_data;
> tx_params->flags |= INTERNAL_MGMT_PKT;
> @@ -290,12 +290,8 @@ static int rsi_load_radio_caps(struct rsi_common *common)
> rsi_dbg(INFO_ZONE, "%s: Sending rate symbol req frame\n", __func__);
>
> skb = dev_alloc_skb(sizeof(struct rsi_radio_caps));
> -
> - if (!skb) {
> - rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
> - __func__);
> + if (!skb)
> return -ENOMEM;
> - }
>
> memset(skb->data, 0, sizeof(struct rsi_radio_caps));
> radio_caps = (struct rsi_radio_caps *)skb->data;
> @@ -375,8 +371,8 @@ static int rsi_load_radio_caps(struct rsi_common *common)
> * rsi_mgmt_pkt_to_core() - This function is the entry point for Mgmt module.
> * @common: Pointer to the driver private structure.
> * @msg: Pointer to received packet.
> - * @msg_len: Length of the recieved packet.
> - * @type: Type of recieved packet.
> + * @msg_len: Length of the received packet.
> + * @type: Type of received packet.
> *
> * Return: 0 on success, -1 on failure.
> */
> @@ -406,11 +402,8 @@ static int rsi_mgmt_pkt_to_core(struct rsi_common *common,
> }
>
> skb = dev_alloc_skb(msg_len);
> - if (!skb) {
> - rsi_dbg(ERR_ZONE, "%s: Failed to allocate skb\n",
> - __func__);
> + if (!skb)
> return -ENOMEM;
> - }
>
> buffer = skb_put(skb, msg_len);
>
> @@ -425,9 +418,8 @@ static int rsi_mgmt_pkt_to_core(struct rsi_common *common,
> rx_params->rssi = rsi_get_rssi(msg);
> rx_params->channel = rsi_get_channel(msg);
> rsi_indicate_pkt_to_os(common, skb);
> - } else {
> + } else
> rsi_dbg(MGMT_TX_ZONE, "%s: Internal Packet\n", __func__);
> - }
For readability this is an exception to the rule and so here it is
allowed to have curly braces around single else statement.
>
> return 0;
> }
> @@ -459,12 +451,8 @@ static int rsi_hal_send_sta_notify_frame(struct rsi_common *common,
> rsi_dbg(MGMT_TX_ZONE, "%s: Sending sta notify frame\n", __func__);
>
> skb = dev_alloc_skb(sizeof(struct rsi_peer_notify));
> -
> - if (!skb) {
> - rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
> - __func__);
> + if (!skb)
> return -ENOMEM;
> - }
>
> memset(skb->data, 0, sizeof(struct rsi_peer_notify));
> peer_notify = (struct rsi_peer_notify *)skb->data;
> @@ -505,7 +493,7 @@ static int rsi_hal_send_sta_notify_frame(struct rsi_common *common,
> }
>
> /**
> - * rsi_send_aggregation_params_frame() - This function sends the ampdu
> + * rsi_send_aggr_params_frame() - This function sends the ampdu
> * indication frame to firmware.
> * @common: Pointer to the driver private structure.
> * @tid: traffic identifier.
> @@ -515,28 +503,26 @@ static int rsi_hal_send_sta_notify_frame(struct rsi_common *common,
> *
> * Return: 0 on success, corresponding negative error code on failure.
> */
> -int rsi_send_aggregation_params_frame(struct rsi_common *common,
> - u16 tid,
> - u16 ssn,
> - u8 buf_size,
> - u8 event)
> +int rsi_send_aggr_params_frame(struct rsi_common *common,
> + u16 tid,
> + u16 ssn,
> + u8 buf_size,
> + u8 event)
align with opening brace.
> {
> struct sk_buff *skb = NULL;
> struct rsi_mac_frame *mgmt_frame;
> u8 peer_id = 0;
>
> skb = dev_alloc_skb(FRAME_DESC_SZ);
> -
> - if (!skb) {
> - rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
> - __func__);
> + if (!skb)
> return -ENOMEM;
> - }
>
> memset(skb->data, 0, FRAME_DESC_SZ);
> mgmt_frame = (struct rsi_mac_frame *)skb->data;
>
> - rsi_dbg(MGMT_TX_ZONE, "%s: Sending AMPDU indication frame\n", __func__);
> + rsi_dbg(MGMT_TX_ZONE,
> + "%s: Sending AMPDU indication frame\n",
> + __func__);
>
> mgmt_frame->desc_word[0] = cpu_to_le16(RSI_WIFI_MGMT_Q << 12);
> mgmt_frame->desc_word[1] = cpu_to_le16(AMPDU_IND);
> @@ -545,7 +531,9 @@ int rsi_send_aggregation_params_frame(struct rsi_common *common,
> mgmt_frame->desc_word[4] = cpu_to_le16(ssn);
> mgmt_frame->desc_word[5] = cpu_to_le16(buf_size);
> mgmt_frame->desc_word[7] =
> - cpu_to_le16((tid | (START_AMPDU_AGGR << 4) | (peer_id << 8)));
> + cpu_to_le16((tid |
> + (START_AMPDU_AGGR << 4) |
> + (peer_id << 8)));
need extra space for indent.
> } else if (event == STA_RX_ADDBA_DONE) {
> mgmt_frame->desc_word[4] = cpu_to_le16(ssn);
> mgmt_frame->desc_word[7] = cpu_to_le16(tid |
> @@ -583,11 +571,8 @@ static int rsi_program_bb_rf(struct rsi_common *common)
> rsi_dbg(MGMT_TX_ZONE, "%s: Sending program BB/RF frame\n", __func__);
>
> skb = dev_alloc_skb(FRAME_DESC_SZ);
> - if (!skb) {
> - rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
> - __func__);
> + if (!skb)
> return -ENOMEM;
> - }
>
> memset(skb->data, 0, FRAME_DESC_SZ);
> mgmt_frame = (struct rsi_mac_frame *)skb->data;
> @@ -605,6 +590,7 @@ static int rsi_program_bb_rf(struct rsi_common *common)
> common->bb_rf_prog_count = 1;
> mgmt_frame->desc_word[7] |= cpu_to_le16(PUT_BBP_RESET |
> BBP_REG_WRITE | (RSI_RF_TYPE << 4));
> +
> skb_put(skb, FRAME_DESC_SZ);
>
> return rsi_send_internal_mgmt_frame(common, skb);
> @@ -617,7 +603,8 @@ static int rsi_program_bb_rf(struct rsi_common *common)
> *
> * Return: 0 on success, corresponding negative error code on failure.
> */
> -int rsi_set_vap_capabilities(struct rsi_common *common, enum opmode mode)
> +int rsi_set_vap_capabilities(struct rsi_common *common,
> + enum opmode mode)
was original line over 80 characters? indentation is wrong.
> {
> struct sk_buff *skb = NULL;
> struct rsi_vap_caps *vap_caps;
> @@ -626,14 +613,12 @@ int rsi_set_vap_capabilities(struct rsi_common *common, enum opmode mode)
> struct ieee80211_conf *conf = &hw->conf;
> u16 vap_id = 0;
>
> - rsi_dbg(MGMT_TX_ZONE, "%s: Sending VAP capabilities frame\n", __func__);
> + rsi_dbg(MGMT_TX_ZONE,
> + "%s: Sending VAP capabilities frame\n", __func__);
>
> skb = dev_alloc_skb(sizeof(struct rsi_vap_caps));
> - if (!skb) {
> - rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
> - __func__);
> + if (!skb)
> return -ENOMEM;
> - }
>
> memset(skb->data, 0, sizeof(struct rsi_vap_caps));
> vap_caps = (struct rsi_vap_caps *)skb->data;
> @@ -705,11 +690,8 @@ int rsi_hal_load_key(struct rsi_common *common,
> rsi_dbg(MGMT_TX_ZONE, "%s: Sending load key frame\n", __func__);
>
> skb = dev_alloc_skb(sizeof(struct rsi_set_key));
> - if (!skb) {
> - rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
> - __func__);
> + if (!skb)
> return -ENOMEM;
> - }
>
> memset(skb->data, 0, sizeof(struct rsi_set_key));
> set_key = (struct rsi_set_key *)skb->data;
> @@ -736,13 +718,10 @@ int rsi_hal_load_key(struct rsi_common *common,
> set_key->desc_word[4] = cpu_to_le16(key_descriptor);
>
> if ((cipher == WLAN_CIPHER_SUITE_WEP40) ||
> - (cipher == WLAN_CIPHER_SUITE_WEP104)) {
> - memcpy(&set_key->key[key_id][1],
> - data,
> - key_len * 2);
> - } else {
> + (cipher == WLAN_CIPHER_SUITE_WEP104))
> + memcpy(&set_key->key[key_id][1], data, key_len * 2);
> + else
> memcpy(&set_key->key[0][0], data, key_len);
> - }
>
> memcpy(set_key->tx_mic_key, &data[16], 8);
> memcpy(set_key->rx_mic_key, &data[24], 8);
> @@ -765,11 +744,8 @@ static int rsi_load_bootup_params(struct rsi_common *common)
>
> rsi_dbg(MGMT_TX_ZONE, "%s: Sending boot params frame\n", __func__);
> skb = dev_alloc_skb(sizeof(struct rsi_boot_params));
> - if (!skb) {
> - rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
> - __func__);
> + if (!skb)
> return -ENOMEM;
> - }
>
> memset(skb->data, 0, sizeof(struct rsi_boot_params));
> boot_params = (struct rsi_boot_params *)skb->data;
> @@ -780,7 +756,8 @@ static int rsi_load_bootup_params(struct rsi_common *common)
> memcpy(&boot_params->bootup_params,
> &boot_params_40,
> sizeof(struct bootup_params));
> - rsi_dbg(MGMT_TX_ZONE, "%s: Packet 40MHZ <=== %d\n", __func__,
> + rsi_dbg(MGMT_TX_ZONE,
> + "%s: Packet 40MHZ <=== %d\n", __func__,
> UMAC_CLK_40BW);
> boot_params->desc_word[7] = cpu_to_le16(UMAC_CLK_40BW);
> } else {
> @@ -828,11 +805,8 @@ static int rsi_send_reset_mac(struct rsi_common *common)
> rsi_dbg(MGMT_TX_ZONE, "%s: Sending reset MAC frame\n", __func__);
>
> skb = dev_alloc_skb(FRAME_DESC_SZ);
> - if (!skb) {
> - rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
> - __func__);
> + if (!skb)
> return -ENOMEM;
> - }
>
> memset(skb->data, 0, FRAME_DESC_SZ);
> mgmt_frame = (struct rsi_mac_frame *)skb->data;
> @@ -919,11 +893,8 @@ int rsi_set_channel(struct rsi_common *common, u16 channel)
> "%s: Sending scan req frame\n", __func__);
>
> skb = dev_alloc_skb(FRAME_DESC_SZ);
> - if (!skb) {
> - rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
> - __func__);
> + if (!skb)
> return -ENOMEM;
> - }
>
> memset(skb->data, 0, FRAME_DESC_SZ);
> mgmt_frame = (struct rsi_mac_frame *)skb->data;
> @@ -980,6 +951,7 @@ static int rsi_compare(const void *a, const void *b)
> static bool rsi_map_rates(u16 rate, int *offset)
> {
> int kk;
> +
> for (kk = 0; kk < ARRAY_SIZE(rsi_mcsrates); kk++) {
> if (rate == mcs[kk]) {
> *offset = kk;
> @@ -1013,20 +985,14 @@ static int rsi_send_auto_rate_request(struct rsi_common *common)
> u8 num_supported_rates = 0;
> u8 rate_table_offset, rate_offset = 0;
> u32 rate_bitmap = common->bitrate_mask[band];
> -
> u16 *selected_rates, min_rate;
>
> skb = dev_alloc_skb(sizeof(struct rsi_auto_rate));
> - if (!skb) {
> - rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
> - __func__);
> + if (!skb)
> return -ENOMEM;
> - }
>
> selected_rates = kzalloc(2 * RSI_TBL_SZ, GFP_KERNEL);
> if (!selected_rates) {
> - rsi_dbg(ERR_ZONE, "%s: Failed in allocation of mem\n",
> - __func__);
> dev_kfree_skb(skb);
> return -ENOMEM;
> }
> @@ -1140,14 +1106,17 @@ void rsi_inform_bss_status(struct rsi_common *common,
> u16 aid)
> {
> if (status) {
> + common->hw_data_qs_blocked = true;
> rsi_hal_send_sta_notify_frame(common,
> RSI_IFTYPE_STATION,
> STA_CONNECTED,
> bssid,
> qos_enable,
> aid);
> - if (common->min_rate == 0xffff)
> + if (common->min_rate == 0xffff) {
> + rsi_dbg(INFO_ZONE, "Send auto rate request\n");
> rsi_send_auto_rate_request(common);
> + }
> } else {
> rsi_hal_send_sta_notify_frame(common,
> RSI_IFTYPE_STATION,
> @@ -1170,14 +1139,12 @@ static int rsi_eeprom_read(struct rsi_common *common)
> struct rsi_mac_frame *mgmt_frame;
> struct sk_buff *skb;
>
> - rsi_dbg(MGMT_TX_ZONE, "%s: Sending EEPROM read req frame\n", __func__);
> + rsi_dbg(MGMT_TX_ZONE,
> + "%s: Sending EEPROM read req frame\n", __func__);
>
> skb = dev_alloc_skb(FRAME_DESC_SZ);
> - if (!skb) {
> - rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
> - __func__);
> + if (!skb)
> return -ENOMEM;
> - }
>
> memset(skb->data, 0, FRAME_DESC_SZ);
> mgmt_frame = (struct rsi_mac_frame *)skb->data;
> @@ -1214,11 +1181,8 @@ int rsi_send_block_unblock_frame(struct rsi_common *common, bool block_event)
> rsi_dbg(MGMT_TX_ZONE, "%s: Sending block/unblock frame\n", __func__);
>
> skb = dev_alloc_skb(FRAME_DESC_SZ);
> - if (!skb) {
> - rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
> - __func__);
> + if (!skb)
> return -ENOMEM;
> - }
>
> memset(skb->data, 0, FRAME_DESC_SZ);
> mgmt_frame = (struct rsi_mac_frame *)skb->data;
> @@ -1261,9 +1225,8 @@ static int rsi_handle_ta_confirm_type(struct rsi_common *common,
> if (rsi_eeprom_read(common)) {
> common->fsm_state = FSM_CARD_NOT_READY;
> goto out;
> - } else {
> + } else
> common->fsm_state = FSM_EEPROM_READ_MAC_ADDR;
> - }
> } else {
> rsi_dbg(INFO_ZONE,
> "%s: Received bootup params cfm in %d state\n",
> @@ -1273,6 +1236,9 @@ static int rsi_handle_ta_confirm_type(struct rsi_common *common,
> break;
>
> case EEPROM_READ_TYPE:
> + rsi_dbg(FSM_ZONE,
> + "%s: EEPROM READ confirm received\n",
> + __func__);
> if (common->fsm_state == FSM_EEPROM_READ_MAC_ADDR) {
> if (msg[16] == MAGIC_WORD) {
> u8 offset = (FRAME_DESC_SZ + WLAN_HOST_MODE_LEN
> @@ -1324,7 +1290,8 @@ static int rsi_handle_ta_confirm_type(struct rsi_common *common,
> goto out;
> } else {
> common->fsm_state = FSM_BB_RF_PROG_SENT;
> - rsi_dbg(FSM_ZONE, "%s: Radio cap cfm received\n",
> + rsi_dbg(FSM_ZONE,
> + "%s: Radio cap cfm received\n",
> __func__);
> }
> } else {
> @@ -1347,27 +1314,29 @@ static int rsi_handle_ta_confirm_type(struct rsi_common *common,
> }
> } else {
> rsi_dbg(INFO_ZONE,
> - "%s: Received bbb_rf cfm in %d state\n",
> + "%s: Received bb_rf cfm in %d state\n",
> __func__, common->fsm_state);
> return 0;
> }
> break;
>
> default:
> - rsi_dbg(INFO_ZONE, "%s: Invalid TA confirm pkt received\n",
> + rsi_dbg(INFO_ZONE,
> + "%s: Invalid TA confirm pkt received\n",
> __func__);
> break;
> }
> return 0;
> out:
> - rsi_dbg(ERR_ZONE, "%s: Unable to send pkt/Invalid frame received\n",
> + rsi_dbg(ERR_ZONE,
> + "%s: Unable to send pkt/Invalid frame received\n",
> __func__);
> return -EINVAL;
> }
>
> /**
> * rsi_mgmt_pkt_recv() - This function processes the management packets
> - * recieved from the hardware.
> + * received from the hardware.
> * @common: Pointer to the driver private structure.
> * @msg: Pointer to the received packet.
> *
> @@ -1376,7 +1345,7 @@ out:
> int rsi_mgmt_pkt_recv(struct rsi_common *common, u8 *msg)
> {
> s32 msg_len = (le16_to_cpu(*(__le16 *)&msg[0]) & 0x0fff);
> - u16 msg_type = (msg[2]);
> + u16 msg_type = msg[2];
> int ret;
>
> rsi_dbg(FSM_ZONE, "%s: Msg Len: %d, Msg Type: %4x\n",
> @@ -1404,8 +1373,8 @@ int rsi_mgmt_pkt_recv(struct rsi_common *common, u8 *msg)
> rsi_dbg(FSM_ZONE, "%s: Probe confirm received\n",
> __func__);
> }
> - } else {
> + } else
> return rsi_mgmt_pkt_to_core(common, msg, msg_len, msg_type);
> - }
> +
> return 0;
> }
> diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c
> index 8428858..331865b 100644
> --- a/drivers/net/wireless/rsi/rsi_91x_sdio.c
> +++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c
> @@ -1,6 +1,8 @@
> /**
> * Copyright (c) 2014 Redpine Signals Inc.
> *
> + * Developers:
> + * Fariya Fathima 2014 <fariya.f@redpinesignals.com>
> * Permission to use, copy, modify, and/or distribute this software for any
> * purpose with or without fee is hereby granted, provided that the above
> * copyright notice and this permission notice appear in all copies.
> @@ -128,7 +130,7 @@ static int rsi_issue_sdiocommand(struct sdio_func *func,
> }
>
> /**
> - * rsi_handle_interrupt() - This function is called upon the occurence
> + * rsi_handle_interrupt() - This function is called upon the occurrence
> * of an interrupt.
> * @function: Pointer to the sdio_func structure.
> *
> @@ -183,7 +185,7 @@ static void rsi_reset_card(struct sdio_func *pfunction)
> host->ios.timing = MMC_TIMING_LEGACY;
> host->ops->set_ios(host, &host->ios);
>
> - /*
> + /**
> * This delay should be sufficient to allow the power supply
> * to reach the minimum voltage.
> */
What is your intent here. Not sure if kerneldoc will pick this up.
> @@ -193,7 +195,7 @@ static void rsi_reset_card(struct sdio_func *pfunction)
> host->ios.power_mode = MMC_POWER_ON;
> host->ops->set_ios(host, &host->ios);
>
> - /*
> + /**
> * This delay must be at least 74 clock sizes, or 1 ms, or the
> * time required to reach a stable voltage.
> */
> @@ -361,6 +363,7 @@ static int rsi_setblocklength(struct rsi_hw *adapter, u32 length)
> struct rsi_91x_sdiodev *dev =
> (struct rsi_91x_sdiodev *)adapter->rsi_dev;
> int status;
> +
> rsi_dbg(INIT_ZONE, "%s: Setting the block length\n", __func__);
>
> status = sdio_set_block_size(dev->pfunction, length);
> @@ -464,6 +467,7 @@ int rsi_sdio_write_register(struct rsi_hw *adapter,
> void rsi_sdio_ack_intr(struct rsi_hw *adapter, u8 int_bit)
> {
> int status;
> +
> status = rsi_sdio_write_register(adapter,
> 1,
> (SDIO_FUN1_INTR_CLR_REG |
> @@ -473,8 +477,6 @@ void rsi_sdio_ack_intr(struct rsi_hw *adapter, u8 int_bit)
> rsi_dbg(ERR_ZONE, "%s: unable to send ack\n", __func__);
> }
>
> -
> -
> /**
> * rsi_sdio_read_register_multiple() - This function read multiple bytes of
> * information from the SD card.
> @@ -667,7 +669,7 @@ static int rsi_init_sdio_interface(struct rsi_hw *adapter,
> goto fail;
> }
>
> - rsi_dbg(INIT_ZONE, "%s: Setup card succesfully\n", __func__);
> + rsi_dbg(INIT_ZONE, "%s: Setup card successfully\n", __func__);
>
> status = rsi_init_sdio_slave_regs(adapter);
> if (status) {
> diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio_ops.c b/drivers/net/wireless/rsi/rsi_91x_sdio_ops.c
> index 40d7231..ae42391 100644
> --- a/drivers/net/wireless/rsi/rsi_91x_sdio_ops.c
> +++ b/drivers/net/wireless/rsi/rsi_91x_sdio_ops.c
> @@ -252,11 +252,8 @@ static int rsi_process_pkt(struct rsi_common *common)
> rcv_pkt_len = (num_blks * 256);
>
> common->rx_data_pkt = kmalloc(rcv_pkt_len, GFP_KERNEL);
> - if (!common->rx_data_pkt) {
> - rsi_dbg(ERR_ZONE, "%s: Failed in memory allocation\n",
> - __func__);
> + if (!common->rx_data_pkt)
> return -ENOMEM;
> - }
>
> status = rsi_sdio_host_intf_read_pkt(adapter,
> common->rx_data_pkt,
> @@ -426,8 +423,8 @@ void rsi_interrupt_handler(struct rsi_hw *adapter)
> "%s: ==> FIRMWARE Assert <==\n",
> __func__);
> status = rsi_sdio_read_register(common->priv,
> - SDIO_FW_STATUS_REG,
> - &fw_status);
> + SDIO_FW_STATUS_REG,
> + &fw_status);
> if (status) {
> rsi_dbg(ERR_ZONE,
> "%s: Failed to read f/w reg\n",
> @@ -435,7 +432,7 @@ void rsi_interrupt_handler(struct rsi_hw *adapter)
> } else {
> rsi_dbg(ERR_ZONE,
> "%s: Firmware Status is 0x%x\n",
> - __func__ , fw_status);
> + __func__, fw_status);
> rsi_sdio_ack_intr(common->priv,
> (1 << FW_ASSERT_IND));
> }
> diff --git a/drivers/net/wireless/rsi/rsi_91x_usb.c b/drivers/net/wireless/rsi/rsi_91x_usb.c
> index ef5d394..2b322e5 100644
> --- a/drivers/net/wireless/rsi/rsi_91x_usb.c
> +++ b/drivers/net/wireless/rsi/rsi_91x_usb.c
> @@ -1,6 +1,9 @@
> /**
> * Copyright (c) 2014 Redpine Signals Inc.
> *
> + * Developers:
> + * Prameela Rani Garnepudi 2016 <prameela.garnepudi@redpinesignals.com>
> + *
> * Permission to use, copy, modify, and/or distribute this software for any
> * purpose with or without fee is hereby granted, provided that the above
> * copyright notice and this permission notice appear in all copies.
> @@ -43,7 +46,6 @@ static int rsi_usb_card_write(struct rsi_hw *adapter,
> len,
> &transfer,
> HZ * 5);
> -
> if (status < 0) {
> rsi_dbg(ERR_ZONE,
> "Card write failed with error code :%10d\n", status);
> @@ -275,11 +277,11 @@ static int rsi_rx_urb_submit(struct rsi_hw *adapter)
>
> /**
> * rsi_usb_write_register_multiple() - This function writes multiple bytes of
> - * information to multiple registers.
> - * @adapter: Pointer to the adapter structure.
> - * @addr: Address of the register.
> - * @data: Pointer to the data that has to be written.
> - * @count: Number of multiple bytes to be written on to the registers.
> + * information to the given address.
> + * @adapter: Pointer to the adapter structure.
> + * @addr: Address of the register.
> + * @data: Pointer to the data that has to be written.
> + * @count: Number of multiple bytes to be written on to the registers.
> *
> * Return: status: 0 on success, a negative error code on failure.
> */
> @@ -392,11 +394,8 @@ static int rsi_init_usb_interface(struct rsi_hw *adapter,
> usb_set_intfdata(pfunction, adapter);
>
> common->rx_data_pkt = kmalloc(2048, GFP_KERNEL);
> - if (!common->rx_data_pkt) {
> - rsi_dbg(ERR_ZONE, "%s: Failed to allocate memory\n",
> - __func__);
> + if (!common->rx_data_pkt)
> return -ENOMEM;
> - }
>
> rsi_dev->tx_buffer = kmalloc(2048, GFP_KERNEL);
> if (!rsi_dev->tx_buffer) {
> @@ -568,7 +567,20 @@ static struct usb_driver rsi_driver = {
> #endif
> };
>
> -module_usb_driver(rsi_driver);
> +static int __init rsi_usb_module_init(void)
> +{
> + rsi_dbg(INIT_ZONE,
> + "=====> RSI USB Module Initialize <=====\n");
> + return usb_register(&rsi_driver);
> +}
> +
> +static void __exit rsi_usb_module_exit(void)
> +{
> + usb_deregister(&rsi_driver);
> +}
> +
> +module_init(rsi_usb_module_init);
> +module_exit(rsi_usb_module_exit);
>
> MODULE_AUTHOR("Redpine Signals Inc");
> MODULE_DESCRIPTION("Common USB layer for RSI drivers");
> diff --git a/drivers/net/wireless/rsi/rsi_common.h b/drivers/net/wireless/rsi/rsi_common.h
> index d3fbe33..ad1be13 100644
> --- a/drivers/net/wireless/rsi/rsi_common.h
> +++ b/drivers/net/wireless/rsi/rsi_common.h
> @@ -38,7 +38,7 @@ static inline int rsi_wait_event(struct rsi_event *event, u32 timeout)
>
> if (!timeout)
> status = wait_event_interruptible(event->event_queue,
> - (atomic_read(&event->event_condition) == 0));
> + (!atomic_read(&event->event_condition)));
> else
> status = wait_event_interruptible_timeout(event->event_queue,
> (atomic_read(&event->event_condition) == 0),
> diff --git a/drivers/net/wireless/rsi/rsi_debugfs.h b/drivers/net/wireless/rsi/rsi_debugfs.h
> index 580ad3b..8b64944 100644
> --- a/drivers/net/wireless/rsi/rsi_debugfs.h
> +++ b/drivers/net/wireless/rsi/rsi_debugfs.h
> @@ -23,12 +23,10 @@
> #ifndef CONFIG_RSI_DEBUGFS
> static inline int rsi_init_dbgfs(struct rsi_hw *adapter)
> {
> - return 0;
removing this should result in compiler warning or am I missing
something here.
> }
>
> static inline void rsi_remove_dbgfs(struct rsi_hw *adapter)
> {
> - return;
> }
> #else
> struct rsi_dbg_files {
> @@ -42,6 +40,7 @@ struct rsi_debugfs {
> struct rsi_dbg_ops *dfs_get_ops;
> struct dentry *rsi_files[MAX_DEBUGFS_ENTRIES];
> };
> +
> int rsi_init_dbgfs(struct rsi_hw *adapter);
> void rsi_remove_dbgfs(struct rsi_hw *adapter);
> #endif
> diff --git a/drivers/net/wireless/rsi/rsi_main.h b/drivers/net/wireless/rsi/rsi_main.h
> index dcd0957..cde1a75 100644
> --- a/drivers/net/wireless/rsi/rsi_main.h
> +++ b/drivers/net/wireless/rsi/rsi_main.h
> @@ -21,23 +21,25 @@
> #include <linux/skbuff.h>
> #include <net/mac80211.h>
>
> -#define ERR_ZONE BIT(0) /* For Error Msgs */
> -#define INFO_ZONE BIT(1) /* For General Status Msgs */
> -#define INIT_ZONE BIT(2) /* For Driver Init Seq Msgs */
> -#define MGMT_TX_ZONE BIT(3) /* For TX Mgmt Path Msgs */
> -#define MGMT_RX_ZONE BIT(4) /* For RX Mgmt Path Msgs */
> -#define DATA_TX_ZONE BIT(5) /* For TX Data Path Msgs */
> -#define DATA_RX_ZONE BIT(6) /* For RX Data Path Msgs */
> -#define FSM_ZONE BIT(7) /* For State Machine Msgs */
> -#define ISR_ZONE BIT(8) /* For Interrupt Msgs */
> +#define ERR_ZONE BIT(0) /* Error Msgs */
> +#define INFO_ZONE BIT(1) /* General Debug Msgs */
> +#define INIT_ZONE BIT(2) /* Driver Init Msgs */
> +#define MGMT_TX_ZONE BIT(3) /* TX Mgmt Path Msgs */
> +#define MGMT_RX_ZONE BIT(4) /* RX Mgmt Path Msgs */
> +#define DATA_TX_ZONE BIT(5) /* TX Data Path Msgs */
> +#define DATA_RX_ZONE BIT(6) /* RX Data Path Msgs */
> +#define FSM_ZONE BIT(7) /* State Machine Msgs */
> +#define ISR_ZONE BIT(8) /* Interrupt Msgs */
>
> #define FSM_CARD_NOT_READY 0
> -#define FSM_BOOT_PARAMS_SENT 1
> -#define FSM_EEPROM_READ_MAC_ADDR 2
> -#define FSM_RESET_MAC_SENT 3
> -#define FSM_RADIO_CAPS_SENT 4
> -#define FSM_BB_RF_PROG_SENT 5
> -#define FSM_MAC_INIT_DONE 6
> +#define FSM_COMMON_DEV_PARAMS_SENT 1
> +#define FSM_BOOT_PARAMS_SENT 2
> +#define FSM_EEPROM_READ_MAC_ADDR 3
> +#define FSM_EEPROM_READ_RF_TYPE 4
> +#define FSM_RESET_MAC_SENT 5
> +#define FSM_RADIO_CAPS_SENT 6
> +#define FSM_BB_RF_PROG_SENT 7
> +#define FSM_MAC_INIT_DONE 8
>
> extern u32 rsi_zone_enabled;
> extern __printf(2, 3) void rsi_dbg(u32 zone, const char *fmt, ...);
> @@ -206,12 +208,14 @@ struct rsi_common {
> bool hw_data_qs_blocked;
> };
>
> +#define IEEE80211_NUM_BANDS 2
> +
> struct rsi_hw {
> struct rsi_common *priv;
> struct ieee80211_hw *hw;
> struct ieee80211_vif *vifs[RSI_MAX_VIFS];
> struct ieee80211_tx_queue_params edca_params[NUM_EDCA_QUEUES];
> - struct ieee80211_supported_band sbands[NUM_NL80211_BANDS];
> + struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
>
> struct device *device;
> u8 sc_nvifs;
> diff --git a/drivers/net/wireless/rsi/rsi_mgmt.h b/drivers/net/wireless/rsi/rsi_mgmt.h
> index 3741173..ed3aa83 100644
> --- a/drivers/net/wireless/rsi/rsi_mgmt.h
> +++ b/drivers/net/wireless/rsi/rsi_mgmt.h
> @@ -71,31 +71,31 @@
> #define RSI_ENABLE_40MHZ (0x1 << 3)
> #define ENABLE_SHORTGI_RATE BIT(9)
>
> -#define RX_BA_INDICATION 1
> -#define RSI_TBL_SZ 40
> -#define MAX_RETRIES 8
> +#define RX_BA_INDICATION 1
> +#define RSI_TBL_SZ 40
> +#define MAX_RETRIES 8
> #define RSI_IFTYPE_STATION 0
>
> -#define STD_RATE_MCS7 0x07
> -#define STD_RATE_MCS6 0x06
> -#define STD_RATE_MCS5 0x05
> -#define STD_RATE_MCS4 0x04
> -#define STD_RATE_MCS3 0x03
> -#define STD_RATE_MCS2 0x02
> -#define STD_RATE_MCS1 0x01
> -#define STD_RATE_MCS0 0x00
> -#define STD_RATE_54 0x6c
> -#define STD_RATE_48 0x60
> -#define STD_RATE_36 0x48
> -#define STD_RATE_24 0x30
> -#define STD_RATE_18 0x24
> -#define STD_RATE_12 0x18
> -#define STD_RATE_11 0x16
> -#define STD_RATE_09 0x12
> -#define STD_RATE_06 0x0C
> -#define STD_RATE_5_5 0x0B
> -#define STD_RATE_02 0x04
> -#define STD_RATE_01 0x02
> +#define STD_RATE_MCS7 0x07
> +#define STD_RATE_MCS6 0x06
> +#define STD_RATE_MCS5 0x05
> +#define STD_RATE_MCS4 0x04
> +#define STD_RATE_MCS3 0x03
> +#define STD_RATE_MCS2 0x02
> +#define STD_RATE_MCS1 0x01
> +#define STD_RATE_MCS0 0x00
> +#define STD_RATE_54 0x6c
> +#define STD_RATE_48 0x60
> +#define STD_RATE_36 0x48
> +#define STD_RATE_24 0x30
> +#define STD_RATE_18 0x24
> +#define STD_RATE_12 0x18
> +#define STD_RATE_11 0x16
> +#define STD_RATE_09 0x12
> +#define STD_RATE_06 0x0C
> +#define STD_RATE_5_5 0x0B
> +#define STD_RATE_02 0x04
> +#define STD_RATE_01 0x02
>
> #define RSI_RF_TYPE 1
> #define RSI_RATE_00 0x00
> @@ -173,9 +173,9 @@ enum cmd_frame_type {
> AUTO_RATE_IND,
> BOOTUP_PARAMS_REQUEST,
> VAP_CAPABILITIES,
> - EEPROM_READ_TYPE ,
> + EEPROM_READ_TYPE,
> EEPROM_WRITE,
> - GPIO_PIN_CONFIG ,
> + GPIO_PIN_CONFIG,
> SET_RX_FILTER,
> AMPDU_IND,
> STATS_REQUEST_FRAME,
> @@ -288,8 +288,8 @@ static inline u8 rsi_get_channel(u8 *addr)
>
> int rsi_mgmt_pkt_recv(struct rsi_common *common, u8 *msg);
> int rsi_set_vap_capabilities(struct rsi_common *common, enum opmode mode);
> -int rsi_send_aggregation_params_frame(struct rsi_common *common, u16 tid,
> - u16 ssn, u8 buf_size, u8 event);
> +int rsi_send_aggr_params_frame(struct rsi_common *common, u16 tid,
> + u16 ssn, u8 buf_size, u8 event);
> int rsi_hal_load_key(struct rsi_common *common, u8 *data, u16 key_len,
> u8 key_type, u8 key_id, u32 cipher);
> int rsi_set_channel(struct rsi_common *common, u16 chno);
> diff --git a/drivers/net/wireless/rsi/rsi_sdio.h b/drivers/net/wireless/rsi/rsi_sdio.h
> index c7e8f2b..33a657c 100644
> --- a/drivers/net/wireless/rsi/rsi_sdio.h
> +++ b/drivers/net/wireless/rsi/rsi_sdio.h
> @@ -37,17 +37,17 @@ enum sdio_interrupt_type {
> };
>
> /* Buffer status register related info */
> -#define PKT_BUFF_SEMI_FULL 0
> -#define PKT_BUFF_FULL 1
> -#define PKT_MGMT_BUFF_FULL 2
> -#define MSDU_PKT_PENDING 3
> +#define PKT_BUFF_SEMI_FULL 0
> +#define PKT_BUFF_FULL 1
> +#define PKT_MGMT_BUFF_FULL 2
> +#define MSDU_PKT_PENDING 3
> /* Interrupt Bit Related Macros */
> -#define PKT_BUFF_AVAILABLE 1
> -#define FW_ASSERT_IND 2
> +#define PKT_BUFF_AVAILABLE 1
> +#define FW_ASSERT_IND 2
>
> -#define RSI_DEVICE_BUFFER_STATUS_REGISTER 0xf3
> -#define RSI_FN1_INT_REGISTER 0xf9
> -#define RSI_SD_REQUEST_MASTER 0x10000
> +#define RSI_DEVICE_BUFFER_STATUS_REGISTER 0xf3
> +#define RSI_FN1_INT_REGISTER 0xf9
> +#define RSI_SD_REQUEST_MASTER 0x10000
>
> /* FOR SD CARD ONLY */
> #define SDIO_RX_NUM_BLOCKS_REG 0x000F1
>
^ permalink raw reply
* Re: [PATCH v3 3/3] mt76: add driver code for MT76x2e
From: Sergey Ryazanov @ 2016-09-08 8:29 UTC (permalink / raw)
To: Felix Fietkau; +Cc: linux-wireless@vger.kernel.org, Kalle Valo
In-Reply-To: <d65738be-cb30-cedd-562c-814d02a91794@nbd.name>
2016-09-08 11:25 GMT+03:00 Felix Fietkau <nbd@nbd.name>:
> On 2016-09-08 09:52, Sergey Ryazanov wrote:
>>> +
>>> +int mt76x2_register_device(struct mt76x2_dev *dev)
>>> +{
>>> + struct ieee80211_hw *hw = mt76_hw(dev);
>>> + struct wiphy *wiphy = hw->wiphy;
>>> + void *status_fifo;
>>> + int fifo_size;
>>> + int i, ret;
>>> +
>>> + fifo_size = roundup_pow_of_two(32 * sizeof(struct mt76x2_tx_status));
>>> + status_fifo = devm_kzalloc(dev->mt76.dev, fifo_size, GFP_KERNEL);
>>> + if (!status_fifo)
>>> + return -ENOMEM;
>>> +
>>> + kfifo_init(&dev->txstatus_fifo, status_fifo, fifo_size);
>>> +
>>> + ret = mt76x2_init_hardware(dev);
>>> + if (ret)
>>> + return ret;
>>> +
>>> + hw->queues = 4;
>>> + hw->max_rates = 1;
>>> + hw->max_report_rates = 7;
>>> + hw->max_rate_tries = 1;
>>> + hw->extra_tx_headroom = 2;
>>> +
>>> + hw->sta_data_size = sizeof(struct mt76x2_sta);
>>> + hw->vif_data_size = sizeof(struct mt76x2_vif);
>>> +
>>> + for (i = 0; i < ARRAY_SIZE(dev->macaddr_list); i++) {
>>> + u8 *addr = dev->macaddr_list[i].addr;
>>> +
>>> + memcpy(addr, dev->mt76.macaddr, ETH_ALEN);
>>> +
>>> + if (!i)
>>> + continue;
>>> +
>>> + addr[0] |= BIT(1);
>>> + addr[0] ^= ((i - 1) << 2);
>>> + }
>>> + wiphy->addresses = dev->macaddr_list;
>>> + wiphy->n_addresses = ARRAY_SIZE(dev->macaddr_list);
>>> +
>>> + wiphy->iface_combinations = if_comb;
>>> + wiphy->n_iface_combinations = ARRAY_SIZE(if_comb);
>>> +
>>> + wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_VHT_IBSS);
>>> +
>>> + ieee80211_hw_set(hw, SUPPORTS_HT_CCK_RATES);
>>> + INIT_DELAYED_WORK(&dev->cal_work, mt76x2_phy_calibrate);
>>> + INIT_DELAYED_WORK(&dev->mac_work, mt76x2_mac_work);
>>> +
>>> + dev->mt76.sband_2g.sband.ht_cap.cap |= IEEE80211_HT_CAP_LDPC_CODING;
>>> + dev->mt76.sband_5g.sband.ht_cap.cap |= IEEE80211_HT_CAP_LDPC_CODING;
>>> +
>>> + ret = mt76_register_device(&dev->mt76, true, mt76x2_rates,
>>> + ARRAY_SIZE(mt76x2_rates));
>>> + if (ret)
>>> + goto fail;
>>> +
>>> + mt76x2_init_debugfs(dev);
>>> +
>>> + return 0;
>>> +
>>> +fail:
>>> + mt76x2_stop_hardware(dev);
>>> + return ret;
>>> +}
>>
>> Just curious, almost full chip initialization performed in probe
>> procedure, why not do that in start() callback? In such case we could
>> fully restart chip without module reloading, just with ifdown/ifup
>> circle.
> Last time I tried that I ran into some weird chip quirks. I do think
> it's a good idea but I'd rather see this merged first and try again to
> rework it when I have some more time to figure out what's going on.
>
Got it. Thank you for explanation.
--
Sergey
^ permalink raw reply
* Re: [PATCH v3 3/3] mt76: add driver code for MT76x2e
From: Felix Fietkau @ 2016-09-08 8:25 UTC (permalink / raw)
To: Sergey Ryazanov; +Cc: linux-wireless@vger.kernel.org, Kalle Valo
In-Reply-To: <CAHNKnsTwBVmWSis_5EV1mrJM53E6XDhJ=CHWCjihZ839bDXGuA@mail.gmail.com>
On 2016-09-08 09:52, Sergey Ryazanov wrote:
>> +
>> +int mt76x2_register_device(struct mt76x2_dev *dev)
>> +{
>> + struct ieee80211_hw *hw = mt76_hw(dev);
>> + struct wiphy *wiphy = hw->wiphy;
>> + void *status_fifo;
>> + int fifo_size;
>> + int i, ret;
>> +
>> + fifo_size = roundup_pow_of_two(32 * sizeof(struct mt76x2_tx_status));
>> + status_fifo = devm_kzalloc(dev->mt76.dev, fifo_size, GFP_KERNEL);
>> + if (!status_fifo)
>> + return -ENOMEM;
>> +
>> + kfifo_init(&dev->txstatus_fifo, status_fifo, fifo_size);
>> +
>> + ret = mt76x2_init_hardware(dev);
>> + if (ret)
>> + return ret;
>> +
>> + hw->queues = 4;
>> + hw->max_rates = 1;
>> + hw->max_report_rates = 7;
>> + hw->max_rate_tries = 1;
>> + hw->extra_tx_headroom = 2;
>> +
>> + hw->sta_data_size = sizeof(struct mt76x2_sta);
>> + hw->vif_data_size = sizeof(struct mt76x2_vif);
>> +
>> + for (i = 0; i < ARRAY_SIZE(dev->macaddr_list); i++) {
>> + u8 *addr = dev->macaddr_list[i].addr;
>> +
>> + memcpy(addr, dev->mt76.macaddr, ETH_ALEN);
>> +
>> + if (!i)
>> + continue;
>> +
>> + addr[0] |= BIT(1);
>> + addr[0] ^= ((i - 1) << 2);
>> + }
>> + wiphy->addresses = dev->macaddr_list;
>> + wiphy->n_addresses = ARRAY_SIZE(dev->macaddr_list);
>> +
>> + wiphy->iface_combinations = if_comb;
>> + wiphy->n_iface_combinations = ARRAY_SIZE(if_comb);
>> +
>> + wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_VHT_IBSS);
>> +
>> + ieee80211_hw_set(hw, SUPPORTS_HT_CCK_RATES);
>> + INIT_DELAYED_WORK(&dev->cal_work, mt76x2_phy_calibrate);
>> + INIT_DELAYED_WORK(&dev->mac_work, mt76x2_mac_work);
>> +
>> + dev->mt76.sband_2g.sband.ht_cap.cap |= IEEE80211_HT_CAP_LDPC_CODING;
>> + dev->mt76.sband_5g.sband.ht_cap.cap |= IEEE80211_HT_CAP_LDPC_CODING;
>> +
>> + ret = mt76_register_device(&dev->mt76, true, mt76x2_rates,
>> + ARRAY_SIZE(mt76x2_rates));
>> + if (ret)
>> + goto fail;
>> +
>> + mt76x2_init_debugfs(dev);
>> +
>> + return 0;
>> +
>> +fail:
>> + mt76x2_stop_hardware(dev);
>> + return ret;
>> +}
>
> Just curious, almost full chip initialization performed in probe
> procedure, why not do that in start() callback? In such case we could
> fully restart chip without module reloading, just with ifdown/ifup
> circle.
Last time I tried that I ran into some weird chip quirks. I do think
it's a good idea but I'd rather see this merged first and try again to
rework it when I have some more time to figure out what's going on.
- Felix
^ permalink raw reply
* Re: [PATCH v3 3/3] mt76: add driver code for MT76x2e
From: Sergey Ryazanov @ 2016-09-08 7:52 UTC (permalink / raw)
To: Felix Fietkau; +Cc: linux-wireless@vger.kernel.org, Kalle Valo
In-Reply-To: <20160905095128.80560-4-nbd@nbd.name>
First of all I would like to thank you Felix for this great job!
Please find one simple question below.
2016-09-05 12:51 GMT+03:00 Felix Fietkau <nbd@nbd.name>:
> From: Felix Fietkau <nbd@openwrt.org>
>
> This is a 2x2 PCIe 802.11ac chipset by MediaTek
>
[skip]
> +int mt76x2_init_hardware(struct mt76x2_dev *dev)
> +{
> + static const u16 beacon_offsets[16] = {
> + /* 1024 byte per beacon */
> + 0xc000,
> + 0xc400,
> + 0xc800,
> + 0xcc00,
> + 0xd000,
> + 0xd400,
> + 0xd800,
> + 0xdc00,
> +
> + /* BSS idx 8-15 not used for beacons */
> + 0xc000,
> + 0xc000,
> + 0xc000,
> + 0xc000,
> + 0xc000,
> + 0xc000,
> + 0xc000,
> + 0xc000,
> + };
> + u32 val;
> + int ret;
> +
> + dev->beacon_offsets = beacon_offsets;
> + tasklet_init(&dev->pre_tbtt_tasklet, mt76x2_pre_tbtt_tasklet,
> + (unsigned long) dev);
> +
> + dev->chainmask = 0x202;
> + dev->global_wcid.idx = 255;
> + dev->global_wcid.hw_key_idx = -1;
> + dev->slottime = 9;
> +
> + val = mt76_rr(dev, MT_WPDMA_GLO_CFG);
> + val &= MT_WPDMA_GLO_CFG_DMA_BURST_SIZE |
> + MT_WPDMA_GLO_CFG_BIG_ENDIAN |
> + MT_WPDMA_GLO_CFG_HDR_SEG_LEN;
> + val |= MT_WPDMA_GLO_CFG_TX_WRITEBACK_DONE;
> + mt76_wr(dev, MT_WPDMA_GLO_CFG, val);
> +
> + mt76x2_reset_wlan(dev, true);
> + mt76x2_power_on(dev);
> +
> + ret = mt76x2_eeprom_init(dev);
> + if (ret)
> + return ret;
> +
> + ret = mt76x2_mac_reset(dev, true);
> + if (ret)
> + return ret;
> +
> + ret = mt76x2_dma_init(dev);
> + if (ret)
> + return ret;
> +
> + set_bit(MT76_STATE_INITIALIZED, &dev->mt76.state);
> + ret = mt76x2_mac_start(dev);
> + if (ret)
> + return ret;
> +
> + ret = mt76x2_mcu_init(dev);
> + if (ret)
> + return ret;
> +
> + mt76x2_mac_stop(dev, false);
> + dev->rxfilter = mt76_rr(dev, MT_RX_FILTR_CFG);
> +
> + return 0;
> +}
[skip]
> +
> +int mt76x2_register_device(struct mt76x2_dev *dev)
> +{
> + struct ieee80211_hw *hw = mt76_hw(dev);
> + struct wiphy *wiphy = hw->wiphy;
> + void *status_fifo;
> + int fifo_size;
> + int i, ret;
> +
> + fifo_size = roundup_pow_of_two(32 * sizeof(struct mt76x2_tx_status));
> + status_fifo = devm_kzalloc(dev->mt76.dev, fifo_size, GFP_KERNEL);
> + if (!status_fifo)
> + return -ENOMEM;
> +
> + kfifo_init(&dev->txstatus_fifo, status_fifo, fifo_size);
> +
> + ret = mt76x2_init_hardware(dev);
> + if (ret)
> + return ret;
> +
> + hw->queues = 4;
> + hw->max_rates = 1;
> + hw->max_report_rates = 7;
> + hw->max_rate_tries = 1;
> + hw->extra_tx_headroom = 2;
> +
> + hw->sta_data_size = sizeof(struct mt76x2_sta);
> + hw->vif_data_size = sizeof(struct mt76x2_vif);
> +
> + for (i = 0; i < ARRAY_SIZE(dev->macaddr_list); i++) {
> + u8 *addr = dev->macaddr_list[i].addr;
> +
> + memcpy(addr, dev->mt76.macaddr, ETH_ALEN);
> +
> + if (!i)
> + continue;
> +
> + addr[0] |= BIT(1);
> + addr[0] ^= ((i - 1) << 2);
> + }
> + wiphy->addresses = dev->macaddr_list;
> + wiphy->n_addresses = ARRAY_SIZE(dev->macaddr_list);
> +
> + wiphy->iface_combinations = if_comb;
> + wiphy->n_iface_combinations = ARRAY_SIZE(if_comb);
> +
> + wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_VHT_IBSS);
> +
> + ieee80211_hw_set(hw, SUPPORTS_HT_CCK_RATES);
> + INIT_DELAYED_WORK(&dev->cal_work, mt76x2_phy_calibrate);
> + INIT_DELAYED_WORK(&dev->mac_work, mt76x2_mac_work);
> +
> + dev->mt76.sband_2g.sband.ht_cap.cap |= IEEE80211_HT_CAP_LDPC_CODING;
> + dev->mt76.sband_5g.sband.ht_cap.cap |= IEEE80211_HT_CAP_LDPC_CODING;
> +
> + ret = mt76_register_device(&dev->mt76, true, mt76x2_rates,
> + ARRAY_SIZE(mt76x2_rates));
> + if (ret)
> + goto fail;
> +
> + mt76x2_init_debugfs(dev);
> +
> + return 0;
> +
> +fail:
> + mt76x2_stop_hardware(dev);
> + return ret;
> +}
Just curious, almost full chip initialization performed in probe
procedure, why not do that in start() callback? In such case we could
fully restart chip without module reloading, just with ifdown/ifup
circle.
--
Sergey
^ permalink raw reply
* [PATCH] rsi: code clean-up
From: Prameela Rani Garnepudi @ 2016-09-08 5:36 UTC (permalink / raw)
To: linux-wireless, kvalo, johannes.berg, hofrat, xypron.glpk
Cc: prameela.j04cs, Prameela Rani Garnepudi
From: Prameela Rani Garnepudi <prameela.garnepudi@redpinesignals.com>
Signed-off-by: Prameela Rani Garnepudi <prameela.garnepudi@redpinesignals.com>
---
drivers/net/wireless/rsi/rsi_91x_core.c | 18 ++--
drivers/net/wireless/rsi/rsi_91x_debugfs.c | 13 +--
drivers/net/wireless/rsi/rsi_91x_mac80211.c | 81 +++++++++------
drivers/net/wireless/rsi/rsi_91x_main.c | 16 ++-
drivers/net/wireless/rsi/rsi_91x_mgmt.c | 155 +++++++++++-----------------
drivers/net/wireless/rsi/rsi_91x_sdio.c | 14 +--
drivers/net/wireless/rsi/rsi_91x_sdio_ops.c | 11 +-
drivers/net/wireless/rsi/rsi_91x_usb.c | 34 ++++--
drivers/net/wireless/rsi/rsi_common.h | 2 +-
drivers/net/wireless/rsi/rsi_debugfs.h | 3 +-
drivers/net/wireless/rsi/rsi_main.h | 36 ++++---
drivers/net/wireless/rsi/rsi_mgmt.h | 54 +++++-----
drivers/net/wireless/rsi/rsi_sdio.h | 18 ++--
13 files changed, 228 insertions(+), 227 deletions(-)
diff --git a/drivers/net/wireless/rsi/rsi_91x_core.c b/drivers/net/wireless/rsi/rsi_91x_core.c
index f3d3995..c6db8a9 100644
--- a/drivers/net/wireless/rsi/rsi_91x_core.c
+++ b/drivers/net/wireless/rsi/rsi_91x_core.c
@@ -134,7 +134,7 @@ static u8 rsi_core_determine_hal_queue(struct rsi_common *common)
bool recontend_queue = false;
u32 q_len = 0;
u8 q_num = INVALID_QUEUE;
- u8 ii = 0;
+ u8 ii;
if (skb_queue_len(&common->tx_queue[MGMT_SOFT_Q])) {
if (!common->mgmt_q_block)
@@ -142,8 +142,10 @@ static u8 rsi_core_determine_hal_queue(struct rsi_common *common)
return q_num;
}
- if (common->hw_data_qs_blocked)
+ if (common->hw_data_qs_blocked) {
+ rsi_dbg(INFO_ZONE, "%s: data queue blocked\n", __func__);
return q_num;
+ }
if (common->pkt_cnt != 0) {
--common->pkt_cnt;
@@ -210,6 +212,7 @@ static void rsi_core_queue_pkt(struct rsi_common *common,
struct sk_buff *skb)
{
u8 q_num = skb->priority;
+
if (q_num >= NUM_SOFT_QUEUES) {
rsi_dbg(ERR_ZONE, "%s: Invalid Queue Number: q_num = %d\n",
__func__, q_num);
@@ -285,7 +288,7 @@ void rsi_core_qos_processor(struct rsi_common *common)
}
skb = rsi_core_dequeue_pkt(common, q_num);
- if (skb == NULL) {
+ if (!skb) {
rsi_dbg(ERR_ZONE, "skb null\n");
mutex_unlock(&common->tx_rxlock);
break;
@@ -331,15 +334,16 @@ void rsi_core_xmit(struct rsi_common *common, struct sk_buff *skb)
__func__);
goto xmit_fail;
}
- info = IEEE80211_SKB_CB(skb);
- tx_params = (struct skb_info *)info->driver_data;
- tmp_hdr = (struct ieee80211_hdr *)&skb->data[0];
if (common->fsm_state != FSM_MAC_INIT_DONE) {
rsi_dbg(ERR_ZONE, "%s: FSM state not open\n", __func__);
goto xmit_fail;
}
+ info = IEEE80211_SKB_CB(skb);
+ tx_params = (struct skb_info *)info->driver_data;
+ tmp_hdr = (struct ieee80211_hdr *)&skb->data[0];
+
if ((ieee80211_is_mgmt(tmp_hdr->frame_control)) ||
(ieee80211_is_ctl(tmp_hdr->frame_control)) ||
(ieee80211_is_qos_nullfunc(tmp_hdr->frame_control))) {
@@ -360,7 +364,7 @@ void rsi_core_xmit(struct rsi_common *common, struct sk_buff *skb)
if ((q_num != MGMT_SOFT_Q) &&
((skb_queue_len(&common->tx_queue[q_num]) + 1) >=
- DATA_QUEUE_WATER_MARK)) {
+ DATA_QUEUE_WATER_MARK)) {
rsi_dbg(ERR_ZONE, "%s: sw queue full\n", __func__);
if (!ieee80211_queue_stopped(adapter->hw, WME_AC(q_num)))
ieee80211_stop_queue(adapter->hw, WME_AC(q_num));
diff --git a/drivers/net/wireless/rsi/rsi_91x_debugfs.c b/drivers/net/wireless/rsi/rsi_91x_debugfs.c
index 828a042..5ec7bce 100644
--- a/drivers/net/wireless/rsi/rsi_91x_debugfs.c
+++ b/drivers/net/wireless/rsi/rsi_91x_debugfs.c
@@ -59,7 +59,7 @@ static int rsi_sdio_stats_read(struct seq_file *seq, void *data)
}
/**
- * rsi_sdio_stats_open() - This funtion calls single open function of seq_file
+ * rsi_sdio_stats_open() - This function calls single open function of seq_file
* to open file and read contents from it.
* @inode: Pointer to the inode structure.
* @file: Pointer to the file structure.
@@ -100,7 +100,7 @@ static int rsi_version_read(struct seq_file *seq, void *data)
}
/**
- * rsi_version_open() - This funtion calls single open function of seq_file to
+ * rsi_version_open() - This function calls single open function of seq_file to
* open file and read contents from it.
* @inode: Pointer to the inode structure.
* @file: Pointer to the file structure.
@@ -108,7 +108,7 @@ static int rsi_version_read(struct seq_file *seq, void *data)
* Return: Pointer to the opened file status: 0 on success, ENOMEM on failure.
*/
static int rsi_version_open(struct inode *inode,
- struct file *file)
+ struct file *file)
{
return single_open(file, rsi_version_read, inode->i_private);
}
@@ -180,7 +180,7 @@ static int rsi_stats_read(struct seq_file *seq, void *data)
}
/**
- * rsi_stats_open() - This funtion calls single open function of seq_file to
+ * rsi_stats_open() - This function calls single open function of seq_file to
* open file and read contents from it.
* @inode: Pointer to the inode structure.
* @file: Pointer to the file structure.
@@ -194,7 +194,8 @@ static int rsi_stats_open(struct inode *inode,
}
/**
- * rsi_debug_zone_read() - This function display the currently enabled debug zones.
+ * rsi_debug_zone_read() - This function display the currently
+ * enabled debug zones.
* @seq: Pointer to the sequence file structure.
* @data: Pointer to the data.
*
@@ -209,7 +210,7 @@ static int rsi_debug_zone_read(struct seq_file *seq, void *data)
}
/**
- * rsi_debug_read() - This funtion calls single open function of seq_file to
+ * rsi_debug_read() - This function calls single open function of seq_file to
* open file and read contents from it.
* @inode: Pointer to the inode structure.
* @file: Pointer to the file structure.
diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
index dbb2389..9c6fa61 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
@@ -194,6 +194,7 @@ static void rsi_register_rates_channels(struct rsi_hw *adapter, int band)
void rsi_mac80211_detach(struct rsi_hw *adapter)
{
struct ieee80211_hw *hw = adapter->hw;
+ int i;
if (hw) {
ieee80211_stop_queues(hw);
@@ -201,7 +202,17 @@ void rsi_mac80211_detach(struct rsi_hw *adapter)
ieee80211_free_hw(hw);
}
+ for (i = 0; i < 2; i++) {
+ struct ieee80211_supported_band *sbands = &adapter->sbands[i];
+
+ if (!sbands->channels)
+ kfree(sbands->channels);
+ }
+
+#ifdef CONFIG_RSI_DEBUGFS
rsi_remove_dbgfs(adapter);
+ kfree(adapter->dfsentry);
+#endif
}
EXPORT_SYMBOL_GPL(rsi_mac80211_detach);
@@ -429,9 +440,11 @@ static int rsi_mac80211_config(struct ieee80211_hw *hw,
u16 rsi_get_connected_channel(struct rsi_hw *adapter)
{
struct ieee80211_vif *vif = adapter->vifs[0];
+
if (vif) {
struct ieee80211_bss_conf *bss = &vif->bss_conf;
struct ieee80211_channel *channel = bss->chandef.chan;
+
return channel->hw_value;
}
@@ -667,15 +680,14 @@ static int rsi_mac80211_ampdu_action(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct ieee80211_ampdu_params *params)
{
- int status = -EOPNOTSUPP;
+ int status = 1;
struct rsi_hw *adapter = hw->priv;
struct rsi_common *common = adapter->priv;
- u16 seq_no = 0;
+ u16 seq_no = params->ssn;
u8 ii = 0;
struct ieee80211_sta *sta = params->sta;
enum ieee80211_ampdu_mlme_action action = params->action;
u16 tid = params->tid;
- u16 *ssn = ¶ms->ssn;
u8 buf_size = params->buf_size;
for (ii = 0; ii < RSI_MAX_VIFS; ii++) {
@@ -684,28 +696,30 @@ static int rsi_mac80211_ampdu_action(struct ieee80211_hw *hw,
}
mutex_lock(&common->mutex);
- rsi_dbg(INFO_ZONE, "%s: AMPDU action %d called\n", __func__, action);
- if (ssn != NULL)
- seq_no = *ssn;
switch (action) {
case IEEE80211_AMPDU_RX_START:
- status = rsi_send_aggregation_params_frame(common,
- tid,
- seq_no,
- buf_size,
- STA_RX_ADDBA_DONE);
+ rsi_dbg(INFO_ZONE, "AMPDU action RX_START (%d)\n", action);
+ status = rsi_send_aggr_params_frame(common,
+ tid,
+ seq_no,
+ buf_size,
+ STA_RX_ADDBA_DONE);
break;
case IEEE80211_AMPDU_RX_STOP:
- status = rsi_send_aggregation_params_frame(common,
- tid,
- 0,
- buf_size,
- STA_RX_DELBA);
+ rsi_dbg(INFO_ZONE,
+ "AMPDU action RX_STOP (%d) called\n", action);
+ status = rsi_send_aggr_params_frame(common,
+ tid,
+ 0,
+ buf_size,
+ STA_RX_DELBA);
break;
case IEEE80211_AMPDU_TX_START:
+ rsi_dbg(INFO_ZONE,
+ "AMPDU action TX_START (%d) called\n", action);
common->vif_info[ii].seq_start = seq_no;
ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid);
status = 0;
@@ -714,22 +728,27 @@ static int rsi_mac80211_ampdu_action(struct ieee80211_hw *hw,
case IEEE80211_AMPDU_TX_STOP_CONT:
case IEEE80211_AMPDU_TX_STOP_FLUSH:
case IEEE80211_AMPDU_TX_STOP_FLUSH_CONT:
- status = rsi_send_aggregation_params_frame(common,
- tid,
- seq_no,
- buf_size,
- STA_TX_DELBA);
+ rsi_dbg(INFO_ZONE,
+ "AMPDU action TX_STOP_CONT / TX_STOP_FLUSH /"
+ " TX_STOP_FLUSH_CONT (%d) called\n", action);
+ status = rsi_send_aggr_params_frame(common,
+ tid,
+ seq_no,
+ buf_size,
+ STA_TX_DELBA);
if (!status)
ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid);
break;
case IEEE80211_AMPDU_TX_OPERATIONAL:
- status = rsi_send_aggregation_params_frame(common,
- tid,
- common->vif_info[ii]
- .seq_start,
- buf_size,
- STA_TX_ADDBA_DONE);
+ rsi_dbg(INFO_ZONE,
+ "AMPDU action TX_OPERATIONAL(%d) called\n",
+ action);
+ status = rsi_send_aggr_params_frame(common,
+ tid,
+ common->vif_info[ii].seq_start,
+ buf_size,
+ STA_TX_ADDBA_DONE);
break;
default:
@@ -819,8 +838,6 @@ static void rsi_perform_cqm(struct rsi_common *common,
common->cqm_info.last_cqm_event_rssi = rssi;
rsi_dbg(INFO_ZONE, "CQM: Notifying event: %d\n", event);
ieee80211_cqm_rssi_notify(adapter->vifs[0], event, GFP_KERNEL);
-
- return;
}
/**
@@ -875,16 +892,14 @@ static void rsi_fill_rx_status(struct ieee80211_hw *hw,
}
/* CQM only for connected AP beacons, the RSSI is a weighted avg */
- if (bss->assoc && !(memcmp(bss->bssid, hdr->addr2, ETH_ALEN))) {
+ if (bss->assoc && ether_addr_equal(bss->bssid, hdr->addr2)) {
if (ieee80211_is_beacon(hdr->frame_control))
rsi_perform_cqm(common, hdr->addr2, rxs->signal);
}
-
- return;
}
/**
- * rsi_indicate_pkt_to_os() - This function sends recieved packet to mac80211.
+ * rsi_indicate_pkt_to_os() - This function sends received packet to mac80211.
* @common: Pointer to the driver private structure.
* @skb: Pointer to the socket buffer structure.
*
diff --git a/drivers/net/wireless/rsi/rsi_91x_main.c b/drivers/net/wireless/rsi/rsi_91x_main.c
index 8810862..f59a66a 100644
--- a/drivers/net/wireless/rsi/rsi_91x_main.c
+++ b/drivers/net/wireless/rsi/rsi_91x_main.c
@@ -86,7 +86,7 @@ static struct sk_buff *rsi_prepare_skb(struct rsi_common *common,
pkt_len -= extended_desc;
skb = dev_alloc_skb(pkt_len + FRAME_DESC_SZ);
- if (skb == NULL)
+ if (!skb)
return NULL;
payload_offset = (extended_desc + FRAME_DESC_SZ);
@@ -111,11 +111,10 @@ static struct sk_buff *rsi_prepare_skb(struct rsi_common *common,
int rsi_read_pkt(struct rsi_common *common, s32 rcv_pkt_len)
{
u8 *frame_desc = NULL, extended_desc = 0;
- u32 index, length = 0, queueno = 0;
+ u32 index = 0, length = 0, queueno = 0;
u16 actual_length = 0, offset;
struct sk_buff *skb = NULL;
- index = 0;
do {
frame_desc = &common->rx_data_pkt[index];
actual_length = *(u16 *)&frame_desc[0];
@@ -131,7 +130,7 @@ int rsi_read_pkt(struct rsi_common *common, s32 rcv_pkt_len)
(frame_desc + offset),
length,
extended_desc);
- if (skb == NULL)
+ if (!skb)
goto fail;
rsi_indicate_pkt_to_os(common, skb);
@@ -198,15 +197,14 @@ struct rsi_hw *rsi_91x_init(void)
return NULL;
adapter->priv = kzalloc(sizeof(*common), GFP_KERNEL);
- if (adapter->priv == NULL) {
- rsi_dbg(ERR_ZONE, "%s: Failed in allocation of memory\n",
+ if (!adapter->priv) {
+ rsi_dbg(ERR_ZONE, "%s: Failed in allocation of priv\n",
__func__);
kfree(adapter);
return NULL;
- } else {
- common = adapter->priv;
- common->priv = adapter;
}
+ common = adapter->priv;
+ common->priv = adapter;
for (ii = 0; ii < NUM_SOFT_QUEUES; ii++)
skb_queue_head_init(&common->tx_queue[ii]);
diff --git a/drivers/net/wireless/rsi/rsi_91x_mgmt.c b/drivers/net/wireless/rsi/rsi_91x_mgmt.c
index 35c14cc..db96bd7 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mgmt.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mgmt.c
@@ -255,9 +255,9 @@ static int rsi_send_internal_mgmt_frame(struct rsi_common *common,
{
struct skb_info *tx_params;
- if (skb == NULL) {
+ if (!skb) {
rsi_dbg(ERR_ZONE, "%s: Unable to allocate skb\n", __func__);
- return -ENOMEM;
+ return -EINVAL;
}
tx_params = (struct skb_info *)&IEEE80211_SKB_CB(skb)->driver_data;
tx_params->flags |= INTERNAL_MGMT_PKT;
@@ -290,12 +290,8 @@ static int rsi_load_radio_caps(struct rsi_common *common)
rsi_dbg(INFO_ZONE, "%s: Sending rate symbol req frame\n", __func__);
skb = dev_alloc_skb(sizeof(struct rsi_radio_caps));
-
- if (!skb) {
- rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
- __func__);
+ if (!skb)
return -ENOMEM;
- }
memset(skb->data, 0, sizeof(struct rsi_radio_caps));
radio_caps = (struct rsi_radio_caps *)skb->data;
@@ -375,8 +371,8 @@ static int rsi_load_radio_caps(struct rsi_common *common)
* rsi_mgmt_pkt_to_core() - This function is the entry point for Mgmt module.
* @common: Pointer to the driver private structure.
* @msg: Pointer to received packet.
- * @msg_len: Length of the recieved packet.
- * @type: Type of recieved packet.
+ * @msg_len: Length of the received packet.
+ * @type: Type of received packet.
*
* Return: 0 on success, -1 on failure.
*/
@@ -406,11 +402,8 @@ static int rsi_mgmt_pkt_to_core(struct rsi_common *common,
}
skb = dev_alloc_skb(msg_len);
- if (!skb) {
- rsi_dbg(ERR_ZONE, "%s: Failed to allocate skb\n",
- __func__);
+ if (!skb)
return -ENOMEM;
- }
buffer = skb_put(skb, msg_len);
@@ -425,9 +418,8 @@ static int rsi_mgmt_pkt_to_core(struct rsi_common *common,
rx_params->rssi = rsi_get_rssi(msg);
rx_params->channel = rsi_get_channel(msg);
rsi_indicate_pkt_to_os(common, skb);
- } else {
+ } else
rsi_dbg(MGMT_TX_ZONE, "%s: Internal Packet\n", __func__);
- }
return 0;
}
@@ -459,12 +451,8 @@ static int rsi_hal_send_sta_notify_frame(struct rsi_common *common,
rsi_dbg(MGMT_TX_ZONE, "%s: Sending sta notify frame\n", __func__);
skb = dev_alloc_skb(sizeof(struct rsi_peer_notify));
-
- if (!skb) {
- rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
- __func__);
+ if (!skb)
return -ENOMEM;
- }
memset(skb->data, 0, sizeof(struct rsi_peer_notify));
peer_notify = (struct rsi_peer_notify *)skb->data;
@@ -505,7 +493,7 @@ static int rsi_hal_send_sta_notify_frame(struct rsi_common *common,
}
/**
- * rsi_send_aggregation_params_frame() - This function sends the ampdu
+ * rsi_send_aggr_params_frame() - This function sends the ampdu
* indication frame to firmware.
* @common: Pointer to the driver private structure.
* @tid: traffic identifier.
@@ -515,28 +503,26 @@ static int rsi_hal_send_sta_notify_frame(struct rsi_common *common,
*
* Return: 0 on success, corresponding negative error code on failure.
*/
-int rsi_send_aggregation_params_frame(struct rsi_common *common,
- u16 tid,
- u16 ssn,
- u8 buf_size,
- u8 event)
+int rsi_send_aggr_params_frame(struct rsi_common *common,
+ u16 tid,
+ u16 ssn,
+ u8 buf_size,
+ u8 event)
{
struct sk_buff *skb = NULL;
struct rsi_mac_frame *mgmt_frame;
u8 peer_id = 0;
skb = dev_alloc_skb(FRAME_DESC_SZ);
-
- if (!skb) {
- rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
- __func__);
+ if (!skb)
return -ENOMEM;
- }
memset(skb->data, 0, FRAME_DESC_SZ);
mgmt_frame = (struct rsi_mac_frame *)skb->data;
- rsi_dbg(MGMT_TX_ZONE, "%s: Sending AMPDU indication frame\n", __func__);
+ rsi_dbg(MGMT_TX_ZONE,
+ "%s: Sending AMPDU indication frame\n",
+ __func__);
mgmt_frame->desc_word[0] = cpu_to_le16(RSI_WIFI_MGMT_Q << 12);
mgmt_frame->desc_word[1] = cpu_to_le16(AMPDU_IND);
@@ -545,7 +531,9 @@ int rsi_send_aggregation_params_frame(struct rsi_common *common,
mgmt_frame->desc_word[4] = cpu_to_le16(ssn);
mgmt_frame->desc_word[5] = cpu_to_le16(buf_size);
mgmt_frame->desc_word[7] =
- cpu_to_le16((tid | (START_AMPDU_AGGR << 4) | (peer_id << 8)));
+ cpu_to_le16((tid |
+ (START_AMPDU_AGGR << 4) |
+ (peer_id << 8)));
} else if (event == STA_RX_ADDBA_DONE) {
mgmt_frame->desc_word[4] = cpu_to_le16(ssn);
mgmt_frame->desc_word[7] = cpu_to_le16(tid |
@@ -583,11 +571,8 @@ static int rsi_program_bb_rf(struct rsi_common *common)
rsi_dbg(MGMT_TX_ZONE, "%s: Sending program BB/RF frame\n", __func__);
skb = dev_alloc_skb(FRAME_DESC_SZ);
- if (!skb) {
- rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
- __func__);
+ if (!skb)
return -ENOMEM;
- }
memset(skb->data, 0, FRAME_DESC_SZ);
mgmt_frame = (struct rsi_mac_frame *)skb->data;
@@ -605,6 +590,7 @@ static int rsi_program_bb_rf(struct rsi_common *common)
common->bb_rf_prog_count = 1;
mgmt_frame->desc_word[7] |= cpu_to_le16(PUT_BBP_RESET |
BBP_REG_WRITE | (RSI_RF_TYPE << 4));
+
skb_put(skb, FRAME_DESC_SZ);
return rsi_send_internal_mgmt_frame(common, skb);
@@ -617,7 +603,8 @@ static int rsi_program_bb_rf(struct rsi_common *common)
*
* Return: 0 on success, corresponding negative error code on failure.
*/
-int rsi_set_vap_capabilities(struct rsi_common *common, enum opmode mode)
+int rsi_set_vap_capabilities(struct rsi_common *common,
+ enum opmode mode)
{
struct sk_buff *skb = NULL;
struct rsi_vap_caps *vap_caps;
@@ -626,14 +613,12 @@ int rsi_set_vap_capabilities(struct rsi_common *common, enum opmode mode)
struct ieee80211_conf *conf = &hw->conf;
u16 vap_id = 0;
- rsi_dbg(MGMT_TX_ZONE, "%s: Sending VAP capabilities frame\n", __func__);
+ rsi_dbg(MGMT_TX_ZONE,
+ "%s: Sending VAP capabilities frame\n", __func__);
skb = dev_alloc_skb(sizeof(struct rsi_vap_caps));
- if (!skb) {
- rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
- __func__);
+ if (!skb)
return -ENOMEM;
- }
memset(skb->data, 0, sizeof(struct rsi_vap_caps));
vap_caps = (struct rsi_vap_caps *)skb->data;
@@ -705,11 +690,8 @@ int rsi_hal_load_key(struct rsi_common *common,
rsi_dbg(MGMT_TX_ZONE, "%s: Sending load key frame\n", __func__);
skb = dev_alloc_skb(sizeof(struct rsi_set_key));
- if (!skb) {
- rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
- __func__);
+ if (!skb)
return -ENOMEM;
- }
memset(skb->data, 0, sizeof(struct rsi_set_key));
set_key = (struct rsi_set_key *)skb->data;
@@ -736,13 +718,10 @@ int rsi_hal_load_key(struct rsi_common *common,
set_key->desc_word[4] = cpu_to_le16(key_descriptor);
if ((cipher == WLAN_CIPHER_SUITE_WEP40) ||
- (cipher == WLAN_CIPHER_SUITE_WEP104)) {
- memcpy(&set_key->key[key_id][1],
- data,
- key_len * 2);
- } else {
+ (cipher == WLAN_CIPHER_SUITE_WEP104))
+ memcpy(&set_key->key[key_id][1], data, key_len * 2);
+ else
memcpy(&set_key->key[0][0], data, key_len);
- }
memcpy(set_key->tx_mic_key, &data[16], 8);
memcpy(set_key->rx_mic_key, &data[24], 8);
@@ -765,11 +744,8 @@ static int rsi_load_bootup_params(struct rsi_common *common)
rsi_dbg(MGMT_TX_ZONE, "%s: Sending boot params frame\n", __func__);
skb = dev_alloc_skb(sizeof(struct rsi_boot_params));
- if (!skb) {
- rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
- __func__);
+ if (!skb)
return -ENOMEM;
- }
memset(skb->data, 0, sizeof(struct rsi_boot_params));
boot_params = (struct rsi_boot_params *)skb->data;
@@ -780,7 +756,8 @@ static int rsi_load_bootup_params(struct rsi_common *common)
memcpy(&boot_params->bootup_params,
&boot_params_40,
sizeof(struct bootup_params));
- rsi_dbg(MGMT_TX_ZONE, "%s: Packet 40MHZ <=== %d\n", __func__,
+ rsi_dbg(MGMT_TX_ZONE,
+ "%s: Packet 40MHZ <=== %d\n", __func__,
UMAC_CLK_40BW);
boot_params->desc_word[7] = cpu_to_le16(UMAC_CLK_40BW);
} else {
@@ -828,11 +805,8 @@ static int rsi_send_reset_mac(struct rsi_common *common)
rsi_dbg(MGMT_TX_ZONE, "%s: Sending reset MAC frame\n", __func__);
skb = dev_alloc_skb(FRAME_DESC_SZ);
- if (!skb) {
- rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
- __func__);
+ if (!skb)
return -ENOMEM;
- }
memset(skb->data, 0, FRAME_DESC_SZ);
mgmt_frame = (struct rsi_mac_frame *)skb->data;
@@ -919,11 +893,8 @@ int rsi_set_channel(struct rsi_common *common, u16 channel)
"%s: Sending scan req frame\n", __func__);
skb = dev_alloc_skb(FRAME_DESC_SZ);
- if (!skb) {
- rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
- __func__);
+ if (!skb)
return -ENOMEM;
- }
memset(skb->data, 0, FRAME_DESC_SZ);
mgmt_frame = (struct rsi_mac_frame *)skb->data;
@@ -980,6 +951,7 @@ static int rsi_compare(const void *a, const void *b)
static bool rsi_map_rates(u16 rate, int *offset)
{
int kk;
+
for (kk = 0; kk < ARRAY_SIZE(rsi_mcsrates); kk++) {
if (rate == mcs[kk]) {
*offset = kk;
@@ -1013,20 +985,14 @@ static int rsi_send_auto_rate_request(struct rsi_common *common)
u8 num_supported_rates = 0;
u8 rate_table_offset, rate_offset = 0;
u32 rate_bitmap = common->bitrate_mask[band];
-
u16 *selected_rates, min_rate;
skb = dev_alloc_skb(sizeof(struct rsi_auto_rate));
- if (!skb) {
- rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
- __func__);
+ if (!skb)
return -ENOMEM;
- }
selected_rates = kzalloc(2 * RSI_TBL_SZ, GFP_KERNEL);
if (!selected_rates) {
- rsi_dbg(ERR_ZONE, "%s: Failed in allocation of mem\n",
- __func__);
dev_kfree_skb(skb);
return -ENOMEM;
}
@@ -1140,14 +1106,17 @@ void rsi_inform_bss_status(struct rsi_common *common,
u16 aid)
{
if (status) {
+ common->hw_data_qs_blocked = true;
rsi_hal_send_sta_notify_frame(common,
RSI_IFTYPE_STATION,
STA_CONNECTED,
bssid,
qos_enable,
aid);
- if (common->min_rate == 0xffff)
+ if (common->min_rate == 0xffff) {
+ rsi_dbg(INFO_ZONE, "Send auto rate request\n");
rsi_send_auto_rate_request(common);
+ }
} else {
rsi_hal_send_sta_notify_frame(common,
RSI_IFTYPE_STATION,
@@ -1170,14 +1139,12 @@ static int rsi_eeprom_read(struct rsi_common *common)
struct rsi_mac_frame *mgmt_frame;
struct sk_buff *skb;
- rsi_dbg(MGMT_TX_ZONE, "%s: Sending EEPROM read req frame\n", __func__);
+ rsi_dbg(MGMT_TX_ZONE,
+ "%s: Sending EEPROM read req frame\n", __func__);
skb = dev_alloc_skb(FRAME_DESC_SZ);
- if (!skb) {
- rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
- __func__);
+ if (!skb)
return -ENOMEM;
- }
memset(skb->data, 0, FRAME_DESC_SZ);
mgmt_frame = (struct rsi_mac_frame *)skb->data;
@@ -1214,11 +1181,8 @@ int rsi_send_block_unblock_frame(struct rsi_common *common, bool block_event)
rsi_dbg(MGMT_TX_ZONE, "%s: Sending block/unblock frame\n", __func__);
skb = dev_alloc_skb(FRAME_DESC_SZ);
- if (!skb) {
- rsi_dbg(ERR_ZONE, "%s: Failed in allocation of skb\n",
- __func__);
+ if (!skb)
return -ENOMEM;
- }
memset(skb->data, 0, FRAME_DESC_SZ);
mgmt_frame = (struct rsi_mac_frame *)skb->data;
@@ -1261,9 +1225,8 @@ static int rsi_handle_ta_confirm_type(struct rsi_common *common,
if (rsi_eeprom_read(common)) {
common->fsm_state = FSM_CARD_NOT_READY;
goto out;
- } else {
+ } else
common->fsm_state = FSM_EEPROM_READ_MAC_ADDR;
- }
} else {
rsi_dbg(INFO_ZONE,
"%s: Received bootup params cfm in %d state\n",
@@ -1273,6 +1236,9 @@ static int rsi_handle_ta_confirm_type(struct rsi_common *common,
break;
case EEPROM_READ_TYPE:
+ rsi_dbg(FSM_ZONE,
+ "%s: EEPROM READ confirm received\n",
+ __func__);
if (common->fsm_state == FSM_EEPROM_READ_MAC_ADDR) {
if (msg[16] == MAGIC_WORD) {
u8 offset = (FRAME_DESC_SZ + WLAN_HOST_MODE_LEN
@@ -1324,7 +1290,8 @@ static int rsi_handle_ta_confirm_type(struct rsi_common *common,
goto out;
} else {
common->fsm_state = FSM_BB_RF_PROG_SENT;
- rsi_dbg(FSM_ZONE, "%s: Radio cap cfm received\n",
+ rsi_dbg(FSM_ZONE,
+ "%s: Radio cap cfm received\n",
__func__);
}
} else {
@@ -1347,27 +1314,29 @@ static int rsi_handle_ta_confirm_type(struct rsi_common *common,
}
} else {
rsi_dbg(INFO_ZONE,
- "%s: Received bbb_rf cfm in %d state\n",
+ "%s: Received bb_rf cfm in %d state\n",
__func__, common->fsm_state);
return 0;
}
break;
default:
- rsi_dbg(INFO_ZONE, "%s: Invalid TA confirm pkt received\n",
+ rsi_dbg(INFO_ZONE,
+ "%s: Invalid TA confirm pkt received\n",
__func__);
break;
}
return 0;
out:
- rsi_dbg(ERR_ZONE, "%s: Unable to send pkt/Invalid frame received\n",
+ rsi_dbg(ERR_ZONE,
+ "%s: Unable to send pkt/Invalid frame received\n",
__func__);
return -EINVAL;
}
/**
* rsi_mgmt_pkt_recv() - This function processes the management packets
- * recieved from the hardware.
+ * received from the hardware.
* @common: Pointer to the driver private structure.
* @msg: Pointer to the received packet.
*
@@ -1376,7 +1345,7 @@ out:
int rsi_mgmt_pkt_recv(struct rsi_common *common, u8 *msg)
{
s32 msg_len = (le16_to_cpu(*(__le16 *)&msg[0]) & 0x0fff);
- u16 msg_type = (msg[2]);
+ u16 msg_type = msg[2];
int ret;
rsi_dbg(FSM_ZONE, "%s: Msg Len: %d, Msg Type: %4x\n",
@@ -1404,8 +1373,8 @@ int rsi_mgmt_pkt_recv(struct rsi_common *common, u8 *msg)
rsi_dbg(FSM_ZONE, "%s: Probe confirm received\n",
__func__);
}
- } else {
+ } else
return rsi_mgmt_pkt_to_core(common, msg, msg_len, msg_type);
- }
+
return 0;
}
diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c
index 8428858..331865b 100644
--- a/drivers/net/wireless/rsi/rsi_91x_sdio.c
+++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c
@@ -1,6 +1,8 @@
/**
* Copyright (c) 2014 Redpine Signals Inc.
*
+ * Developers:
+ * Fariya Fathima 2014 <fariya.f@redpinesignals.com>
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
@@ -128,7 +130,7 @@ static int rsi_issue_sdiocommand(struct sdio_func *func,
}
/**
- * rsi_handle_interrupt() - This function is called upon the occurence
+ * rsi_handle_interrupt() - This function is called upon the occurrence
* of an interrupt.
* @function: Pointer to the sdio_func structure.
*
@@ -183,7 +185,7 @@ static void rsi_reset_card(struct sdio_func *pfunction)
host->ios.timing = MMC_TIMING_LEGACY;
host->ops->set_ios(host, &host->ios);
- /*
+ /**
* This delay should be sufficient to allow the power supply
* to reach the minimum voltage.
*/
@@ -193,7 +195,7 @@ static void rsi_reset_card(struct sdio_func *pfunction)
host->ios.power_mode = MMC_POWER_ON;
host->ops->set_ios(host, &host->ios);
- /*
+ /**
* This delay must be at least 74 clock sizes, or 1 ms, or the
* time required to reach a stable voltage.
*/
@@ -361,6 +363,7 @@ static int rsi_setblocklength(struct rsi_hw *adapter, u32 length)
struct rsi_91x_sdiodev *dev =
(struct rsi_91x_sdiodev *)adapter->rsi_dev;
int status;
+
rsi_dbg(INIT_ZONE, "%s: Setting the block length\n", __func__);
status = sdio_set_block_size(dev->pfunction, length);
@@ -464,6 +467,7 @@ int rsi_sdio_write_register(struct rsi_hw *adapter,
void rsi_sdio_ack_intr(struct rsi_hw *adapter, u8 int_bit)
{
int status;
+
status = rsi_sdio_write_register(adapter,
1,
(SDIO_FUN1_INTR_CLR_REG |
@@ -473,8 +477,6 @@ void rsi_sdio_ack_intr(struct rsi_hw *adapter, u8 int_bit)
rsi_dbg(ERR_ZONE, "%s: unable to send ack\n", __func__);
}
-
-
/**
* rsi_sdio_read_register_multiple() - This function read multiple bytes of
* information from the SD card.
@@ -667,7 +669,7 @@ static int rsi_init_sdio_interface(struct rsi_hw *adapter,
goto fail;
}
- rsi_dbg(INIT_ZONE, "%s: Setup card succesfully\n", __func__);
+ rsi_dbg(INIT_ZONE, "%s: Setup card successfully\n", __func__);
status = rsi_init_sdio_slave_regs(adapter);
if (status) {
diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio_ops.c b/drivers/net/wireless/rsi/rsi_91x_sdio_ops.c
index 40d7231..ae42391 100644
--- a/drivers/net/wireless/rsi/rsi_91x_sdio_ops.c
+++ b/drivers/net/wireless/rsi/rsi_91x_sdio_ops.c
@@ -252,11 +252,8 @@ static int rsi_process_pkt(struct rsi_common *common)
rcv_pkt_len = (num_blks * 256);
common->rx_data_pkt = kmalloc(rcv_pkt_len, GFP_KERNEL);
- if (!common->rx_data_pkt) {
- rsi_dbg(ERR_ZONE, "%s: Failed in memory allocation\n",
- __func__);
+ if (!common->rx_data_pkt)
return -ENOMEM;
- }
status = rsi_sdio_host_intf_read_pkt(adapter,
common->rx_data_pkt,
@@ -426,8 +423,8 @@ void rsi_interrupt_handler(struct rsi_hw *adapter)
"%s: ==> FIRMWARE Assert <==\n",
__func__);
status = rsi_sdio_read_register(common->priv,
- SDIO_FW_STATUS_REG,
- &fw_status);
+ SDIO_FW_STATUS_REG,
+ &fw_status);
if (status) {
rsi_dbg(ERR_ZONE,
"%s: Failed to read f/w reg\n",
@@ -435,7 +432,7 @@ void rsi_interrupt_handler(struct rsi_hw *adapter)
} else {
rsi_dbg(ERR_ZONE,
"%s: Firmware Status is 0x%x\n",
- __func__ , fw_status);
+ __func__, fw_status);
rsi_sdio_ack_intr(common->priv,
(1 << FW_ASSERT_IND));
}
diff --git a/drivers/net/wireless/rsi/rsi_91x_usb.c b/drivers/net/wireless/rsi/rsi_91x_usb.c
index ef5d394..2b322e5 100644
--- a/drivers/net/wireless/rsi/rsi_91x_usb.c
+++ b/drivers/net/wireless/rsi/rsi_91x_usb.c
@@ -1,6 +1,9 @@
/**
* Copyright (c) 2014 Redpine Signals Inc.
*
+ * Developers:
+ * Prameela Rani Garnepudi 2016 <prameela.garnepudi@redpinesignals.com>
+ *
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
@@ -43,7 +46,6 @@ static int rsi_usb_card_write(struct rsi_hw *adapter,
len,
&transfer,
HZ * 5);
-
if (status < 0) {
rsi_dbg(ERR_ZONE,
"Card write failed with error code :%10d\n", status);
@@ -275,11 +277,11 @@ static int rsi_rx_urb_submit(struct rsi_hw *adapter)
/**
* rsi_usb_write_register_multiple() - This function writes multiple bytes of
- * information to multiple registers.
- * @adapter: Pointer to the adapter structure.
- * @addr: Address of the register.
- * @data: Pointer to the data that has to be written.
- * @count: Number of multiple bytes to be written on to the registers.
+ * information to the given address.
+ * @adapter: Pointer to the adapter structure.
+ * @addr: Address of the register.
+ * @data: Pointer to the data that has to be written.
+ * @count: Number of multiple bytes to be written on to the registers.
*
* Return: status: 0 on success, a negative error code on failure.
*/
@@ -392,11 +394,8 @@ static int rsi_init_usb_interface(struct rsi_hw *adapter,
usb_set_intfdata(pfunction, adapter);
common->rx_data_pkt = kmalloc(2048, GFP_KERNEL);
- if (!common->rx_data_pkt) {
- rsi_dbg(ERR_ZONE, "%s: Failed to allocate memory\n",
- __func__);
+ if (!common->rx_data_pkt)
return -ENOMEM;
- }
rsi_dev->tx_buffer = kmalloc(2048, GFP_KERNEL);
if (!rsi_dev->tx_buffer) {
@@ -568,7 +567,20 @@ static struct usb_driver rsi_driver = {
#endif
};
-module_usb_driver(rsi_driver);
+static int __init rsi_usb_module_init(void)
+{
+ rsi_dbg(INIT_ZONE,
+ "=====> RSI USB Module Initialize <=====\n");
+ return usb_register(&rsi_driver);
+}
+
+static void __exit rsi_usb_module_exit(void)
+{
+ usb_deregister(&rsi_driver);
+}
+
+module_init(rsi_usb_module_init);
+module_exit(rsi_usb_module_exit);
MODULE_AUTHOR("Redpine Signals Inc");
MODULE_DESCRIPTION("Common USB layer for RSI drivers");
diff --git a/drivers/net/wireless/rsi/rsi_common.h b/drivers/net/wireless/rsi/rsi_common.h
index d3fbe33..ad1be13 100644
--- a/drivers/net/wireless/rsi/rsi_common.h
+++ b/drivers/net/wireless/rsi/rsi_common.h
@@ -38,7 +38,7 @@ static inline int rsi_wait_event(struct rsi_event *event, u32 timeout)
if (!timeout)
status = wait_event_interruptible(event->event_queue,
- (atomic_read(&event->event_condition) == 0));
+ (!atomic_read(&event->event_condition)));
else
status = wait_event_interruptible_timeout(event->event_queue,
(atomic_read(&event->event_condition) == 0),
diff --git a/drivers/net/wireless/rsi/rsi_debugfs.h b/drivers/net/wireless/rsi/rsi_debugfs.h
index 580ad3b..8b64944 100644
--- a/drivers/net/wireless/rsi/rsi_debugfs.h
+++ b/drivers/net/wireless/rsi/rsi_debugfs.h
@@ -23,12 +23,10 @@
#ifndef CONFIG_RSI_DEBUGFS
static inline int rsi_init_dbgfs(struct rsi_hw *adapter)
{
- return 0;
}
static inline void rsi_remove_dbgfs(struct rsi_hw *adapter)
{
- return;
}
#else
struct rsi_dbg_files {
@@ -42,6 +40,7 @@ struct rsi_debugfs {
struct rsi_dbg_ops *dfs_get_ops;
struct dentry *rsi_files[MAX_DEBUGFS_ENTRIES];
};
+
int rsi_init_dbgfs(struct rsi_hw *adapter);
void rsi_remove_dbgfs(struct rsi_hw *adapter);
#endif
diff --git a/drivers/net/wireless/rsi/rsi_main.h b/drivers/net/wireless/rsi/rsi_main.h
index dcd0957..cde1a75 100644
--- a/drivers/net/wireless/rsi/rsi_main.h
+++ b/drivers/net/wireless/rsi/rsi_main.h
@@ -21,23 +21,25 @@
#include <linux/skbuff.h>
#include <net/mac80211.h>
-#define ERR_ZONE BIT(0) /* For Error Msgs */
-#define INFO_ZONE BIT(1) /* For General Status Msgs */
-#define INIT_ZONE BIT(2) /* For Driver Init Seq Msgs */
-#define MGMT_TX_ZONE BIT(3) /* For TX Mgmt Path Msgs */
-#define MGMT_RX_ZONE BIT(4) /* For RX Mgmt Path Msgs */
-#define DATA_TX_ZONE BIT(5) /* For TX Data Path Msgs */
-#define DATA_RX_ZONE BIT(6) /* For RX Data Path Msgs */
-#define FSM_ZONE BIT(7) /* For State Machine Msgs */
-#define ISR_ZONE BIT(8) /* For Interrupt Msgs */
+#define ERR_ZONE BIT(0) /* Error Msgs */
+#define INFO_ZONE BIT(1) /* General Debug Msgs */
+#define INIT_ZONE BIT(2) /* Driver Init Msgs */
+#define MGMT_TX_ZONE BIT(3) /* TX Mgmt Path Msgs */
+#define MGMT_RX_ZONE BIT(4) /* RX Mgmt Path Msgs */
+#define DATA_TX_ZONE BIT(5) /* TX Data Path Msgs */
+#define DATA_RX_ZONE BIT(6) /* RX Data Path Msgs */
+#define FSM_ZONE BIT(7) /* State Machine Msgs */
+#define ISR_ZONE BIT(8) /* Interrupt Msgs */
#define FSM_CARD_NOT_READY 0
-#define FSM_BOOT_PARAMS_SENT 1
-#define FSM_EEPROM_READ_MAC_ADDR 2
-#define FSM_RESET_MAC_SENT 3
-#define FSM_RADIO_CAPS_SENT 4
-#define FSM_BB_RF_PROG_SENT 5
-#define FSM_MAC_INIT_DONE 6
+#define FSM_COMMON_DEV_PARAMS_SENT 1
+#define FSM_BOOT_PARAMS_SENT 2
+#define FSM_EEPROM_READ_MAC_ADDR 3
+#define FSM_EEPROM_READ_RF_TYPE 4
+#define FSM_RESET_MAC_SENT 5
+#define FSM_RADIO_CAPS_SENT 6
+#define FSM_BB_RF_PROG_SENT 7
+#define FSM_MAC_INIT_DONE 8
extern u32 rsi_zone_enabled;
extern __printf(2, 3) void rsi_dbg(u32 zone, const char *fmt, ...);
@@ -206,12 +208,14 @@ struct rsi_common {
bool hw_data_qs_blocked;
};
+#define IEEE80211_NUM_BANDS 2
+
struct rsi_hw {
struct rsi_common *priv;
struct ieee80211_hw *hw;
struct ieee80211_vif *vifs[RSI_MAX_VIFS];
struct ieee80211_tx_queue_params edca_params[NUM_EDCA_QUEUES];
- struct ieee80211_supported_band sbands[NUM_NL80211_BANDS];
+ struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
struct device *device;
u8 sc_nvifs;
diff --git a/drivers/net/wireless/rsi/rsi_mgmt.h b/drivers/net/wireless/rsi/rsi_mgmt.h
index 3741173..ed3aa83 100644
--- a/drivers/net/wireless/rsi/rsi_mgmt.h
+++ b/drivers/net/wireless/rsi/rsi_mgmt.h
@@ -71,31 +71,31 @@
#define RSI_ENABLE_40MHZ (0x1 << 3)
#define ENABLE_SHORTGI_RATE BIT(9)
-#define RX_BA_INDICATION 1
-#define RSI_TBL_SZ 40
-#define MAX_RETRIES 8
+#define RX_BA_INDICATION 1
+#define RSI_TBL_SZ 40
+#define MAX_RETRIES 8
#define RSI_IFTYPE_STATION 0
-#define STD_RATE_MCS7 0x07
-#define STD_RATE_MCS6 0x06
-#define STD_RATE_MCS5 0x05
-#define STD_RATE_MCS4 0x04
-#define STD_RATE_MCS3 0x03
-#define STD_RATE_MCS2 0x02
-#define STD_RATE_MCS1 0x01
-#define STD_RATE_MCS0 0x00
-#define STD_RATE_54 0x6c
-#define STD_RATE_48 0x60
-#define STD_RATE_36 0x48
-#define STD_RATE_24 0x30
-#define STD_RATE_18 0x24
-#define STD_RATE_12 0x18
-#define STD_RATE_11 0x16
-#define STD_RATE_09 0x12
-#define STD_RATE_06 0x0C
-#define STD_RATE_5_5 0x0B
-#define STD_RATE_02 0x04
-#define STD_RATE_01 0x02
+#define STD_RATE_MCS7 0x07
+#define STD_RATE_MCS6 0x06
+#define STD_RATE_MCS5 0x05
+#define STD_RATE_MCS4 0x04
+#define STD_RATE_MCS3 0x03
+#define STD_RATE_MCS2 0x02
+#define STD_RATE_MCS1 0x01
+#define STD_RATE_MCS0 0x00
+#define STD_RATE_54 0x6c
+#define STD_RATE_48 0x60
+#define STD_RATE_36 0x48
+#define STD_RATE_24 0x30
+#define STD_RATE_18 0x24
+#define STD_RATE_12 0x18
+#define STD_RATE_11 0x16
+#define STD_RATE_09 0x12
+#define STD_RATE_06 0x0C
+#define STD_RATE_5_5 0x0B
+#define STD_RATE_02 0x04
+#define STD_RATE_01 0x02
#define RSI_RF_TYPE 1
#define RSI_RATE_00 0x00
@@ -173,9 +173,9 @@ enum cmd_frame_type {
AUTO_RATE_IND,
BOOTUP_PARAMS_REQUEST,
VAP_CAPABILITIES,
- EEPROM_READ_TYPE ,
+ EEPROM_READ_TYPE,
EEPROM_WRITE,
- GPIO_PIN_CONFIG ,
+ GPIO_PIN_CONFIG,
SET_RX_FILTER,
AMPDU_IND,
STATS_REQUEST_FRAME,
@@ -288,8 +288,8 @@ static inline u8 rsi_get_channel(u8 *addr)
int rsi_mgmt_pkt_recv(struct rsi_common *common, u8 *msg);
int rsi_set_vap_capabilities(struct rsi_common *common, enum opmode mode);
-int rsi_send_aggregation_params_frame(struct rsi_common *common, u16 tid,
- u16 ssn, u8 buf_size, u8 event);
+int rsi_send_aggr_params_frame(struct rsi_common *common, u16 tid,
+ u16 ssn, u8 buf_size, u8 event);
int rsi_hal_load_key(struct rsi_common *common, u8 *data, u16 key_len,
u8 key_type, u8 key_id, u32 cipher);
int rsi_set_channel(struct rsi_common *common, u16 chno);
diff --git a/drivers/net/wireless/rsi/rsi_sdio.h b/drivers/net/wireless/rsi/rsi_sdio.h
index c7e8f2b..33a657c 100644
--- a/drivers/net/wireless/rsi/rsi_sdio.h
+++ b/drivers/net/wireless/rsi/rsi_sdio.h
@@ -37,17 +37,17 @@ enum sdio_interrupt_type {
};
/* Buffer status register related info */
-#define PKT_BUFF_SEMI_FULL 0
-#define PKT_BUFF_FULL 1
-#define PKT_MGMT_BUFF_FULL 2
-#define MSDU_PKT_PENDING 3
+#define PKT_BUFF_SEMI_FULL 0
+#define PKT_BUFF_FULL 1
+#define PKT_MGMT_BUFF_FULL 2
+#define MSDU_PKT_PENDING 3
/* Interrupt Bit Related Macros */
-#define PKT_BUFF_AVAILABLE 1
-#define FW_ASSERT_IND 2
+#define PKT_BUFF_AVAILABLE 1
+#define FW_ASSERT_IND 2
-#define RSI_DEVICE_BUFFER_STATUS_REGISTER 0xf3
-#define RSI_FN1_INT_REGISTER 0xf9
-#define RSI_SD_REQUEST_MASTER 0x10000
+#define RSI_DEVICE_BUFFER_STATUS_REGISTER 0xf3
+#define RSI_FN1_INT_REGISTER 0xf9
+#define RSI_SD_REQUEST_MASTER 0x10000
/* FOR SD CARD ONLY */
#define SDIO_RX_NUM_BLOCKS_REG 0x000F1
--
2.4.11
^ permalink raw reply related
* Re: [PATCH] cfg80211: cap 20MHz VHT bitrate at MCS 8
From: Pedersen, Thomas @ 2016-09-07 18:20 UTC (permalink / raw)
To: Ben Greear, linux-wireless; +Cc: Johannes Berg
In-Reply-To: <2769a14e-964d-4ec2-9f04-ddd332434b78@candelatech.com>
On 09/06/2016 12:07 PM, Ben Greear wrote:
> On 09/06/2016 12:00 PM, Thomas Pedersen wrote:
>> Some drivers (ath10k) report MCS 9 @ 20MHz, which
>> technically isn't allowed. To get more meaningful value
>> than 0 out of this however, just cap the bitrate for 20MHz
>> to MCS 8.
>
> If it is actually reporting MCS9, why lie about it? Report it up
> the stack as a proper value instead of hiding the issue?
Good point, will send a v2 extrapolating the value to 86.5Mb/s.
--=20
thomas=
^ permalink raw reply
* Re: brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap()
From: Kalle Valo @ 2016-09-07 13:44 UTC (permalink / raw)
To: Arend Van Spriel; +Cc: linux-wireless, Arend van Spriel
In-Reply-To: <1473068749-22487-1-git-send-email-arend.vanspriel@broadcom.com>
Arend Van Spriel <arend.vanspriel@broadcom.com> wrote:
> User-space can choose to omit NL80211_ATTR_SSID and only provide raw
> IE TLV data. When doing so it can provide SSID IE with length exceeding
> the allowed size. The driver further processes this IE copying it
> into a local variable without checking the length. Hence stack can be
> corrupted and used as exploit.
>
> Cc: stable@vger.kernel.org # v4.7
> Reported-by: Daxing Guo <freener.gdx@gmail.com>
> Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com>
> Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
> Reviewed-by: Franky Lin <franky.lin@broadcom.com>
> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Thanks, 1 patch applied to wireless-drivers.git:
ded89912156b brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap()
--
Sent by pwcli
https://patchwork.kernel.org/patch/9313305/
^ permalink raw reply
* Re: ath9k: bring back direction setting in ath9k_{start_stop}
From: Kalle Valo @ 2016-09-07 13:23 UTC (permalink / raw)
To: Giedrius Statkevi?ius
Cc: kvalo, ath9k-devel, linux-wireless, ath9k-devel, netdev,
linux-kernel, Miaoqing Pan, stable, Giedrius Statkevičius
In-Reply-To: <20160901174702.8645-1-giedrius.statkevicius@gmail.com>
Giedrius Statkevi?ius <giedrius.statkevicius@gmail.com> wrote:
> A regression was introduced in commit id 79d4db1214a ("ath9k: cleanup
> led_pin initial") that broken the WLAN status led on my laptop with
> AR9287 after suspending and resuming.
>
> Steps to reproduce:
> * Suspend (laptop)
> * Resume (laptop)
> * Observe that the WLAN led no longer turns ON/OFF depending on the
> status and is always red
>
> Even though for my case it only needs to be set to OUT in ath9k_start
> but for consistency bring back the IN direction setting as well.
>
> Cc: Miaoqing Pan <miaoqing@codeaurora.org>
> Cc: Kalle Valo <kvalo@qca.qualcomm.com>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Thanks, 1 patch applied to ath-current branch of ath.git:
e34f2ff40e03 ath9k: bring back direction setting in ath9k_{start_stop}
--
Sent by pwcli
https://patchwork.kernel.org/patch/9309829/
^ permalink raw reply
* Re: ath9k: bring back direction setting in ath9k_{start_stop}
From: Kalle Valo @ 2016-09-07 13:16 UTC (permalink / raw)
To: Giedrius Statkevi?ius
Cc: ath9k-devel, linux-wireless, ath9k-devel, netdev, linux-kernel,
Miaoqing Pan, stable
In-Reply-To: <e61bb634860745818f8c8c99f79f71a0@euamsexm01a.eu.qualcomm.com>
Kalle Valo <kvalo@qca.qualcomm.com> writes:
> Giedrius Statkevi?ius <giedrius.statkevicius@gmail.com> wrote:
>> A regression was introduced in commit id 79d4db1214a ("ath9k: cleanup
>> led_pin initial") that broken the WLAN status led on my laptop with
>> AR9287 after suspending and resuming.
>>
>> Steps to reproduce:
>> * Suspend (laptop)
>> * Resume (laptop)
>> * Observe that the WLAN led no longer turns ON/OFF depending on the
>> status and is always red
>>
>> Even though for my case it only needs to be set to OUT in ath9k_start
>> but for consistency bring back the IN direction setting as well.
>>
>> Cc: Miaoqing Pan <miaoqing@codeaurora.org>
>> Cc: Kalle Valo <kvalo@qca.qualcomm.com>
>> Cc: <stable@vger.kernel.org>
>> Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
>
> Thanks, 1 patch applied to ath-next branch of ath.git:
>
> 088a60926b66 ath9k: bring back direction setting in ath9k_{start_stop}
Oops, I was supposed to apply this to ath-current branch. Please ignore
this. Luckily I didn't push yet so I can easily fix this.
--
Kalle Valo
^ permalink raw reply
* Re: ath9k: bring back direction setting in ath9k_{start_stop}
From: Kalle Valo @ 2016-09-07 13:11 UTC (permalink / raw)
To: Giedrius Statkevi?ius
Cc: kvalo, ath9k-devel, linux-wireless, ath9k-devel, netdev,
linux-kernel, Miaoqing Pan, stable, Giedrius Statkevičius
In-Reply-To: <20160901174702.8645-1-giedrius.statkevicius@gmail.com>
Giedrius Statkevi?ius <giedrius.statkevicius@gmail.com> wrote:
> A regression was introduced in commit id 79d4db1214a ("ath9k: cleanup
> led_pin initial") that broken the WLAN status led on my laptop with
> AR9287 after suspending and resuming.
>
> Steps to reproduce:
> * Suspend (laptop)
> * Resume (laptop)
> * Observe that the WLAN led no longer turns ON/OFF depending on the
> status and is always red
>
> Even though for my case it only needs to be set to OUT in ath9k_start
> but for consistency bring back the IN direction setting as well.
>
> Cc: Miaoqing Pan <miaoqing@codeaurora.org>
> Cc: Kalle Valo <kvalo@qca.qualcomm.com>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Thanks, 1 patch applied to ath-next branch of ath.git:
088a60926b66 ath9k: bring back direction setting in ath9k_{start_stop}
--
Sent by pwcli
https://patchwork.kernel.org/patch/9309829/
^ permalink raw reply
* Re: [PATCH] rsi: code clean-up
From: Kalle Valo @ 2016-09-07 11:38 UTC (permalink / raw)
To: Julian Calaby
Cc: Prameela Rani Garnepudi, linux-wireless,
שרי שרון,
Emmanuel Grumbach, Nicholas Mc Guire, xypron.glpk,
SF Markus Elfring, johannes.berg@intel.com
In-Reply-To: <CAGRGNgVyybFSqNLvtvXn-OL4dSXCpbYG2xR+cepayEQ6zPowSg@mail.gmail.com>
Julian Calaby <julian.calaby@gmail.com> writes:
> Hi,
>
> On Wed, Sep 7, 2016 at 8:26 PM, Prameela Rani Garnepudi
> <prameela.garnepudi@redpinesignals.com> wrote:
>> From 0c3da95dfac07df5dffb5e00bcd8a38f2f8491c9 Mon Sep 17 00:00:00 2001
>> From: Prameela Rani Garnepudi <prameela.garnepudi@redpinesignals.com>
>> Date: Wed, 7 Sep 2016 15:28:43 +0530
>> Subject: [PATCH] rsi: code clean-up
>
> Describe what the changes are achieving.
>
> You're also still sending this as a HTML email, there are instructions
> on how to configure your email client to send plain text emails here:
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/email-clients.txt
>
> Because you're sending multi-part HTML emails, your emails are being
> rejected by the mailing list.
I recommend to try to use git-send-email to submit patches, it makes
life so much more easier:
https://www.kernel.org/pub/software/scm/git/docs/git-send-email.html
--
Kalle Valo
^ permalink raw reply
* Re: [PATCH v4 2/4] wcn36xx: Transition driver to SMD client
From: Kalle Valo @ 2016-09-07 11:35 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Eugene Krasnikov, wcn36xx, linux-wireless, netdev, linux-kernel,
linux-arm-msm, Andy Gross
In-Reply-To: <1473200312-22438-2-git-send-email-bjorn.andersson@linaro.org>
Bjorn Andersson <bjorn.andersson@linaro.org> writes:
> The wcn36xx wifi driver follows the life cycle of the WLAN_CTRL SMD
> channel, as such it should be a SMD client. This patch makes this
> transition, now that we have the necessary frameworks available.
>
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
>
> Changes since v3:
> - Made msg_header const in wcn36xx_smd_rsp_process()
>
> Changes since v2:
> - Correct the call to the new ieee80211_scan_completed()
>
> drivers/net/wireless/ath/wcn36xx/dxe.c | 16 +++---
> drivers/net/wireless/ath/wcn36xx/main.c | 79 ++++++++++++++++++++----------
> drivers/net/wireless/ath/wcn36xx/smd.c | 31 +++++-------
> drivers/net/wireless/ath/wcn36xx/smd.h | 5 ++
> drivers/net/wireless/ath/wcn36xx/wcn36xx.h | 21 +++-----
> 5 files changed, 86 insertions(+), 66 deletions(-)
So I don't actually need to enable COMPILE_TEST anymore? Nice, thanks.
--
Kalle Valo
^ permalink raw reply
* Re: [PATCH v4 1/4] soc: qcom: wcnss_ctrl: Stub wcnss_ctrl API
From: Kalle Valo @ 2016-09-07 11:33 UTC (permalink / raw)
To: Andy Gross
Cc: Bjorn Andersson, Eugene Krasnikov, wcn36xx, linux-wireless,
netdev, linux-kernel, linux-arm-msm, Marcel Holtmann
In-Reply-To: <20160907013958.GA6975@hector.attlocal.net>
Andy Gross <andy.gross@linaro.org> writes:
> On Tue, Sep 06, 2016 at 03:18:29PM -0700, Bjorn Andersson wrote:
>> Stub the wcnss_ctrl API to allow compile testing wcnss function drivers.
>>
>> Cc: Marcel Holtmann <marcel@holtmann.org>
>> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
>> ---
>>
>> There are no other pending changes colliding with this, so if Andy is okay with
>> this it could be merged through Kalle's tree - together with the other patches.
>>
>> Marcel, with this applied we can drop the depends on QCOM_SMD from the
>> btqcomsmd driver as well.
>>
>> Changes since v3:
>> - Added this patch to allow compile testing without SMD support after patch 2
>>
>> include/linux/soc/qcom/wcnss_ctrl.h | 13 +++++++++++++
>> 1 file changed, 13 insertions(+)
>>
>
> This is fine.
>
> Acked-by: Andy Gross <andy.gross@linaro.org>
Thanks. I'll then apply this to my ath.git tree and it will go to Linus
via net-next.
--
Kalle Valo
^ permalink raw reply
* Re: [PATCH] mwifiex: handle edmac vendor command
From: Kalle Valo @ 2016-09-07 11:27 UTC (permalink / raw)
To: Arend Van Spriel; +Cc: Amitkumar Karwar, linux-wireless@vger.kernel.org
In-Reply-To: <2320ad20-164e-12c5-0b01-9612a1d24300@broadcom.com>
Arend Van Spriel <arend.vanspriel@broadcom.com> writes:
> On 1-9-2016 16:53, Kalle Valo wrote:
>
>> Sorry for the delay. I have been thinking about vendor commands quite a
>> lot and I don't think they belong to upstream drivers. For regular use
>> cases (used by normal users) we have nl80211, for developer and testing
>> purposes we have debugfs and for manufacturing type of tests we have
>> nl80211 testmode interface. The focus of development should be adding
>> new functionality to nl80211 (and other generic interfaces), not to
>> driver specific vendor commands.
>>
>> I know brcm80211 and ti's wlcore have few vendor commands but I'm hoping
>> to remove them sometime soon.
>>
>> Thoughts?
>
> Grabbing the original commit message for vendor commands:
>
> commit ad7e718c9b4f717823fd920a0103f7b0fb06183f
> Author: Johannes Berg <johannes.berg@intel.com>
> Date: Wed Nov 13 13:37:47 2013 +0100
>
> nl80211: vendor command support
>
> Add support for vendor-specific commands to nl80211. This is
> intended to be used for really vendor-specific functionality
> that can't be implemented in a generic fashion for any reason.
> It's *NOT* intended to be used for any normal/generic feature
> or any optimisations that could be implemented across drivers.
>
> I agree that the effort needs to be made to come up with a solution that
> is usable by (most of) all drivers in the upstream wireless subsystem.
>
> The thing with the test mode is that you need to enable it in Kconfig.
And that's on purpose. We did not want testmode to be enabled on distro
kernels, for example.
> We have 1 vendor command in brcmfmac and it used to be under testmode
> api. However, because of the Kconfig thing it would mean we need a
> different kernel to do manufacturing testing. Especially when the
> modules are built-in. The OEMs typically don't like that as they want to
> do the testing using the same kernel as what ends up in the product.
> This was our motivation to use the vendor command when that was added.
Is there a specific reason why you can't keep the testmode always
enabled? Then you would have the same kernel both in manufacturing and
in "normal mode".
> It does have a nasty side-effect that some will see it as a drop-in
> replacement of the driver private ioctl-s. To some extent (as mentioned
> in the commit message above) that should be fine, but we need to make a
> good effort to move things to nl80211.
Sorry, but I'm way too cynical to buy that :) A "good effort" means that
in most of cases it will never happen. Once the vendor command is
accepted into upsteam trees the developer will lose any interest on
trying to make it a generic interface. That's just how humans work,
including me.
I do see your and Amitkumar's point how much easier the vendor commands
make it to implement new driver features and part of me also wants that.
I just think that in the long run that's detrimental for Linux wireless
and we end up into having multiple drivers having same features enabled
via different vendor commands.
--
Kalle Valo
^ permalink raw reply
* Re: [PATCH] rsi: code clean-up
From: Julian Calaby @ 2016-09-07 11:23 UTC (permalink / raw)
To: Prameela Rani Garnepudi
Cc: linux-wireless, Kalle Valo,
שרי שרון,
Emmanuel Grumbach, Nicholas Mc Guire, xypron.glpk,
SF Markus Elfring, johannes.berg@intel.com
In-Reply-To: <259efb66-b577-b6c1-a6af-2b27f8bbc1a4@redpinesignals.com>
Hi,
On Wed, Sep 7, 2016 at 8:26 PM, Prameela Rani Garnepudi
<prameela.garnepudi@redpinesignals.com> wrote:
> From 0c3da95dfac07df5dffb5e00bcd8a38f2f8491c9 Mon Sep 17 00:00:00 2001
> From: Prameela Rani Garnepudi <prameela.garnepudi@redpinesignals.com>
> Date: Wed, 7 Sep 2016 15:28:43 +0530
> Subject: [PATCH] rsi: code clean-up
Describe what the changes are achieving.
You're also still sending this as a HTML email, there are instructions
on how to configure your email client to send plain text emails here:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/email-clients.txt
Because you're sending multi-part HTML emails, your emails are being
rejected by the mailing list.
> Signed-off-by: Prameela Rani Garnepudi
> <prameela.garnepudi@redpinesignals.com>
> ---
> drivers/net/wireless/rsi/rsi_91x_core.c | 18 ++--
> drivers/net/wireless/rsi/rsi_91x_debugfs.c | 13 +--
> drivers/net/wireless/rsi/rsi_91x_mac80211.c | 81 +++++++++------
> drivers/net/wireless/rsi/rsi_91x_main.c | 16 ++-
> drivers/net/wireless/rsi/rsi_91x_mgmt.c | 155
> +++++++++++-----------------
> drivers/net/wireless/rsi/rsi_91x_sdio.c | 14 +--
> drivers/net/wireless/rsi/rsi_91x_sdio_ops.c | 11 +-
> drivers/net/wireless/rsi/rsi_91x_usb.c | 34 ++++--
> drivers/net/wireless/rsi/rsi_common.h | 2 +-
> drivers/net/wireless/rsi/rsi_debugfs.h | 3 +-
> drivers/net/wireless/rsi/rsi_main.h | 36 ++++---
> drivers/net/wireless/rsi/rsi_mgmt.h | 54 +++++-----
> drivers/net/wireless/rsi/rsi_sdio.h | 18 ++--
> 13 files changed, 228 insertions(+), 227 deletions(-)
You're doing a lot of stuff here, you really need to split this up
into several patches, e.g.
1. Fix the spelling mistakes
2. Add the new debug messages
etc. etc. etc.
Thanks,
--
Julian Calaby
Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
^ permalink raw reply
* Re: [PATCH] mwifiex: handle edmac vendor command
From: Kalle Valo @ 2016-09-07 10:59 UTC (permalink / raw)
To: Amitkumar Karwar; +Cc: linux-wireless@vger.kernel.org
In-Reply-To: <f827ba80b79646fd8711e1a00c2b8394@SC-EXCH04.marvell.com>
Amitkumar Karwar <akarwar@marvell.com> writes:
>> > There is something called energy detect mode. Chip can detect non-WiFi
>> > radio signal also and monitor it for specified time before
>> > transmitting frames. As per ETSI specification, enabling this mode is
>> > mandatory for some countries for certain frequencies.
>>
>> To me this looks this is something which can be generic, not a driver
>> specific interface. And why can't regulatory code enable this
>> automatically, without any user involvement? It already knows what
>> country we are in.
>
> Got it. I will check if we can make this as generic as you mentioned
> and explore the option.
Thanks. Please let us know how it goes.
--
Kalle Valo
^ permalink raw reply
* RE: mwifiex: PCIe8997 chip specific handling
From: Amitkumar Karwar @ 2016-09-07 10:13 UTC (permalink / raw)
To: Steve deRosier
Cc: Brian Norris, linux-wireless@vger.kernel.org, Cathy Luo,
Nishant Sarmukadam, linux-kernel@vger.kernel.org, Wei-Ning Huang
In-Reply-To: <0fb73fc01e7443d9afe550ca51505005@SC-EXCH04.marvell.com>
SGkgS2FsbGUsDQoNCj4gRnJvbTogbGludXgtd2lyZWxlc3Mtb3duZXJAdmdlci5rZXJuZWwub3Jn
IFttYWlsdG86bGludXgtd2lyZWxlc3MtDQo+IG93bmVyQHZnZXIua2VybmVsLm9yZ10gT24gQmVo
YWxmIE9mIEFtaXRrdW1hciBLYXJ3YXINCj4gU2VudDogVGh1cnNkYXksIEF1Z3VzdCAxMSwgMjAx
NiA0OjExIFBNDQo+IFRvOiBTdGV2ZSBkZVJvc2llcg0KPiBDYzogQnJpYW4gTm9ycmlzOyBsaW51
eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmc7IENhdGh5IEx1bzsgTmlzaGFudA0KPiBTYXJtdWth
ZGFtOyBsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnOyBXZWktTmluZyBIdWFuZw0KPiBTdWJq
ZWN0OiBSRTogbXdpZmlleDogUENJZTg5OTcgY2hpcCBzcGVjaWZpYyBoYW5kbGluZw0KPiANCj4g
SGkgU3RldmUsDQo+IA0KPiA+IEZyb206IFN0ZXZlIGRlUm9zaWVyIFttYWlsdG86ZGVyb3NpZXJA
Z21haWwuY29tXQ0KPiA+IFNlbnQ6IFRodXJzZGF5LCBBdWd1c3QgMTEsIDIwMTYgMjozOSBBTQ0K
PiA+IFRvOiBBbWl0a3VtYXIgS2Fyd2FyDQo+ID4gQ2M6IEJyaWFuIE5vcnJpczsgbGludXgtd2ly
ZWxlc3NAdmdlci5rZXJuZWwub3JnOyBDYXRoeSBMdW87IE5pc2hhbnQNCj4gPiBTYXJtdWthZGFt
OyBsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnOyBXZWktTmluZyBIdWFuZw0KPiA+IFN1Ympl
Y3Q6IFJlOiBtd2lmaWV4OiBQQ0llODk5NyBjaGlwIHNwZWNpZmljIGhhbmRsaW5nDQo+ID4NCj4g
PiBIaSwNCj4gPg0KPiA+IE9uIFdlZCwgQXVnIDEwLCAyMDE2IGF0IDEyOjA3IEFNLCBBbWl0a3Vt
YXIgS2Fyd2FyDQo+ID4gPGFrYXJ3YXJAbWFydmVsbC5jb20+DQo+ID4gd3JvdGU6DQo+ID4gPiBI
aSBCcmlhbiwNCj4gPiA+DQo+ID4gPj4gRnJvbTogQnJpYW4gTm9ycmlzIFttYWlsdG86YnJpYW5u
b3JyaXNAY2hyb21pdW0ub3JnXQ0KPiA+ID4+IFNlbnQ6IFdlZG5lc2RheSwgQXVndXN0IDEwLCAy
MDE2IDEyOjE0IEFNDQo+ID4gPj4gVG86IEFtaXRrdW1hciBLYXJ3YXINCj4gPiA+PiBDYzogbGlu
dXgtd2lyZWxlc3NAdmdlci5rZXJuZWwub3JnOyBDYXRoeSBMdW87IE5pc2hhbnQgU2FybXVrYWRh
bTsNCj4gPiA+PiBsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnDQo+ID4gPj4gU3ViamVjdDog
UmU6IG13aWZpZXg6IFBDSWU4OTk3IGNoaXAgc3BlY2lmaWMgaGFuZGxpbmcNCj4gPiA+Pg0KPiA+
ID4+IEhpLA0KPiA+ID4+DQo+ID4gPj4gT24gRnJpLCBKdWwgMjksIDIwMTYgYXQgMDQ6MDg6NTFQ
TSArMDUzMCwgQW1pdGt1bWFyIEthcndhciB3cm90ZToNCj4gPiA+PiA+IFRoZSBwYXRjaCBjb3Jy
ZWN0cyB0aGUgcmV2aXNpb24gaWQgcmVnaXN0ZXIgYW5kIHVzZXMgaXQgYWxvbmcNCj4gPiA+PiA+
IHdpdGggbWFnaWMgdmFsdWUgYW5kIGNoaXAgdmVyc2lvbiByZWdpc3RlcnMgdG8gZG93bmxvYWQN
Cj4gPiA+PiA+IGFwcHJvcHJpYXRlIGZpcm13YXJlIGltYWdlLg0KPiA+ID4+ID4NCj4gPiA+PiA+
IFBDSWU4OTk3IFogY2hpcHNldCB2YXJpYW50IGNvZGUgaGFzIGJlZW4gcmVtb3ZlZCwgYXMgaXQg
d29uJ3QgYmUNCj4gPiA+PiA+IHVzZWQgaW4gcHJvZHVjdGlvbi4NCj4gPiA+PiA+DQo+ID4gPj4g
PiBTaWduZWQtb2ZmLWJ5OiBBbWl0a3VtYXIgS2Fyd2FyIDxha2Fyd2FyQG1hcnZlbGwuY29tPg0K
PiA+ID4+ID4gLS0tDQo+ID4gPj4gPiAgZHJpdmVycy9uZXQvd2lyZWxlc3MvbWFydmVsbC9td2lm
aWV4L3BjaWUuYyB8IDM1DQo+ID4gPj4gPiArKysrKysrKysrLS0tLS0tLS0tLS0tLS0tLS0tLQ0K
PiA+ID4+ID4gZHJpdmVycy9uZXQvd2lyZWxlc3MvbWFydmVsbC9td2lmaWV4L3BjaWUuaCB8IDE0
ICsrKysrLS0tLS0tLQ0KPiA+ID4+ID4gIDIgZmlsZXMgY2hhbmdlZCwgMTggaW5zZXJ0aW9ucygr
KSwgMzEgZGVsZXRpb25zKC0pDQo+ID4gPj4NCj4gPiA+PiBbLi4uXQ0KPiA+ID4+DQo+ID4gPj4g
PiBkaWZmIC0tZ2l0IGEvZHJpdmVycy9uZXQvd2lyZWxlc3MvbWFydmVsbC9td2lmaWV4L3BjaWUu
aA0KPiA+ID4+ID4gYi9kcml2ZXJzL25ldC93aXJlbGVzcy9tYXJ2ZWxsL213aWZpZXgvcGNpZS5o
DQo+ID4gPj4gPiBpbmRleCBmNjk5MmYwLi40NmY5OWNhIDEwMDY0NA0KPiA+ID4+ID4gLS0tIGEv
ZHJpdmVycy9uZXQvd2lyZWxlc3MvbWFydmVsbC9td2lmaWV4L3BjaWUuaA0KPiA+ID4+ID4gKysr
IGIvZHJpdmVycy9uZXQvd2lyZWxlc3MvbWFydmVsbC9td2lmaWV4L3BjaWUuaA0KPiA+ID4+ID4g
QEAgLTMyLDEyICszMiw5IEBADQo+ID4gPj4gPiAgI2RlZmluZSBQQ0lFODg5N19ERUZBVUxUX0ZX
X05BTUUgIm1ydmwvcGNpZTg4OTdfdWFwc3RhLmJpbiINCj4gPiA+PiA+ICAjZGVmaW5lIFBDSUU4
ODk3X0EwX0ZXX05BTUUgIm1ydmwvcGNpZTg4OTdfdWFwc3RhX2EwLmJpbiINCj4gPiA+PiA+ICAj
ZGVmaW5lIFBDSUU4ODk3X0IwX0ZXX05BTUUgIm1ydmwvcGNpZTg4OTdfdWFwc3RhLmJpbiINCj4g
PiA+PiA+IC0jZGVmaW5lIFBDSUU4OTk3X0RFRkFVTFRfRldfTkFNRSAibXJ2bC9wY2lldXNiODk5
N19jb21ib192Mi5iaW4iDQo+ID4gPj4gPiAtI2RlZmluZSBQQ0lFVUFSVDg5OTdfRldfTkFNRV9a
ICJtcnZsL3BjaWV1YXJ0ODk5N19jb21iby5iaW4iDQo+ID4gPj4gPiAtI2RlZmluZSBQQ0lFVUFS
VDg5OTdfRldfTkFNRV9WMiAibXJ2bC9wY2lldWFydDg5OTdfY29tYm9fdjIuYmluIg0KPiA+ID4+
ID4gLSNkZWZpbmUgUENJRVVTQjg5OTdfRldfTkFNRV9aICJtcnZsL3BjaWV1c2I4OTk3X2NvbWJv
LmJpbiINCj4gPiA+PiA+IC0jZGVmaW5lIFBDSUVVU0I4OTk3X0ZXX05BTUVfVjIgIm1ydmwvcGNp
ZXVzYjg5OTdfY29tYm9fdjIuYmluIg0KPiA+ID4+ID4gLSNkZWZpbmUgUENJRTg5OTdfREVGQVVM
VF9XSUZJRldfTkFNRSAibXJ2bC9wY2llODk5N193bGFuLmJpbiINCj4gPiA+PiA+ICsjZGVmaW5l
IFBDSUVVQVJUODk5N19GV19OQU1FX1Y0ICJtcnZsL3BjaWV1YXJ0ODk5N19jb21ib192NC5iaW4i
DQo+ID4gPj4gPiArI2RlZmluZSBQQ0lFVVNCODk5N19GV19OQU1FX1Y0ICJtcnZsL3BjaWV1c2I4
OTk3X2NvbWJvX3Y0LmJpbiINCj4gPiA+PiA+ICsjZGVmaW5lIFBDSUU4OTk3X0RFRkFVTFRfV0lG
SUZXX05BTUUgIm1ydmwvcGNpZTg5OTdfd2xhbl92NC5iaW4iDQo+ID4gPj4NCj4gPiA+PiBXaHkg
ZG8gdmVyc2lvbiBidW1wcyByZXF1aXJlIGZpcm13YXJlIHJlbmFtZXM/IElzIHRoaXMganVzdCB0
byBtYWtlDQo+ID4gPj4gc3VyZSB5b3UgZG9uJ3QgbG9hZCB0aGUgbmV3IGZpcm13YXJlIG9uIG9s
ZCBjaGlwIHJldnMgdGhhdCB5b3UNCj4gPiA+PiBkb24ndCBwbGFuIHRvIHN1cHBvcnQgZm9yIHBy
b2R1Y3Rpb24gKGkuZS4sIG9ubHkgZWFybHkgcmV2cyBsaWtlDQo+ID4gPj4gdGhlIF9aIHlvdSdy
ZSBkcm9wcGluZyk/IFRoaXMgZG9lc24ndCBzZWVtcyBsaWtlIGEgZ29vZCBsb25nLXRlcm0NCj4g
PiA+PiBzb2x1dGlvbiwgYXQgbGVhc3Qgb25jZSB5b3Ugc3RhcnQgZ2V0dGluZyB0aGlzIHNpbGlj
b24gb3V0IGluIHRoZQ0KPiA+ID4+IHdpbGQuIEF0IHNvbWUgcG9pbnQsIEknZCBleHBlY3QgdG8g
c2VlIGEgc3RhYmxlIGZpbGUgbmFtZS4NCj4gPiA+Pg0KPiA+ID4+IEJyaWFuDQo+ID4gPj4NCj4g
PiA+DQo+ID4gPiBXZSBoYXZlbid0IHlldCBzdWJtaXR0ZWQgYW55IGZpcm13YXJlIGltYWdlIHVw
c3RyZWFtIGZvciA4OTk3DQo+IGNoaXBzZXQuDQo+ID4gPiBwY2lldWFydDg5OTdfY29tYm9fdjQu
YmluL3BjaWV1c2I4OTk3X2NvbWJvX3Y0LmJpbiB3b3VsZCBiZSBvdXINCj4gPiBmaXJtd2FyZSBj
YW5kaWRhdGUgZm9yIHVwc3RyZWFtIHN1Ym1pc3Npb24uIFRoZSBmaWxlbmFtZSB3b3VsZCByZW1h
aW4NCj4gPiBzYW1lIGhlcmVhZnRlci4NCj4gPiA+DQo+ID4gPiBwY2llKjg5OTdfY29tYm9fdjIu
YmluIGhhZCBzdXBwb3J0IG9ubHkgZm9yIEEwIGNoaXBzZXQNCj4gPiA+IHBjaWUqODk5N19jb21i
b192My5iaW4gd2FzIG91ciBpbnRlcm5hbCBkZXZlbG9wbWVudCB2ZXJzaW9uIHdoaWNoDQo+ID4g
PiBoYWQgc3VwcG9ydCBmb3IgQTEgY2hpcHNldCBwY2llKjg5OTdfY29tYm9fdjQuYmluIGhhcyBz
dXBwb3J0IGZvcg0KPiA+ID4gYm90aCBBMA0KPiA+IGFuZCBBMSBjaGlwc2V0cyBhbmQgdGhpcyBp
cyB0aGUgdmVyc2lvbiB0aGF0IHNoYWxsIGJlIHJlbGVhc2VkIHRvDQo+ID4gY3VzdG9tZXJzL3Vw
c3RyZWFtIGZyb20gbm93IG9uLg0KPiA+ID4NCj4gPg0KPiA+IFNlZW1zIHRvIG1lIHRoZW4gaXQg
c2hvdWxkIGp1c3QgYmUgbmFtZWQgcGNpZSo4OTk3X3dsYW4uYmluLiAgQQ0KPiA+IHZlcnNpb24g
bnVtYmVyIHNob3VsZG4ndCBiZSBwYXJ0IG9mIHRoZSBmaWxlIG5hbWUgaW4gdGhpcyBjYXNlLiBI
YXZpbmcNCj4gPiB0byB1cGRhdGUgdGhlIGRyaXZlciBmb3IgYSBmaXJtd2FyZSBuYW1lIGNoYW5n
ZSBpcyBzaWxseS4gTW9zdA0KPiA+IHdpcmVsZXNzIGRyaXZlcnMgaGF2ZSBkaWZmZXJlbnQgbmFt
ZXMgZm9yIGRpZmZlcmVudCBoYXJkd2FyZS9jaGlwIHJldnMNCj4gPiBhbmQvb3IgYW4gaW5jb21w
YXRpYmxlIEFQSSBjaGFuZ2UuICBNb3N0IGRpc3RyaWJ1dGlvbnMgd291bGQgdHlwaWNhbGx5DQo+
ID4gb25seSBjYXJyeSBhIHNpbmdsZSBpbnN0YW5jZSBvZiB0aGUgZmlybXdhcmUgZm9yIGEgcGFy
dGljdWxhciBjaGlwLg0KPiA+IFNwZWFraW5nIGZvciB0aGUgb25lcyBJIHdvcmsgd2l0aCwgSSB1
c3VhbGx5IGtlZXAgdGhlIG9yaWdpbmFsDQo+ID4gZmlsZW5hbWUgaW50YWN0ICh3aXRoIGEgdmVy
c2lvbiBudW1iZXIpIGFuZCBtYWtlIGEgc3ltbGluayB0byBpdCB3aXRoDQo+ID4gdGhlIG5hbWUg
dGhlIGRyaXZlciBleHBlY3RzLiAgZWc6DQo+ID4NCj4gPiBmdy00LmJpbiAtPiBmd192My40LjAu
OTQuYmluDQo+ID4gZndfdjMuMi4wLjE0NC5iaW4NCj4gPiBmd192My40LjAuOTQuYmluDQo+ID4N
Cj4gPiBUaGF0IHdheSBJIGNhbiBrZWVwIHRyYWNrIG9mIHRoZSB2ZXJzaW9uIGluIG15IGZpbGVz
eXN0ZW0sIGJ1dCBJJ20gbm90DQo+ID4gaGFja2luZyB0aGUgZHJpdmVyIGV2ZXJ5IGNvdXBsZSBv
ZiB3ZWVrcy4gIEFuZCB3ZSBkbyBpc3N1ZSBuZXcNCj4gPiBmaXJtd2FyZSBldmVyeSBmZXcgd2Vl
a3MuIEkgY2FuJ3QgaW1hZ2luZSBhc2tpbmcgb3VyIGN1c3RvbWVycyB0byBrZWVwDQo+ID4gdXBk
YXRpbmcgdGhlIGRyaXZlciBmb3IgZWFjaCBmaXJtd2FyZSBlbmhhbmNlbWVudC4NCj4gPg0KPiA+
IElNSE8gY2hhbmdpbmcgdGhlIGRyaXZlciB0byByZW5hbWUgdGhlIGZpcm13YXJlcyBvbiBuZXcg
dmVyc2lvbnMgc2VlbXMNCj4gPiBib3RoIGluY29udmVuaWVudCB0byBwZW9wbGUgdXNpbmcgaXQs
IGFuZCBleHRyYSBub24tdXNlZnVsIGNvbW1pdA0KPiBub2lzZS4NCj4gPg0KPiANCj4gVGhhbmtz
LiBJIGFncmVlIHdpdGggeW91LiBXZSBoYXZlIGFsc28gbWFpbnRhaW5lZCBzaW5nbGUgaW5zdGFu
Y2UvbmFtZQ0KPiBmb3IgYWxsIG91ciBjaGlwc2V0cyBmb3IgbGFzdCBmZXcgeWVhcnMuIFdlIGRv
IHJlbGVhc2UgbmV3IGZpcm13YXJlDQo+IHBlcmlvZGljYWxseSBmb3IgdGhlc2UgY2hpcHNldHMs
IGJ1dCBmaXJtd2FyZSBuYW1lIGFsd2F5cyByZW1haW5zIHRoZQ0KPiBzYW1lLg0KPiANCj4gLS0t
LS0tLS0NCj4gcm9vdEBwZS1sdDk0OTovbGludXgtZmlybXdhcmUvbXJ2bCMgbHMNCj4gcGNpZTg4
OTdfdWFwc3RhLmJpbiAgc2Q4Njg4X2hlbHBlci5iaW4gIHNkODc5N191YXBzdGEuYmluDQo+IHNk
ODg5N191YXBzdGEuYmluICAgdXNiODc5N191YXBzdGEuYmluDQo+IHNkODY4OC5iaW4gICAgICAg
ICAgIHNkODc4N191YXBzdGEuYmluICBzZDg4ODdfdWFwc3RhLmJpbg0KPiB1c2I4NzY2X3VhcHN0
YS5iaW4gIHVzYjg4OTdfdWFwc3RhLmJpbg0KPiAtLS0tLS0tLS0NCj4gDQo+IEl04oCZcyBqdXN0
IHRoYXQgZm9yIG91ciBuZXcgY2hpcHNldCA4OTk3IGZvciB3aGljaCB3ZSBoYXZlbid0IHlldA0K
PiBzdWJtaXR0ZWQgdGhlIGZpcm13YXJlIGltYWdlIHVwc3RyZWFtLCB3ZSB3YW50IHRvIGZpbmFs
aXplIHRoZSBuYW1lIGFzDQo+IHBjaWUqODk5N19jb21ib192NC5iaW4NCj4gDQoNCkNvdWxkIHlv
dSBwbGVhc2UgYWNjZXB0IHRoaXMgcGF0Y2g/DQpJIHdhbnRlZCB0byBzdWJtaXQgb3VyIGZpcnN0
IGZpcm13YXJlIGZvciA4OTk3IGNoaXBzZXQuDQoNClJlZ2FyZHMsDQpBbWl0a3VtYXIgDQo=
^ permalink raw reply
* RE: [PATCH] mwifiex: handle edmac vendor command
From: Amitkumar Karwar @ 2016-09-07 10:12 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless@vger.kernel.org
In-Reply-To: <87d1km1hb6.fsf@kamboji.qca.qualcomm.com>
Hi Kalle,
> From: Kalle Valo [mailto:kvalo@codeaurora.org]
> Sent: Friday, September 02, 2016 8:26 PM
> To: Amitkumar Karwar
> Cc: linux-wireless@vger.kernel.org
> Subject: Re: [PATCH] mwifiex: handle edmac vendor command
>
> Amitkumar Karwar <akarwar@marvell.com> writes:
>
> >> Sorry for the delay. I have been thinking about vendor commands quite
> >> a lot and I don't think they belong to upstream drivers. For regular
> >> use cases (used by normal users) we have nl80211, for developer and
> >> testing purposes we have debugfs and for manufacturing type of tests
> >> we have
> >> nl80211 testmode interface. The focus of development should be adding
> >> new functionality to nl80211 (and other generic interfaces), not to
> >> driver specific vendor commands.
> >>
> >> I know brcm80211 and ti's wlcore have few vendor commands but I'm
> >> hoping to remove them sometime soon.
> >>
> >> Thoughts?
> >>
> >
> > Thanks for your reply.
> >
> > There is something called energy detect mode. Chip can detect non-WiFi
> > radio signal also and monitor it for specified time before
> > transmitting frames. As per ETSI specification, enabling this mode is
> > mandatory for some countries for certain frequencies.
>
> To me this looks this is something which can be generic, not a driver
> specific interface. And why can't regulatory code enable this
> automatically, without any user involvement? It already knows what
> country we are in.
>
Got it. I will check if we can make this as generic as you mentioned and explore the option.
Regards,
Amitkumar
^ permalink raw reply
* Re: Stability connection problems in ath9k kernel 4.7
From: Kalle Valo @ 2016-09-07 8:32 UTC (permalink / raw)
To: Valerio Passini; +Cc: linux-wireless
In-Reply-To: <1798564.U2X6r5Zons@automatix>
Valerio Passini <valerio.passini@unicam.it> writes:
> I have found some connection problems since 4.7 release using ath9k that turn
> the wifi pretty useless, I think it might be something in the power management
> because the signal seems really low. Previously, up to kernel 4.6.7 everything
> worked very well.
> This is a sample of dmesg in kernel 4.7.2:
> 239.898935] wlp4s0: authenticate with XX:XX:XX:XX:XX:XX
> [ 239.919995] wlp4s0: send auth to XX:XX:XX:XX:XX:XX (try 1/3)
> [ 239.931877] wlp4s0: authenticated
> [ 239.932357] wlp4s0: associate with XX:XX:XX:XX:XX:XX (try 1/3)
> [ 239.942171] wlp4s0: RX AssocResp from XX:XX:XX:XX:XX:XX (capab=0x431
> status=0 aid=2)
> [ 239.942301] wlp4s0: associated
> [ 244.802853] ath: phy0: DMA failed to stop in 10 ms AR_CR=0x00000024
> AR_DIAG_SW=0x02000020 DMADBG_7=0x0000
> 6100
> [ 245.931832] wlp4s0: authenticate with XX:XX:XX:XX:XX:XX
> [ 245.953028] wlp4s0: send auth to XX:XX:XX:XX:XX:XX (try 1/3)
> [ 245.958702] wlp4s0: authenticated
> [ 245.960386] wlp4s0: associate withXX:XX:XX:XX:XX:XX (try 1/3)
> [ 245.980543] wlp4s0: RX AssocResp from XX:XX:XX:XX:XX:XX (capab=0x431
> status=0 aid=2)
>
> lspci on 4.6.7 kernel:
> 04:00.0 Network controller: Qualcomm Atheros AR9485 Wireless Network Adapter
> (rev 01)
> Subsystem: AzureWave AR9485 Wireless Network Adapter
> Flags: bus master, fast devsel, latency 0, IRQ 18
> Memory at f7900000 (64-bit, non-prefetchable) [size=512K]
> Expansion ROM at f7980000 [disabled] [size=64K]
> Capabilities: [40] Power Management version 2
> Capabilities: [50] MSI: Enable- Count=1/4 Maskable+ 64bit+
> Capabilities: [70] Express Endpoint, MSI 00
> Capabilities: [100] Advanced Error Reporting
> Capabilities: [140] Virtual Channel
> Capabilities: [160] Device Serial Number 00-00-00-00-00-00-00-00
> Kernel driver in use: ath9k
> Kernel modules: ath9k
>
> Probably you need some debugging output, but before recompiling the kernel I
> would like to know if you are interested in any kind of help from me and what
> steps I should take (I'm able to help in testing patches but I'm not familiar
> with git). Thank you
Usually it's really helpful if you can find the commit id which broke
it. 'git bisect' is a great tool to do that and this seems to be a nice
tutorial how to use it:
http://webchick.net/node/99
Instead of commit ids you can use release tags like v4.6 and v4.7 to
make it easier to start the bisect. Just make sure that v4.7 is really
broken and v4.6 works before you start the bisection.
--
Kalle Valo
^ permalink raw reply
* Re: Debugging RTL8192CU firmware loading on 3.12 powerpc
From: Simon Wunderlich @ 2016-09-07 8:23 UTC (permalink / raw)
To: Larry Finger; +Cc: Sven Eckelmann, linux-wireless, Pannirselvam Kanagaratnam
In-Reply-To: <1d72a2ac-03e7-37d8-c367-68413595443e@lwfinger.net>
[-- Attachment #1: Type: text/plain, Size: 1788 bytes --]
On Tuesday, September 6, 2016 8:29:32 AM CEST Larry Finger wrote:
> On 09/06/2016 08:09 AM, Sven Eckelmann wrote:
> > On Dienstag, 6. September 2016 09:40:41 CEST Sven Eckelmann wrote:
> >> On Freitag, 2. September 2016 12:53:28 CEST Larry Finger wrote:
> >> [...]
> >>
> >>> The patch I included in my previous E-mail, and attached here, does get
> >>> the firmware loaded correctly. There is still a problem that prevents
> >>> authentication. I'm still looking for that issue.
> >>
> >> Thanks for the fast update. I am currently testing your patch. It looks
> >> like the initial error is now gone. The hostapd also starts but
> >> beaconing doesn't seem to work at all (no error from the kernel/hostapd
> >> but the device is not sending anything). I am currently checking how
> >> beaconing is supposed to work in your driver. Maybe I will spot
> >> something useful.>
> > Yes, found something similar in the checksumming algorithm. See the
> > attached patch for details.
>
> Just for the record, this is not "my" driver. It was provided by Realtek. My
> contribution has only been to clean it up.
>
> Thanks for the patch. I too had found that checksum code, but I had not sent
> it as there are still problems on BE machines. These difficulties are
> running the NIC in STA mode. I have not tried AP mode. Scan data seem to be
> read OK, but it never authenticates. I do not know if there are further
> errors in setting up the transmit buffer, or if the problem is in the
> encryption/decryption code. I'm still looking.
just as a connected question here - do you know if those devices support
MultiSSID? The capabilities currently don't allow that, but I'm wondering if
that could be implemented, or if there are any hardware/firmware limitations?
Thanks,
Simon
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Stability connection problems in ath9k kernel 4.7
From: Valerio Passini @ 2016-09-07 7:49 UTC (permalink / raw)
To: linux-wireless
Hello,
I have found some connection problems since 4.7 release using ath9k that turn
the wifi pretty useless, I think it might be something in the power management
because the signal seems really low. Previously, up to kernel 4.6.7 everything
worked very well.
This is a sample of dmesg in kernel 4.7.2:
239.898935] wlp4s0: authenticate with XX:XX:XX:XX:XX:XX
[ 239.919995] wlp4s0: send auth to XX:XX:XX:XX:XX:XX (try 1/3)
[ 239.931877] wlp4s0: authenticated
[ 239.932357] wlp4s0: associate with XX:XX:XX:XX:XX:XX (try 1/3)
[ 239.942171] wlp4s0: RX AssocResp from XX:XX:XX:XX:XX:XX (capab=0x431
status=0 aid=2)
[ 239.942301] wlp4s0: associated
[ 244.802853] ath: phy0: DMA failed to stop in 10 ms AR_CR=0x00000024
AR_DIAG_SW=0x02000020 DMADBG_7=0x0000
6100
[ 245.931832] wlp4s0: authenticate with XX:XX:XX:XX:XX:XX
[ 245.953028] wlp4s0: send auth to XX:XX:XX:XX:XX:XX (try 1/3)
[ 245.958702] wlp4s0: authenticated
[ 245.960386] wlp4s0: associate withXX:XX:XX:XX:XX:XX (try 1/3)
[ 245.980543] wlp4s0: RX AssocResp from XX:XX:XX:XX:XX:XX (capab=0x431
status=0 aid=2)
lspci on 4.6.7 kernel:
04:00.0 Network controller: Qualcomm Atheros AR9485 Wireless Network Adapter
(rev 01)
Subsystem: AzureWave AR9485 Wireless Network Adapter
Flags: bus master, fast devsel, latency 0, IRQ 18
Memory at f7900000 (64-bit, non-prefetchable) [size=512K]
Expansion ROM at f7980000 [disabled] [size=64K]
Capabilities: [40] Power Management version 2
Capabilities: [50] MSI: Enable- Count=1/4 Maskable+ 64bit+
Capabilities: [70] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Virtual Channel
Capabilities: [160] Device Serial Number 00-00-00-00-00-00-00-00
Kernel driver in use: ath9k
Kernel modules: ath9k
Probably you need some debugging output, but before recompiling the kernel I
would like to know if you are interested in any kind of help from me and what
steps I should take (I'm able to help in testing patches but I'm not familiar
with git). Thank you
Valerio
^ permalink raw reply
* Re: [PATCH 0/5] Some cleanup patches for drivers/staging/rtl8723au/core/rtw_mlme.c
From: Matthias Beyer @ 2016-09-07 7:43 UTC (permalink / raw)
To: Jes Sorensen
Cc: gregkh, Larry Finger, Manuel Messner, Geliang Tang,
Cihangir Akturk, linux-wireless, devel, linux-kernel
In-Reply-To: <wrfjshtdyq56.fsf@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1151 bytes --]
On 06-09-2016 12:00:37, Jes Sorensen wrote:
> Matthias Beyer <mail@beyermatthias.de> writes:
> > This patchset fixes some errors and warnings reported by checkpatch.pl.
> >
> > Matthias Beyer (5):
> > drivers: staging: rtl8723au: core: Fix checkpatch.pl errors
> > drivers: staging: rtl8723au: core: simplify if-break-else
> > drivers: staging: rtl8723au: core: Refactor pointless branching
> > drivers: staging: rtl8723au: core: Fix "space prohibited" warning
> > drivers: staging: rtl8723au: core: Fix indentation
> >
> > drivers/staging/rtl8723au/core/rtw_mlme.c | 72 ++++++++++++++-----------------
> > 1 file changed, 33 insertions(+), 39 deletions(-)
>
> Nothing wrong with these patches, however I intend to post a patch to
> remove this driver soon, so it's kind of a waste of your time to spend
> too many cycles on it.
>
Alright, thanks for telling me, I won't waste any more time on it.
Besides that - thanks for telling me that the patchset is okay as-is.
That keeps me motivated!
--
Mit freundlichen Grüßen,
Kind regards,
Matthias Beyer
Proudly sent with mutt.
Happily signed with gnupg.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Re: [Patch] Wireless Driver rsi changes: Firmware loading and device initialization changed for RSI-91x devices
From: Julian Calaby @ 2016-09-07 5:46 UTC (permalink / raw)
To: Prameela Rani Garnepudi
Cc: Kalle Valo, שרי שרון,
Emmanuel Grumbach, Nicholas Mc Guire, xypron.glpk,
SF Markus Elfring, linux-kernel@vger.kernel.org, linux-wireless
In-Reply-To: <dcbe3a5b-780f-f508-b37d-8e2ef86787e3@redpinesignals.com>
Hi,
On Wed, Sep 7, 2016 at 3:34 PM, Prameela Rani Garnepudi
<prameela.garnepudi@redpinesignals.com> wrote:
>
> Hi,
>
> Please verify the attached patch which would need to be merged into the
> main-line kernel. This patch contains the changes for Redpine Signals
> wireless driver under main-line kernel directory drivers/net/wireless/rsi.
Please submit your patches as described in
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
You need to:
1. Send the patch in a plain text email
2. Have the patch be in the body of the email, not attached
3. Improve the subject as described in the linked document
Thanks,
--
Julian Calaby
Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox