Firefly开源社区

打印 上一主题 下一主题

怎么把WiFi热点设置为5GHZ

14

积分

0

威望

0

贡献

游客

积分
14

怎么把WiFi热点设置为5GHZ

发表于 2016-6-16 19:49:38      浏览:10473 | 回复:7        打印      只看该作者   [复制链接] 楼主
如题。

尝试修改 /data/misc/wifi/hostapd.conf,但是无效。
回复

使用道具 举报

23

积分

0

威望

0

贡献

游客

积分
23
发表于 2016-6-24 12:41:40        只看该作者  沙发
把wifichannel设置到5Gchannel
回复

使用道具 举报

111

积分

0

威望

0

贡献

技术小白

积分
111
发表于 2018-3-20 22:18:58        只看该作者  板凳
JCoder 发表于 2016-6-24 12:41
把wifichannel设置到5Gchannel

您好 怎么设置为5Gchannel 能和我说一下么
回复

使用道具 举报

111

积分

0

威望

0

贡献

技术小白

积分
111
发表于 2018-3-20 22:19:23        只看该作者  地板
JCoder 发表于 2016-6-24 12:41
把wifichannel设置到5Gchannel

您好 怎么设置为5Gchannel 能和我说一下么
回复

使用道具 举报

7

积分

0

威望

0

贡献

游客

积分
7
发表于 2018-4-17 18:11:41        只看该作者  5#
diff --git a/service/java/com/android/server/wifi/SoftApManager.java b/service/java/com/android/server/wifi/SoftApManager.java
index 2dfb754..3e60ede 100644
--- a/service/java/com/android/server/wifi/SoftApManager.java
+++ b/service/java/com/android/server/wifi/SoftApManager.java
@@ -137,12 +137,13 @@ public class SoftApManager {
              * Country code is mandatory for 5GHz band, return an error if failed to set
              * country code when AP is configured for 5GHz band.
              */
-            if (!mWifiNative.setCountryCodeHal(mCountryCode.toUpperCase(Locale.ROOT))
+
+            /*if (!mWifiNative.setCountryCodeHal(mCountryCode.toUpperCase(Locale.ROOT))
                     && config.apBand == WifiConfiguration.AP_BAND_5GHZ) {
                 Log.e(TAG, "Failed to set country code, required for setting up "
                         + "soft ap in 5GHz");
                 return ERROR_GENERIC;
-            }
+            }*/
         }

         try {
diff --git a/service/java/com/android/server/wifi/util/ApConfigUtil.java b/service/java/com/android/server/wifi/util/ApConfigUtil.java
index 7bbbc03..0e12f06 100644
--- a/service/java/com/android/server/wifi/util/ApConfigUtil.java
+++ b/service/java/com/android/server/wifi/util/ApConfigUtil.java
@@ -133,15 +133,14 @@ public class ApConfigUtil {
                     config.apBand, allowed2GChannels,
                     wifiNative.getChannelsForBand(WifiScanner.WIFI_BAND_5_GHZ));
             if (config.apChannel == -1) {
-                if (wifiNative.isGetChannelsForBandSupported()) {
-                    /* We're not able to get channel when it is supported by HAL. */
-                    Log.e(TAG, "Failed to get available channel.");
-                    return ERROR_NO_CHANNEL;
-                }
-
                 /* Use the default for HAL without get channel support. */
-                config.apBand = DEFAULT_AP_BAND;
-                config.apChannel = DEFAULT_AP_CHANNEL;
+                if (config.apBand == WifiConfiguration.AP_BAND_5GHZ) {
+                        Log.e(TAG, "kernel not support,set to chanel 153");
+                        config.apChannel = 153;
+                } else {
+                        config.apBand = DEFAULT_AP_BAND;
+                        config.apChannel = DEFAULT_AP_CHANNEL;
+                }
             }
         }
回复

使用道具 举报

7

积分

0

威望

0

贡献

游客

积分
7
发表于 2018-4-17 18:15:58        只看该作者  6#
Netd 配置 SoftAp 5G 支持 HT40
wifi驱动是否支持5g中的雷达信道,不支持,驱动中设置cfg80211中的prohibited_flags,取消标志IEEE80211_CHAN_NO_IR ,chan->flags &= ~(prohibited_flags);
回复

使用道具 举报

7

积分

0

威望

0

贡献

游客

积分
7
发表于 2018-4-17 18:16:38        只看该作者  7#
u32 prohibited_flags = IEEE80211_CHAN_NO_IR;
回复

使用道具 举报

13

积分

0

威望

0

贡献

技术小白

积分
13
发表于 2018-11-20 16:43:02        只看该作者  8#
_Eason 发表于 2018-4-17 18:15
Netd 配置 SoftAp 5G 支持 HT40
wifi驱动是否支持5g中的雷达信道,不支持,驱动中设置cfg80211中的prohib ...

大佬,能否详细说下如何配置HT40
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表