main.c (5b7fc772e657824455507fc97f6b92287075a237) main.c (37de943d01539a0b36ab52cf73c1dfad140f697a)
1/*
2 * Copyright (c) 2013 Eugene Krasnikov <k.eugene.e@gmail.com>
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES

--- 14 unchanged lines hidden (view full) ---

23#include <linux/of_device.h>
24#include <linux/of_irq.h>
25#include <linux/rpmsg.h>
26#include <linux/soc/qcom/smem_state.h>
27#include <linux/soc/qcom/wcnss_ctrl.h>
28#include <net/ipv6.h>
29#include "wcn36xx.h"
30#include "testmode.h"
1/*
2 * Copyright (c) 2013 Eugene Krasnikov <k.eugene.e@gmail.com>
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES

--- 14 unchanged lines hidden (view full) ---

23#include <linux/of_device.h>
24#include <linux/of_irq.h>
25#include <linux/rpmsg.h>
26#include <linux/soc/qcom/smem_state.h>
27#include <linux/soc/qcom/wcnss_ctrl.h>
28#include <net/ipv6.h>
29#include "wcn36xx.h"
30#include "testmode.h"
31#include "firmware.h"
31
32unsigned int wcn36xx_dbg_mask;
33module_param_named(debug_mask, wcn36xx_dbg_mask, uint, 0644);
34MODULE_PARM_DESC(debug_mask, "Debugging mask");
35
36#define CHAN2G(_freq, _idx) { \
37 .band = NL80211_BAND_2GHZ, \
38 .center_freq = (_freq), \

--- 228 unchanged lines hidden (view full) ---

267 return wcn36xx_caps_names[x];
268}
269
270static void wcn36xx_feat_caps_info(struct wcn36xx *wcn)
271{
272 int i;
273
274 for (i = 0; i < MAX_FEATURE_SUPPORTED; i++) {
32
33unsigned int wcn36xx_dbg_mask;
34module_param_named(debug_mask, wcn36xx_dbg_mask, uint, 0644);
35MODULE_PARM_DESC(debug_mask, "Debugging mask");
36
37#define CHAN2G(_freq, _idx) { \
38 .band = NL80211_BAND_2GHZ, \
39 .center_freq = (_freq), \

--- 228 unchanged lines hidden (view full) ---

268 return wcn36xx_caps_names[x];
269}
270
271static void wcn36xx_feat_caps_info(struct wcn36xx *wcn)
272{
273 int i;
274
275 for (i = 0; i < MAX_FEATURE_SUPPORTED; i++) {
275 if (get_feat_caps(wcn->fw_feat_caps, i))
276 if (wcn36xx_firmware_get_feat_caps(wcn->fw_feat_caps, i))
276 wcn36xx_dbg(WCN36XX_DBG_MAC, "FW Cap %s\n", wcn36xx_get_cap_name(i));
277 }
278}
279
280static int wcn36xx_start(struct ieee80211_hw *hw)
281{
282 struct wcn36xx *wcn = hw->priv;
283 int ret;

--- 416 unchanged lines hidden (view full) ---

700}
701
702static int wcn36xx_hw_scan(struct ieee80211_hw *hw,
703 struct ieee80211_vif *vif,
704 struct ieee80211_scan_request *hw_req)
705{
706 struct wcn36xx *wcn = hw->priv;
707
277 wcn36xx_dbg(WCN36XX_DBG_MAC, "FW Cap %s\n", wcn36xx_get_cap_name(i));
278 }
279}
280
281static int wcn36xx_start(struct ieee80211_hw *hw)
282{
283 struct wcn36xx *wcn = hw->priv;
284 int ret;

--- 416 unchanged lines hidden (view full) ---

701}
702
703static int wcn36xx_hw_scan(struct ieee80211_hw *hw,
704 struct ieee80211_vif *vif,
705 struct ieee80211_scan_request *hw_req)
706{
707 struct wcn36xx *wcn = hw->priv;
708
708 if (!get_feat_caps(wcn->fw_feat_caps, SCAN_OFFLOAD)) {
709 if (!wcn36xx_firmware_get_feat_caps(wcn->fw_feat_caps, SCAN_OFFLOAD)) {
709 /* fallback to mac80211 software scan */
710 return 1;
711 }
712
713 /* Firmware scan offload is limited to 48 channels, fallback to
714 * software driven scanning otherwise.
715 */
716 if (hw_req->req.n_channels > 48) {

--- 21 unchanged lines hidden (view full) ---

738 struct ieee80211_vif *vif)
739{
740 struct wcn36xx *wcn = hw->priv;
741
742 mutex_lock(&wcn->scan_lock);
743 wcn->scan_aborted = true;
744 mutex_unlock(&wcn->scan_lock);
745
710 /* fallback to mac80211 software scan */
711 return 1;
712 }
713
714 /* Firmware scan offload is limited to 48 channels, fallback to
715 * software driven scanning otherwise.
716 */
717 if (hw_req->req.n_channels > 48) {

--- 21 unchanged lines hidden (view full) ---

739 struct ieee80211_vif *vif)
740{
741 struct wcn36xx *wcn = hw->priv;
742
743 mutex_lock(&wcn->scan_lock);
744 wcn->scan_aborted = true;
745 mutex_unlock(&wcn->scan_lock);
746
746 if (get_feat_caps(wcn->fw_feat_caps, SCAN_OFFLOAD)) {
747 if (wcn36xx_firmware_get_feat_caps(wcn->fw_feat_caps, SCAN_OFFLOAD)) {
747 /* ieee80211_scan_completed will be called on FW scan
748 * indication */
749 wcn36xx_smd_stop_hw_scan(wcn);
750 }
751}
752
753static void wcn36xx_sw_scan_start(struct ieee80211_hw *hw,
754 struct ieee80211_vif *vif,

--- 1009 unchanged lines hidden ---
748 /* ieee80211_scan_completed will be called on FW scan
749 * indication */
750 wcn36xx_smd_stop_hw_scan(wcn);
751 }
752}
753
754static void wcn36xx_sw_scan_start(struct ieee80211_hw *hw,
755 struct ieee80211_vif *vif,

--- 1009 unchanged lines hidden ---