gluon-core: reduce mac80211 fq_codel memory limit to 256KB on devices with 32MB RAM
This commit is contained in:
		
							parent
							
								
									d41ba2c6b2
								
							
						
					
					
						commit
						e63c6ca01f
					
				@ -1,8 +1,8 @@
 | 
			
		||||
#!/bin/sh
 | 
			
		||||
if [ "${ACTION}" = "add" ]; then
 | 
			
		||||
 | 
			
		||||
if [ "${ACTION}" = 'add' ]; then
 | 
			
		||||
	RAM=$(awk '/MemTotal/ {print $2}' /proc/meminfo)
 | 
			
		||||
	if [ "$RAM" -lt $((48*1024)) ]; then
 | 
			
		||||
		echo "fq_memory_limit 1048576" > "/sys/kernel/debug/ieee80211/$DEVICENAME/aqm"
 | 
			
		||||
	if [ "$RAM" -le $((32*1024)) ]; then
 | 
			
		||||
		echo 'fq_memory_limit 262144' > "/sys/kernel/debug/ieee80211/$DEVICENAME/aqm"
 | 
			
		||||
	fi
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user