| ReStranger | 1b85f70 | 2025-09-30 04:05:06 +0300 | [diff] [blame^] | 1 | #! /vendor/bin/sh |
| 2 | |
| 3 | # Copyright (c) 2010, The Linux Foundation. All rights reserved. |
| 4 | # |
| 5 | # Redistribution and use in source and binary forms, with or without |
| 6 | # modification, are permitted provided that the following conditions are |
| 7 | # met: |
| 8 | # * Redistributions of source code must retain the above copyright |
| 9 | # notice, this list of conditions and the following disclaimer. |
| 10 | # * Redistributions in binary form must reproduce the above |
| 11 | # copyright notice, this list of conditions and the following |
| 12 | # disclaimer in the documentation and/or other materials provided |
| 13 | # with the distribution. |
| 14 | # * Neither the name of The Linux Foundation nor the names of its |
| 15 | # contributors may be used to endorse or promote products derived |
| 16 | # from this software without specific prior written permission. |
| 17 | # |
| 18 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED |
| 19 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 20 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT |
| 21 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS |
| 22 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 23 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 24 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
| 25 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 26 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
| 27 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN |
| 28 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 | # |
| 30 | |
| 31 | # For successful WLAN card detection, WLAN needs SDIO polling turned on. |
| 32 | # This script can be used to turn on/off SDIO polling on appropriate |
| 33 | # SDIO slot on the MSM target (e.g. slot 3 on 7x30 surf). |
| 34 | |
| 35 | arg=$1 |
| 36 | target=`getprop ro.board.platform` |
| 37 | |
| 38 | case "$target" in |
| 39 | "msm7627_6x") |
| 40 | echo 1 > /sys/devices/platform/msm_sdcc.1/polling |
| 41 | echo 1 > /sys/devices/platform/msm_sdcc.2/polling |
| 42 | ;; |
| 43 | |
| 44 | "msm7627_ffa") |
| 45 | echo 1 > /sys/devices/platform/msm_sdcc.2/polling |
| 46 | ;; |
| 47 | |
| 48 | "msm7627_surf") |
| 49 | echo 1 > /sys/devices/platform/msm_sdcc.1/polling |
| 50 | echo 1 > /sys/devices/platform/msm_sdcc.2/polling |
| 51 | ;; |
| 52 | |
| 53 | "msm7627a") |
| 54 | echo 1 > /sys/devices/platform/msm_sdcc.2/polling |
| 55 | ;; |
| 56 | |
| 57 | "msm7630_surf") |
| 58 | echo 1 > /sys/devices/platform/msm_sdcc.3/polling |
| 59 | ;; |
| 60 | |
| 61 | "msm7630_1x") |
| 62 | echo 1 > /sys/devices/platform/msm_sdcc.3/polling |
| 63 | ;; |
| 64 | |
| 65 | "msm7630_fusion") |
| 66 | echo 1 > /sys/devices/platform/msm_sdcc.3/polling |
| 67 | ;; |
| 68 | |
| 69 | "msm8660") |
| 70 | echo 1 > /sys/devices/platform/msm_sdcc.4/polling |
| 71 | ;; |
| 72 | |
| 73 | "msm8660_csfb") |
| 74 | echo 1 > /sys/devices/platform/msm_sdcc.4/polling |
| 75 | ;; |
| 76 | esac |
| 77 | |
| 78 | exit 0 |